[powerpc] fix movdf_hardfloat32 pattern
Nathan Sidwell
nathan@codesourcery.com
Fri Dec 15 09:59:00 GMT 2006
This patch fixes a bug I found in a 3.4 toolchain. The bug is still present in
mainline, but the testcase I have doesn't tickle the problematic sequence.
This testcase has a massive structure, such that the byte offset to the double
member is 0x297ff8 bytes. We construct a sequence that ends with,
(insn:TI 13 11 32 0 (set (mem/s:DF (plus:SI (reg/f:SI 11 11 [121])
(const_int 32760 [0x7ff8])) [7 <variable>.member+0 S8 A64])
(reg:DF 9 9 [122])) 311 {*movdf_hardfloat32}
Because of rs6000_mode_dependent_address we do not consider the 0x7ff8' addend
to be an offsettable address. Hence the the output pattern of case 2: uses the
second alternative of stx/cal/stx/cal sequence. but here, we've not got an
indexable address so the assembler barfs. the load patterns have the same problem.
The obvious fix is to use %X output format to append the 'x' as necessary.
I'm not sure if it's worth committing the testcase, given it no longer generates
this code.
Tested on powerpc-wrs-vxworks, ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: all.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061215/7db866de/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 82443.i
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061215/7db866de/attachment-0001.ksh>
More information about the Gcc-patches
mailing list