This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CALL_USED_REGISTERS & local_alloc


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]