PATCH to expand_builtin_setjmp_receiver for middle-end/28493

Jason Merrill jason@redhat.com
Tue Sep 12 17:56:00 GMT 2006


The problem in 28493 turned out to be that we had

   (set virtual-stack-vars hard-frame-pointer)
   ...
   (compare virtual-stack-vars ptr)

devirtualization turned this into

   (set soft-frame-pointer (minus hard-frame-pointer 8))
   ...
   (set tmp (plus soft-frame-pointer 8))
   (compare tmp ptr)

CSE cleverly changed the latter chunk to

   (compare tmp hard-frame-pointer)

but then greg changes the first line to

   (set hard-frame-pointer (minus hard-frame-pointer 8))

and things break.  Fixed by forcing a clobber of the hard frame pointer 
so that the soft/hard duality doesn't confuse CSE.

Tested powerpc-linux-gnu, applied to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: setjmp.patch
Type: text/x-patch
Size: 1709 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060912/3cf9356c/attachment.bin>


More information about the Gcc-patches mailing list