sh.h (UNSPEC_GOTOFF_P): Define.
authorStephen Clarke <stephen.clarke@superh.com>
Thu, 19 Sep 2002 13:17:57 +0000 (13:17 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 19 Sep 2002 13:17:57 +0000 (14:17 +0100)
2002-09-19  Stephen Clarke <stephen.clarke@superh.com>

* config/sh/sh.h (UNSPEC_GOTOFF_P): Define.
(GOTOFF_P): Extend to allow gotoff plus constant.

From-SVN: r57302

gcc/ChangeLog
gcc/config/sh/sh.h

index 40f48b7fa15955b3a8407ed39828036725389877..90a1bf0f90b5857043d2c5ef4ff7c9ee9646e433 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-19  Stephen Clarke <stephen.clarke@superh.com>
+
+       * config/sh/sh.h (UNSPEC_GOTOFF_P): Define.
+       (GOTOFF_P): Extend to allow gotoff plus constant.
+
 2002-09-18  Richard Henderson  <rth@redhat.com>
 
        * ifcvt.c (noce_process_if_block): Correctly detect X modified
index a06984fadfe529dcabb8b9ced88528597179a97e..64a0f2a4cae2fdaddf740ac6afb81947d1ed4453 100644 (file)
@@ -2277,9 +2277,15 @@ while (0)
   (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \
    && XINT (XEXP ((OP), 0), 1) == UNSPEC_GOTPLT)
 
+#define UNSPEC_GOTOFF_P(OP) \
+  (GET_CODE (OP) == UNSPEC && XINT ((OP), 1) == UNSPEC_GOTOFF)
+
 #define GOTOFF_P(OP) \
-  (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \
-   && XINT (XEXP ((OP), 0), 1) == UNSPEC_GOTOFF)
+  (GET_CODE (OP) == CONST \
+   && (UNSPEC_GOTOFF_P (XEXP ((OP), 0)) \
+       || (GET_CODE (XEXP ((OP), 0)) == PLUS \
+           && UNSPEC_GOTOFF_P (XEXP (XEXP ((OP), 0), 0)) \
+          && GET_CODE (XEXP (XEXP ((OP), 0), 1)) == CONST_INT)))
 
 #define PIC_ADDR_P(OP) \
   (GET_CODE (OP) == CONST && GET_CODE (XEXP ((OP), 0)) == UNSPEC \