fix for 18751 breaks Darwin
Alan Modra
amodra@bigpond.net.au
Fri Dec 24 02:48:00 GMT 2004
Fri, Dec 24, 2004 at 12:01:38PM +1030, Alan Modra wrote:
On Thu, Dec 23, 2004 at 02:11:17PM -0800, Geoffrey Keating wrote:
> gcc/libgcc2.c:1348 (set (reg:DF 32 f0 [124])
> (mem/u/i:DF (lo_sum:SI (reg:SI 9 r9)
> (const:SI (minus:SI (symbol_ref/u:SI ("*LC0") [flags
> 0x2])
> (symbol_ref:SI ("<pic base>") [flags 0x180]))))
> [5 S8 A64])) 302 {*movdf_hardfloat32} (nil)
> (expr_list:REG_EQUIV (const_double:DF 4.503601774854144e+15
> [0x0.800004p+53])
> (nil)))
> /Network/Servers/hills/Volumes/capanna/gkeating/co/egcs-mainline/gcc/
> gcc/libgcc2.c:1355: internal compiler error: in
> reload_cse_simplify_operands, at postreload.c:391
Ugh. I suppose this one is coming from rs6000_legitimize_address, and I
would have seen this on powerpc-linux too if we didn't compile libgcc
-fPIC. The following will fix this particular problem by allowing
DFmode here as we used to. As I said before, it's somewhat bogus
because we might end up with a DFmode in two 32-bit gprs, and lo_sum
addresses aren't offsettable. I guess the chance of this happening is
pretty small since a) DFmode prefers fprs, and b) you'd need a
misaligned DFmode crossing a 64k boundary + 32k before offsetting the
address will cause a problem.
* config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Allow
DFmode for 32-bit again.
I'm committing this as obvious since it's (partially) reverting to old
code and should fix the Darwin bootstrap.
diff -urp -xCVS -x'*~' -x'.#*' gcc-virgin/gcc/config/rs6000/rs6000.c gcc-current/gcc/config/rs6000/rs6000.c
--- gcc-virgin/gcc/config/rs6000/rs6000.c 2004-12-23 17:46:27.419162669 +1030
+++ gcc-current/gcc/config/rs6000/rs6000.c 2004-12-24 11:34:25.552759601 +1030
@@ -3325,7 +3325,8 @@ legitimate_lo_sum_address_p (enum machin
if (GET_MODE_NUNITS (mode) != 1)
return false;
if (GET_MODE_BITSIZE (mode) > 64
- || (GET_MODE_BITSIZE (mode) > 32 && !TARGET_POWERPC64))
+ || (GET_MODE_BITSIZE (mode) > 32 && !TARGET_POWERPC64
+ && !(TARGET_HARD_FLOAT && TARGET_FPRS && mode == DFmode)))
return false;
return CONSTANT_P (x);
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Gcc-patches
mailing list