[PATCH] Fix emit_library_call_value to not use virtual stack regs after expand
Maxim Kuvyrkov
maxim@codesourcery.com
Wed Jun 24 12:42:00 GMT 2009
Hello,
The following simple patch [which is just a duplication of a hunk from
within emit_library_call_value_1] fixes ICE when compiling for
m68k/ColdFire machines without hardware divide.
The ICE occurs in reload on gcc.c-torture/execute/loop-3b.c test due to
occurrence of virtual_outgoing_args_rtx in the instruction stream. This
virtual register is used within expand and then is substituted with
(stack_pointer_rtx + STACK_POINTER_OFFSET) at the end of expand.
Evidently, there still remains a way to generate virtual_outgoing_args
by the loop optimizer. The loop optimizer emits a divide instruction
which, due to target not having hwdiv, expands into a library call.
emit_library_call_value_1 deals with virtual_outgoing_args_rtx in two
places: the first already handles case when virtuals are instantiated;
this patch fixes the second.
Tested by bootstrapping on x86_64. OK for trunk?
Thanks,
--
Maxim K.
CodeSourcery
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc-virt-regs-fix.ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090624/44203724/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc-virt-regs-fix.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090624/44203724/attachment-0001.ksh>
More information about the Gcc-patches
mailing list