From: Richard Stallman Date: Sun, 9 May 1993 04:57:26 +0000 (+0000) Subject: (call matchers): Use call_insn_operand. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=387dc8a86b8686015e626c37896c59215b4777c4;p=gcc.git (call matchers): Use call_insn_operand. (call expanders): If address uses a virtual reg or arg pointer reg, copy it. From-SVN: r4394 --- diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index e4d4f67a800..37e9b6d1b04 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3949,10 +3949,15 @@ addr = XEXP (operands[0], 0); if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) XEXP (operands[0], 0) = force_reg (Pmode, addr); + + if (! call_insn_operand (operands[0], QImode)) + operands[0] + = change_address (operands[0], VOIDmode, + copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); }") (define_insn "" - [(call (match_operand:QI 0 "indirect_operand" "m") + [(call (match_operand:QI 0 "call_insn_operand" "m") (match_operand:SI 1 "general_operand" "g")) (set (reg:SI 7) (plus:SI (reg:SI 7) (match_operand:SI 3 "immediate_operand" "i")))] @@ -3993,10 +3998,15 @@ addr = XEXP (operands[0], 0); if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) XEXP (operands[0], 0) = force_reg (Pmode, addr); + + if (! call_insn_operand (operands[0], QImode)) + operands[0] + = change_address (operands[0], VOIDmode, + copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); }") (define_insn "" - [(call (match_operand:QI 0 "indirect_operand" "m") + [(call (match_operand:QI 0 "call_insn_operand" "m") (match_operand:SI 1 "general_operand" "g"))] ;; Operand 1 not used on the i386. "" @@ -4041,11 +4051,16 @@ addr = XEXP (operands[1], 0); if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) XEXP (operands[1], 0) = force_reg (Pmode, addr); + + if (! call_insn_operand (operands[1], QImode)) + operands[1] + = change_address (operands[1], VOIDmode, + copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); }") (define_insn "" [(set (match_operand 0 "" "=rf") - (call (match_operand:QI 1 "indirect_operand" "m") + (call (match_operand:QI 1 "call_insn_operand" "m") (match_operand:SI 2 "general_operand" "g"))) (set (reg:SI 7) (plus:SI (reg:SI 7) (match_operand:SI 4 "immediate_operand" "i")))] @@ -4090,11 +4105,16 @@ addr = XEXP (operands[1], 0); if (GET_CODE (addr) != REG && HALF_PIC_P () && !CONSTANT_ADDRESS_P (addr)) XEXP (operands[1], 0) = force_reg (Pmode, addr); + + if (! call_insn_operand (operands[1], QImode)) + operands[1] + = change_address (operands[1], VOIDmode, + copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); }") (define_insn "" [(set (match_operand 0 "" "=rf") - (call (match_operand:QI 1 "indirect_operand" "m") + (call (match_operand:QI 1 "call_insn_operand" "m") (match_operand:SI 2 "general_operand" "g")))] ;; Operand 2 not used on the i386. "" @@ -4139,10 +4159,14 @@ XEXP (operands[0], 0) = force_reg (Pmode, addr); operands[1] = change_address (operands[1], DImode, XEXP (operands[1], 0)); + if (! call_insn_operand (operands[1], QImode)) + operands[1] + = change_address (operands[1], VOIDmode, + copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); }") (define_insn "" - [(call (match_operand:QI 0 "indirect_operand" "m") + [(call (match_operand:QI 0 "call_insn_operand" "m") (const_int 0)) (match_operand:DI 1 "memory_operand" "o") (match_operand 2 "" "")]