OSDN Git Service

2002-09-19 Stephen Clarke <stephen.clarke@superh.com>
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2002 13:17:57 +0000 (13:17 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2002 13:17:57 +0000 (13:17 +0000)
* config/sh/sh.h (UNSPEC_GOTOFF_P): Define.
(GOTOFF_P): Extend to allow gotoff plus constant.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57302 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 40f48b7..90a1bf0 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 a06984f..64a0f2a 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 \