*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Sat, 16 May 1992 19:40:17 +0000 (19:40 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 16 May 1992 19:40:17 +0000 (19:40 +0000)
From-SVN: r998

gcc/config/ns32k/ns32k.h
gcc/config/ns32k/ns32k.md

index 07fc88206edbf7436d582675a1d7eff66cf301d4..129163820acd6ca20521ea1e2cd9389e11c894d7 100644 (file)
@@ -830,7 +830,17 @@ __transfer_from_trampoline ()              \
    || (GET_CODE (X) == PLUS                                            \
        && GET_CODE (XEXP (X, 0)) == REG                                        \
        && REG_OK_FOR_BASE_P (XEXP (X, 0))                              \
-       && CONSTANT_ADDRESS_P (XEXP (X, 1))))
+       && CONSTANT_ADDRESS_P (XEXP (X, 1))                             \
+       && (GET_CODE (X) != CONST_INT || NS32K_DISPLACEMENT_P (INTVAL (X)))))
+
+/* 1 if integer I will fit in a 4 byte displacement field.
+   Strictly speaking, we can't be sure that a symbol will fit this range.
+   But, in practice, it always will.  */
+
+#define NS32K_DISPLACEMENT(i)                          \
+ (((i) <= 16777215 && (i) >= -16777216)                        \
+  || ((TARGET_32532 || TARGET_32332)                   \
+      && (i) <= 536870913 && (i) >= -536870912))
 
 /* Check for frame pointer or stack pointer.  */
 #define MEM_REG(X) \
index 107ad41d5e57cee57ed0687addd5f7350b679160..4fcfe780fd53f7280cc550a110c706db8cfd920f 100644 (file)
   if (which_alternative == 1)
     {
       int i = INTVAL (operands[2]);
-      if ( i < 0x40000000 && i >= -0x40000000 )
-         return \"addr %c2(%1),%0\";
+      if (NS32K_DISPLACEMENT_P (i))
+       return \"addr %c2(%1),%0\";
       else
-         return \"movd %1,%0\;addd %2,%0\";
+       return \"movd %1,%0\;addd %2,%0\";
     }
   if (GET_CODE (operands[2]) == CONST_INT)
     {