(call_insn_operand): New funcion.
authorRichard Stallman <rms@gnu.org>
Wed, 12 May 1993 04:55:43 +0000 (04:55 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 12 May 1993 04:55:43 +0000 (04:55 +0000)
From-SVN: r4430

gcc/config/i860/i860.c

index c82c197..0652e08 100644 (file)
@@ -468,6 +468,26 @@ logic_int (op, mode)
 {
   return (GET_CODE (op) == CONST_INT && LOGIC_INT (op));
 }
+
+/* Test for a valid operand for a call instruction.
+   Don't allow the arg pointer register or virtual regs
+   since they may change into reg + const, which the patterns
+   can't handle yet.  */
+
+int
+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
+             && !(REGNO (XEXP (op, 0)) >= FIRST_PSEUDO_REGISTER
+                  && REGNO (XEXP (op, 0)) <= LAST_VIRTUAL_REGISTER))))
+    return 1;
+  return 0;
+}
 \f
 /* Return the best assembler insn template
    for moving operands[1] into operands[0] as a fullword.  */