This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for PowerPC regression gcc.c-torture/compile/20000804-1.c
- From: Corey Minyard <minyard at acm dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Nov 2001 15:16:25 -0600
- Subject: Patch for PowerPC regression gcc.c-torture/compile/20000804-1.c
On Linux/PowerPC, I was seeing a regression on:
__complex__ long long f ()
{
int i[99];
__complex__ long long v;
v += f ();
asm("": "+r" (v) : "r" (0), "r" (1));
v = 2;
return v;
g (&v);
}
It turns out that the PowerPC code was generating a LO_SUM
for a CDImode, but that's not allowed on PowerPC. The patch
below fixes the regression, and adds no new regressions on my
machine.
-Corey
2001-11-29 Corey Minyard <minyard@acm.org>
* config/rs6000/rs6000.h (rs6000_legitimize_address):
Don't allow large complex modes to generate a LO_SUM.
This fixes regression gcc.c-torture/compile/20000804-1.c.
on PowerPC.
Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.244
diff -u -p -r1.244 rs6000.c
--- rs6000.c 2001/11/27 01:35:23 1.244
+++ rs6000.c 2001/11/30 19:25:09
@@ -1641,6 +1641,8 @@ rs6000_legitimize_address (x, oldx, mode
&& GET_CODE (x) != CONST_DOUBLE
&& CONSTANT_P (x)
&& (TARGET_HARD_FLOAT || mode != DFmode)
+ && mode != CDImode
+ && mode != CTImode
&& mode != DImode
&& mode != TImode)
{
@@ -1654,6 +1656,8 @@ rs6000_legitimize_address (x, oldx, mode
&& GET_CODE (x) != CONST_DOUBLE
&& CONSTANT_P (x)
&& (TARGET_HARD_FLOAT || mode != DFmode)
+ && mode != CDImode
+ && mode != CTImode
&& mode != DImode
&& mode != TImode)
{