Reload/i386 patch for secondary memory vs subregs

Bernd Schmidt bernds@codesourcery.com
Fri Aug 3 14:33:00 GMT 2012


There are a number of problems in the interaction between secondary
memory and subregs. If we reload the inner of a subreg, we forget about
this when deciding whether to use secondary memory, and just use
REGNO_REG_CLASS on the (now reloaded) inner.

Also, we don't really know what to do if we get a subreg of something
that's not a register, such as a symbol_ref. This is another part of the
patch below, using a variant of find_valid_class that works in this case.

The original testcase we had was the artificial test included in the
patch, which involves reinterpreting a pointer to a string constant as a
floating point value. Since then, we've also found a larger Altivec
testcase which crashes the compiler without this patch.

Bootstrapped and tested on i686-linux. It's also been in several of our
internal trees, going back to even 4.4-based ones IIRC, and has had
testing for several architectures. Ok for the i386 part? I intend to
check the reload bits in soon if there are no objections.


Bernd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: floatptr0727c.diff
Type: text/x-patch
Size: 7796 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120803/8e4494b3/attachment.bin>


More information about the Gcc-patches mailing list