This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
return register clobbering
- To: gcc at gcc dot gnu dot org
- Subject: return register clobbering
- From: Dmitry Pugachev <dima_p at auriga dot ru>
- Date: Sat, 04 Nov 2000 15:57:11 +0300
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