aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i860/i860.md
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-12 04:55:12 +0000
committerRichard Stallman <rms@gnu.org>1993-05-12 04:55:12 +0000
commitbd96cb7805f5674f8c582908b43a6a98c2b7f72c (patch)
treee55524628f4e13d8537e34147c0bf8b91b8cdfd5 /gcc/config/i860/i860.md
parent2026444ac9804a075ac6c5e16c1f8d43e9005139 (diff)
downloadgcc-bd96cb7805f5674f8c582908b43a6a98c2b7f72c.zip
gcc-bd96cb7805f5674f8c582908b43a6a98c2b7f72c.tar.gz
gcc-bd96cb7805f5674f8c582908b43a6a98c2b7f72c.tar.bz2
(call, call_value): Copy fn address to safe reg if necessary.
(call, call_value matchers): Use call_insn_operand as predicate. From-SVN: r4429
Diffstat (limited to 'gcc/config/i860/i860.md')
-rw-r--r--gcc/config/i860/i860.md20
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/config/i860/i860.md b/gcc/config/i860/i860.md
index e7226cb..f53b9ce 100644
--- a/gcc/config/i860/i860.md
+++ b/gcc/config/i860/i860.md
@@ -2116,6 +2116,11 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
""
"
{
+ /* Make sure the address is just one reg and will stay that way. */
+ if (! call_insn_operand (operands[0], QImode))
+ operands[0]
+ = change_address (operands[0], VOIDmode,
+ copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
if (INTVAL (operands[1]) > 0)
{
emit_move_insn (arg_pointer_rtx, stack_pointer_rtx);
@@ -2125,7 +2130,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
;;- jump to subroutine
(define_insn ""
- [(call (match_operand:SI 0 "memory_operand" "m")
+ [(call (match_operand:SI 0 "call_insn_operand" "m")
(match_operand 1 "" "i"))]
;; operand[2] is next_arg_register
""
@@ -2158,7 +2163,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
(define_peephole
[(set (match_operand:SI 0 "memory_operand" "=m")
(match_operand:SI 1 "reg_or_0_operand" "rfJ"))
- (call (match_operand:SI 2 "memory_operand" "m")
+ (call (match_operand:SI 2 "call_insn_operand" "m")
(match_operand 3 "" "i"))]
;;- Don't use operand 1 for most machines.
""
@@ -2179,6 +2184,11 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
""
"
{
+ /* Make sure the address is just one reg and will stay that way. */
+ if (! call_insn_operand (operands[1], QImode))
+ operands[1]
+ = change_address (operands[1], VOIDmode,
+ copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
if (INTVAL (operands[2]) > 0)
{
emit_move_insn (arg_pointer_rtx, stack_pointer_rtx);
@@ -2188,7 +2198,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
(define_insn ""
[(set (match_operand 0 "register_operand" "=rf")
- (call (match_operand:SI 1 "memory_operand" "m")
+ (call (match_operand:SI 1 "call_insn_operand" "m")
(match_operand 2 "" "i")))]
;; operand 3 is next_arg_register
""
@@ -2206,7 +2216,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
[(set (match_operand:SI 0 "register_operand" "=rf")
(match_operand:SI 1 "single_insn_src_p" "gfG"))
(set (match_operand 2 "" "=rf")
- (call (match_operand:SI 3 "memory_operand" "m")
+ (call (match_operand:SI 3 "call_insn_operand" "m")
(match_operand 4 "" "i")))]
;;- Don't use operand 4 for most machines.
"! reg_mentioned_p (operands[0], operands[3])"
@@ -2223,7 +2233,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\";
[(set (match_operand:SI 0 "memory_operand" "=m")
(match_operand:SI 1 "reg_or_0_operand" "rJf"))
(set (match_operand 2 "" "=rf")
- (call (match_operand:SI 3 "memory_operand" "m")
+ (call (match_operand:SI 3 "call_insn_operand" "m")
(match_operand 4 "" "i")))]
;;- Don't use operand 4 for most machines.
""