This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CALL_USED_REGISTERS & local_alloc
- From: James E Wilson <wilson at specifixinc dot com>
- To: Alessandro Lonardo <alessandro dot lonardo at roma1 dot infn dot it>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 09 Nov 2004 19:30:52 -0800
- Subject: Re: CALL_USED_REGISTERS & local_alloc
- References: <41892472.3070902@roma1.infn.it>
Alessandro Lonardo wrote:
I defined CALL_USED_REGISTERS = FIXED_REGISTERS including all the stack
related regs
along with some regs reserved for relevant constants.
So you are saying that only the fixed registers are call-used? That
means all other registers are call-saved, i.e. if a function uses them,
then it must save the old value on the stack in the function prologue,
and restore this value from the stack in the function epilogue.
It happens that one of the two reloads in v_inc get assigned the same
(26) registers of i_0 which is therefore clobbered by function call.
But r26 is call-saved, so it is ok to use it across a function call.
The problem here is that the function v_inc did not save/restore it in
the prologue/epilogue.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com