* config/sh/sh.h (LEGITIMATE_PIC_OPERAND_P): Defined.
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Sun, 11 Mar 2001 02:24:17 +0000 (02:24 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Sun, 11 Mar 2001 02:24:17 +0000 (02:24 +0000)
From-SVN: r40384

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

index 767be09b98a209d36bcefd47bd47f53278af345c..972a5c64e0e1dbd6da4018ca66db0b6e48fcfcdd 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-10  kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+       * config/sh/sh.h (LEGITIMATE_PIC_OPERAND_P): Defined.
+
 2001-03-10  Toshiyasu Morita  <toshiyasu.morita@hsa.hitachi.com>
 
        * config/sh/sh.md (umulhisi3_i, mulhisi3_i): Fix mnemonics. 
index 5e18291cf9f2a3f656a455d900736fd91e627607..60f63190da5f7d6615de7b1c7867ae6b3a7f9a29 100644 (file)
@@ -1792,6 +1792,13 @@ do                                                                       \
   }                                                                    \
 while (0)
 
+/* We can't directly access anything that contains a symbol,
+   nor can we indirect via the constant pool.  */
+#define LEGITIMATE_PIC_OPERAND_P(X)                            \
+       (! nonpic_symbol_mentioned_p (X)                        \
+        && (! CONSTANT_POOL_ADDRESS_P (X)                      \
+            || ! nonpic_symbol_mentioned_p (get_pool_constant (X))))
+
 #define SYMBOLIC_CONST_P(X)    \
 ((GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == LABEL_REF)     \
   && nonpic_symbol_mentioned_p (X))