This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ppc LE broken. anybody care?


On Sun, Mar 07, 2004 at 06:59:30PM -0500, David Edelsohn wrote:
> 	Given how little that mode is used, we can modify those patterns
> to test TARGET_LITTLE_ENDIAN.

I thought you'd never ask ;-).

I was already testing this patch on my tree :).

Ok for mainline, 3.4, 3.3, and 3.3-e500 branch?

Aldy

2004-03-07  Aldy Hernandez  <aldyh@redhat.com>
 
        * config/rs6000/rs6000.md (ashrdi3): Do not call ashrdi3_no_power
        for little endian.
        ("ashrdi3_no_power"): Disable for little endian.

Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.296
diff -u -p -r1.296 rs6000.md
--- config/rs6000/rs6000.md	27 Feb 2004 02:13:59 -0000	1.296
+++ config/rs6000/rs6000.md	8 Mar 2004 00:12:38 -0000
@@ -5634,7 +5634,7 @@
   [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,&r")
 	(ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r")
 		     (match_operand:SI 2 "const_int_operand" "M,i")))]
-  "TARGET_32BIT && !TARGET_POWERPC64 && !TARGET_POWER"
+  "TARGET_32BIT && !TARGET_POWERPC64 && !TARGET_POWER && WORDS_BIG_ENDIAN"
   "@
    {srai|srawi} %0,%1,31\;{srai|srawi} %L0,%1,%h2
    {sri|srwi} %L0,%L1,%h2\;insrwi %L0,%1,%h2,0\;{srai|srawi} %0,%1,%h2"
@@ -6960,7 +6960,8 @@
       emit_insn (gen_ashrdi3_power (operands[0], operands[1], operands[2]));
       DONE;
     }
-  else if (TARGET_32BIT && GET_CODE (operands[2]) == CONST_INT)
+  else if (TARGET_32BIT && GET_CODE (operands[2]) == CONST_INT
+	   && WORDS_BIG_ENDIAN)
     {
       emit_insn (gen_ashrdi3_no_power (operands[0], operands[1], operands[2]));
       DONE;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]