aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-09 04:57:26 +0000
committerRichard Stallman <rms@gnu.org>1993-05-09 04:57:26 +0000
commit387dc8a86b8686015e626c37896c59215b4777c4 (patch)
treeae6c6c9d2eae4182652de1d95587d213aff3da32 /gcc
parentfee2770d39a87ebacc4537e7536e8a05f6f54f7b (diff)
downloadgcc-387dc8a86b8686015e626c37896c59215b4777c4.zip
gcc-387dc8a86b8686015e626c37896c59215b4777c4.tar.gz
gcc-387dc8a86b8686015e626c37896c59215b4777c4.tar.bz2
(call matchers): Use call_insn_operand.
(call expanders): If address uses a virtual reg or arg pointer reg, copy it. From-SVN: r4394
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.md34
1 files changed, 29 insertions, 5 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index e4d4f67..37e9b6d 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 "" "")]