Commit 387dc8a8 by Richard Stallman

(call matchers): Use call_insn_operand.

(call expanders): If address uses a virtual reg or arg pointer reg,
copy it.

From-SVN: r4394
parent fee2770d
......@@ -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 "" "")]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment