[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] avoid needless register save when storing structures
From: |
Jörg Mische |
Subject: |
[Tinycc-devel] avoid needless register save when storing structures |
Date: |
Mon, 30 Nov 2009 20:49:08 +0100 |
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
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] avoid needless register save when storing structures,
Jörg Mische <=