From 4f2c8ebb159ca57bbea0bc9ec26d0e4621c72d80 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sat, 19 Jun 1993 22:33:36 +0000 Subject: [PATCH] (call_insn_operand): Require constant address be a general_operand. (expander_call_insn_operand): New fn (what call_insn_operand was). From-SVN: r4701 --- gcc/config/i386/i386.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7aecf5c9ecc..d0b11961b7b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -524,6 +524,26 @@ int call_insn_operand (op, mode) rtx op; 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))