This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CALL_USED_REGISTERS & local_alloc
- From: Alessandro Lonardo <alessandro dot lonardo at roma1 dot infn dot it>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 11 Nov 2004 16:45:05 +0100
- Subject: Re: CALL_USED_REGISTERS & local_alloc
- References: <41892472.3070902@roma1.infn.it> <41918B6C.5070500@specifixinc.com>
James E Wilson wrote:
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.
Yes, that is the behaviour I was expecting.
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.
I do agree.
I understand that the function_prologue/epilogue port does not have to
contain explicit code to perform these operations, or do they have to
contain it?
Thanks,
Alessandro