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]

return register clobbering


  Hi! I came across a problem which may be either a gcc bug, or a cause
of my own misunderstanding of gcc internals, but here it is (in the Arm
thumb context, but it does not matter):

expand_function_end() (function.c) generates stack save/restore
instructions at the beginning/end of a function. If such instructions
need reloading, a temporary register will be used. The problem is that
it can be the register holding the return value (r0), as the stack
restore instruction is placed after the USE for r0, and the reloader
considers it free.

If anyone has any ideas that can help me overcome this, I'd appreciate
it.. Thanks in advance!

 /Dmitry



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