DONE;
}")
+;; We can't use the same pattern for these two insns, because then registers
+;; in the address may not be properly reloaded.
+
+(define_insn ""
+ [(call (mem:SI (match_operand:SI 0 "address_operand" "p"))
+ (match_operand 1 "" ""))
+ (clobber (reg:SI 15))]
+ ;;- Do not use operand 1 for most machines.
+ ""
+ "*
+{
+ return \"call %a0,%1%#\";
+}"
+ [(set_attr "type" "call")])
+
(define_insn ""
- [(call (mem:SI (match_operand:SI 0 "call_operand_address" "S,r"))
+ [(call (mem:SI (match_operand:SI 0 "immediate_operand" "i"))
(match_operand 1 "" ""))
(clobber (reg:SI 15))]
;;- Do not use operand 1 for most machines.
;; This is a call that wants a structure value.
(define_insn ""
- [(call (mem:SI (match_operand:SI 0 "call_operand_address" "S,r"))
+ [(call (mem:SI (match_operand:SI 0 "address_operand" "p"))
+ (match_operand 1 "" ""))
+ (match_operand 2 "immediate_operand" "")
+ (clobber (reg:SI 15))]
+ ;;- Do not use operand 1 for most machines.
+ "GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) > 0"
+ "*
+{
+ return \"call %a0,%1\;nop\;unimp %2\";
+}"
+ [(set_attr "type" "call_no_delay_slot")])
+
+;; This is a call that wants a structure value.
+(define_insn ""
+ [(call (mem:SI (match_operand:SI 0 "immediate_operand" "i"))
(match_operand 1 "" ""))
(match_operand 2 "immediate_operand" "")
(clobber (reg:SI 15))]
(define_insn ""
[(set (match_operand 0 "" "=rf")
- (call (mem:SI (match_operand:SI 1 "call_operand_address" "rS"))
+ (call (mem:SI (match_operand:SI 1 "address_operand" "p"))
+ (match_operand 2 "" "")))
+ (clobber (reg:SI 15))]
+ ;;- Do not use operand 2 for most machines.
+ ""
+ "*
+{
+ return \"call %a1,%2%#\";
+}"
+ [(set_attr "type" "call")])
+
+(define_insn ""
+ [(set (match_operand 0 "" "=rf")
+ (call (mem:SI (match_operand:SI 1 "immediate_operand" "i"))
(match_operand 2 "" "")))
(clobber (reg:SI 15))]
;;- Do not use operand 2 for most machines.
;; returns a structure value and expects to skip an unimp instruction.
(define_insn ""
- [(call (mem:SI (match_operand:SI 0 "call_operand_address" "rS"))
+ [(call (mem:SI (match_operand:SI 0 "address_operand" "p"))
+ (const_int 0))
+ (match_operand:DI 1 "memory_operand" "o")
+ (match_operand 2 "" "")
+ (clobber (reg:SI 15))]
+ ""
+ "*
+{
+ operands[2] = adj_offsettable_operand (operands[1], 8);
+ return \"call %a0,0\;nop\;nop\;std %%o0,%1\;st %%f0,%2\";
+}"
+ [(set_attr "type" "multi")])
+
+;; Make a call followed by two nops in case the function being called
+;; returns a structure value and expects to skip an unimp instruction.
+
+(define_insn ""
+ [(call (mem:SI (match_operand:SI 0 "immediate_operand" "i"))
(const_int 0))
(match_operand:DI 1 "memory_operand" "o")
(match_operand 2 "" "")
(define_peephole
[(parallel [(set (match_operand 0 "" "")
- (call (mem:SI (match_operand:SI 1 "call_operand_address" "S,r"))
+ (call (mem:SI (match_operand:SI 1 "call_operand_address" "pi"))
(match_operand 2 "" "")))
(clobber (reg:SI 15))])
(set (pc) (label_ref (match_operand 3 "" "")))]
}")
(define_peephole
- [(parallel [(call (mem:SI (match_operand:SI 0 "call_operand_address" "S,r"))
+ [(parallel [(call (mem:SI (match_operand:SI 0 "call_operand_address" "pi"))
(match_operand 1 "" ""))
(clobber (reg:SI 15))])
(set (pc) (label_ref (match_operand 2 "" "")))]