OSDN Git Service

(call_insn_operand): Require constant address be a general_operand.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Jun 1993 22:33:36 +0000 (22:33 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 Jun 1993 22:33:36 +0000 (22:33 +0000)
(expander_call_insn_operand): New fn (what call_insn_operand was).

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

gcc/config/i386/i386.c

index 7aecf5c..d0b1196 100644 (file)
@@ -526,6 +526,26 @@ call_insn_operand (op, mode)
      enum machine_mode mode;
 {
   if (GET_CODE (op) == MEM
+      && ((CONSTANT_ADDRESS_P (XEXP (op, 0))
+          /* This makes a difference for PIC.  */
+          && general_operand (XEXP (op, 0), Pmode))
+         || (GET_CODE (XEXP (op, 0)) == REG
+             && XEXP (op, 0) != arg_pointer_rtx
+             && !(REGNO (XEXP (op, 0)) >= FIRST_PSEUDO_REGISTER
+                  && REGNO (XEXP (op, 0)) <= LAST_VIRTUAL_REGISTER))))
+    return 1;
+  return 0;
+}
+
+/* Like call_insn_operand but allow (mem (symbol_ref ...))
+   even if pic.  */
+
+int
+expander_call_insn_operand (op, mode)
+     rtx op;
+     enum machine_mode mode;
+{
+  if (GET_CODE (op) == MEM
       && (CONSTANT_ADDRESS_P (XEXP (op, 0))
          || (GET_CODE (XEXP (op, 0)) == REG
              && XEXP (op, 0) != arg_pointer_rtx