@@ -63,9 +63,3 @@ (define_constraint "P"
"An integer in the range -256 to 255."
(and (match_code "const_int")
(match_test "IN_RANGE (ival, -256, 255)")))
-
-;; Extra constraints.
-(define_constraint "Q"
- "@internal"
- (and (match_code "mem")
- (match_code "symbol_ref" "0")))
@@ -1079,12 +1079,19 @@ (define_insn "*branch_false"
;; `SImode', except it is normally a `const_int'); operand 2 is the number of
;; registers used as operands.
-(define_insn "call"
- [(call (match_operand 0 "call_operand" "Qm")
+(define_expand "call"
+ [(parallel [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
+ (match_operand 1 "" "g"))
+ (clobber (reg:SI 17))])]
+ ""
+ " { operands[0] = force_reg (SImode, XEXP (operands[0], 0)); } ")
+
+(define_insn "*call"
+ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
(match_operand 1 "" "g"))
(clobber (reg:SI 17))]
""
- "call%#\\t%0"
+ "call%#\\t@%0"
[(set_attr "delay_type" "delayed")]
)
@@ -1094,14 +1101,21 @@ (define_insn "call"
;; increased by one).
;; Subroutines that return `BLKmode' objects use the `call' insn.
+(define_expand "call_value"
+ [(parallel [(set (match_operand 0 "register_operand" "=r")
+ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
+ (match_operand 2 "" "g")))
+ (clobber (reg:SI 17))])]
+ ""
+ " { operands[1] = force_reg (SImode, XEXP (operands[1], 0)); } ")
-(define_insn "call_value"
+(define_insn "*call_value"
[(set (match_operand 0 "register_operand" "=r")
- (call (match_operand 1 "call_operand" "Qm")
+ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
(match_operand 2 "" "g")))
(clobber (reg:SI 17))]
""
- "call%#\\t%1"
+ "call%#\\t@%1"
[(set_attr "delay_type" "delayed")]
)
@@ -51,16 +51,6 @@ (define_predicate "low_register_operand"
&& REGNO (op) <= 7);
})
-;; Returns true if OP is suitable for use in a CALL insn.
-
-(define_predicate "call_operand"
- (match_code "mem")
-{
- return (GET_CODE (op) == MEM
- && (GET_CODE (XEXP (op, 0)) == SYMBOL_REF
- || GET_CODE (XEXP (op, 0)) == REG));
-})
-
;; Returns TRUE if OP is a valid operand of a DImode operation.
(define_predicate "di_operand"