tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] avoid needless register save when storing structures


From: grischka
Subject: Re: [Tinycc-devel] avoid needless register save when storing structures
Date: Tue, 01 Dec 2009 18:04:40 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Thanks Jörg.

A note to everybody:  Be aware that if you configure git with
your real email address it will be visible on the web interface.

--- grischka

Jörg Mische wrote:
Hi all,

I found a small bug when storing structures in vstore(): the store is done by a 
call to memcpy() and the arguments are pushed on vstack. But there remains an 
unused entry on the stack that is popped after the
code generation for the call (in gfunc_call()).

This should not be a problem, but gfunc_call() calls save_regs() which searches 
the vstack for registers that must be preserved during a function call. If the 
unused entry refers to a register, it is saved to memory, although it will 
never be used again.

By avoiding the unused entry, the needless code generation can be avoided, too. I pushed 
a patch on the "mob" branch.

Regards,
Jörg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]