(LEGITIMATE_PIC_OPERAND_P): Reject CONST_DOUBLE with MEM with invalid
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 26 Jul 1995 12:03:31 +0000 (08:03 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 26 Jul 1995 12:03:31 +0000 (08:03 -0400)
pic address.

From-SVN: r10156

gcc/config/m68k/hp320.h
gcc/config/m68k/m68k.h

index a00917d1d58d1c0d193abe0fecd824e68ca6566d..f748f3fde13d32f5b8c179b52af1d961f1cd560e 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  HP-UX 68000/68020 version.
-   Copyright (C) 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1993, 1994, 1995 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -595,12 +595,16 @@ do { register int i;                      \
           (LABEL_NO));
 
 #endif /* not HPUX_ASM */
+
 /* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an
    operand of a function call. */
 #undef LEGITIMATE_PIC_OPERAND_P
 #define LEGITIMATE_PIC_OPERAND_P(X) \
-  (! symbolic_operand (X, VOIDmode) \
-   || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X)))
+  ((! symbolic_operand (X, VOIDmode) \
+    && ! (GET_CODE (X) == CONST_DOUBLE && CONST_DOUBLE_MEM (X) \
+         && GET_CODE (CONST_DOUBLE_MEM (X)) == MEM             \
+         && symbolic_operand (XEXP (CONST_DOUBLE_MEM (X), 0), VOIDmode))) \
+   || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)))
 
 /* hpux8 and later have C++ compatible include files, so do not
    pretend they are `extern "C"'.  */
index 5f268001bff756544a0148160d298d6e31f9d7ca..e54bee36d1ac04be2acd22301eada3d4f600f943 100644 (file)
@@ -1080,7 +1080,10 @@ __transfer_from_trampoline ()                                    \
    that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
 
 #define LEGITIMATE_PIC_OPERAND_P(X)    \
-  (! symbolic_operand (X, VOIDmode))
+  (! symbolic_operand (X, VOIDmode)                            \
+   && ! (GET_CODE (X) == CONST_DOUBLE && CONST_DOUBLE_MEM (X)  \
+        && GET_CODE (CONST_DOUBLE_MEM (X)) == MEM              \
+        && symbolic_operand (XEXP (CONST_DOUBLE_MEM (X), 0), VOIDmode)))
 
 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
    and check its validity for a certain class.