PA PIC bugfix

Jeffrey A Law law@cygnus.com
Sun Oct 17 16:09:00 GMT 1999


My patch to fix bugs in the handling of LO_SUM from a few days regressed PIC
support for PA32.

This patch fixes the regression.

        * pa.c (move_operand): Reject (lo_sum (reg) (unspec ...)).

Index: pa.c
===================================================================
RCS file: /cvs/cvsfiles/devo//gcc/config/pa/pa.c,v
retrieving revision 1.173.2.3
diff -c -3 -p -r1.173.2.3 pa.c
*** pa.c	1999/10/15 23:12:46	1.173.2.3
--- pa.c	1999/10/17 23:06:24
*************** move_operand (op, mode)
*** 333,338 ****
--- 333,346 ----
  
    op = XEXP (op, 0);
  
+   /* The LO_SUM part of a DLT reference is not considered a move_operand;
+      we must reject it here since it must be accepted by memory_address_p.  
*/
+   if (GET_CODE (op) == LO_SUM
+       && GET_CODE (XEXP (op, 0)) == REG
+       && REG_OK_FOR_BASE_P (XEXP (op, 0))
+       && GET_CODE (XEXP (op, 1)) == UNSPEC)
+     return 0;
+ 
    /* Since move_operand is only used for source operands, we can always
       allow scaled indexing!  */
    if (! TARGET_DISABLE_INDEXING







More information about the Gcc-patches mailing list