(const_int 32))))
(clobber (match_scratch:SI 3 "=a"))
(clobber (reg:CC 17))]
- "!TARGET_64BIT"
+ ""
+ "mul{l}\\t%2"
+ [(set_attr "type" "imul")
+ (set_attr "ppro_uops" "few")
+ (set_attr "length_immediate" "0")
+ (set_attr "mode" "SI")])
+
+(define_insn "*umulsi3_highpart_zext"
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (zero_extend:DI (truncate:SI
+ (lshiftrt:DI
+ (mult:DI (zero_extend:DI
+ (match_operand:SI 1 "register_operand" "%a"))
+ (zero_extend:DI
+ (match_operand:SI 2 "nonimmediate_operand" "rm")))
+ (const_int 32)))))
+ (clobber (match_scratch:SI 3 "=a"))
+ (clobber (reg:CC 17))]
+ "TARGET_64BIT"
"mul{l}\\t%2"
[(set_attr "type" "imul")
(set_attr "ppro_uops" "few")
{
if (operands[3] == const0_rtx)
{
- emit_insn (gen_call (operands[0], operands[1]));
+ emit_insn (gen_call (operands[0], operands[1], constm1_rtx));
DONE;
}
/* Static functions and indirect calls don't need
(define_expand "call"
[(call (match_operand:QI 0 "" "")
- (match_operand:SI 1 "" ""))]
+ (match_operand 2 "" ""))]
;; Operand 1 not used on the i386.
""
"
&& GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF
&& ! SYMBOL_REF_FLAG (XEXP (operands[0], 0)))
current_function_uses_pic_offset_table = 1;
+
if (! call_insn_operand (XEXP (operands[0], 0), Pmode))
XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
+ if (TARGET_64BIT && INTVAL (operands[2]) >= 0)
+ {
+ rtx insn;
+ rtx reg = gen_rtx_REG (QImode, 0);
+ emit_move_insn (reg, operands[2]);
+ insn = emit_call_insn (gen_call_exp (operands[0], operands[2]));
+ use_reg (&CALL_INSN_FUNCTION_USAGE (insn), reg);
+ DONE;
+ }
}")
+(define_expand "call_exp"
+ [(call (match_operand:QI 0 "" "")
+ (match_operand 1 "" ""))]
+ ""
+ "")
+
(define_insn "*call_0"
- [(call (mem:QI (match_operand:SI 0 "constant_call_address_operand" ""))
- (match_operand:SI 1 "" ""))]
+ [(call (mem:QI (match_operand 0 "constant_call_address_operand" ""))
+ (match_operand 1 "" ""))]
""
"*
{
(define_insn "*call_1"
[(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm"))
- (match_operand:SI 1 "" ""))]
- ""
+ (match_operand 1 "" ""))]
+ "TARGET_64BIT"
+ "*
+{
+ if (constant_call_address_operand (operands[0], QImode))
+ {
+ if (SIBLING_CALL_P (insn))
+ return \"jmp\\t%P0\";
+ else
+ return \"call\\t%P0\";
+ }
+ if (SIBLING_CALL_P (insn))
+ return \"jmp\\t%A0\";
+ else
+ return \"call\\t%A0\";
+}"
+ [(set_attr "type" "call")])
+
+(define_insn "*call_1_rex64"
+ [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rsm"))
+ (match_operand 1 "" ""))]
+ "!TARGET_64BIT"
"*
{
if (constant_call_address_operand (operands[0], QImode))
{
if (operands[4] == const0_rtx)
{
- emit_insn (gen_call_value (operands[0], operands[1], operands[2]));
+ emit_insn (gen_call_value (operands[0], operands[1], operands[2],
+ constm1_rtx));
DONE;
}
/* Static functions and indirect calls don't need
(define_expand "call_value"
[(set (match_operand 0 "" "")
(call (match_operand:QI 1 "" "")
- (match_operand:SI 2 "" "")))]
+ (match_operand:SI 3 "" "")))]
;; Operand 2 not used on the i386.
""
"
current_function_uses_pic_offset_table = 1;
if (! call_insn_operand (XEXP (operands[1], 0), Pmode))
XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
+ if (TARGET_64BIT && INTVAL (operands[3]) >= 0)
+ {
+ rtx insn;
+ rtx reg = gen_rtx_REG (QImode, 0);
+ emit_move_insn (reg, operands[3]);
+ insn = emit_call_insn (gen_call_value_exp (operands[0], operands[1],
+ operands[3]));
+ use_reg (&CALL_INSN_FUNCTION_USAGE (insn), reg);
+ DONE;
+ }
}")
+(define_expand "call_value_exp"
+ [(set (match_operand 0 "" "")
+ (call (match_operand:QI 1 "" "")
+ (match_operand:SI 2 "" "")))]
+ ""
+ "")
+
;; Call subroutine returning any type.
(define_expand "untyped_call"
emit_call_insn (TARGET_80387
? gen_call_value (gen_rtx_REG (XCmode, FIRST_FLOAT_REG),
- operands[0], const0_rtx)
- : gen_call (operands[0], const0_rtx));
+ operands[0], const0_rtx,
+ GEN_INT (SSE_REGPARM_MAX - 1))
+ : gen_call (operands[0], const0_rtx,
+ GEN_INT (SSE_REGPARM_MAX - 1)));
for (i = 0; i < XVECLEN (operands[2], 0); i++)
{
(plus:SI (match_operand:SI 1 "symbolic_operand" "")
(minus:SI (pc) (match_operand 2 "" ""))))] 1))
(clobber (reg:CC 17))]
- ""
+ "!TARGET_64BIT"
"*
{
if (GET_CODE (operands[2]) == LABEL_REF)
[(set (match_operand 0 "" "")
(call (mem:QI (match_operand:SI 1 "constant_call_address_operand" ""))
(match_operand:SI 2 "" "")))]
- ""
+ "!TARGET_64BIT"
+ "*
+{
+ if (SIBLING_CALL_P (insn))
+ return \"jmp\\t%P1\";
+ else
+ return \"call\\t%P1\";
+}"
+ [(set_attr "type" "callv")])
+
+(define_insn "*call_value_0_rex64"
+ [(set (match_operand 0 "" "")
+ (call (mem:QI (match_operand:DI 1 "constant_call_address_operand" ""))
+ (match_operand:DI 2 "const_int_operand" "")))]
+ "TARGET_64BIT"
"*
{
if (SIBLING_CALL_P (insn))
[(set (match_operand 0 "" "")
(call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm"))
(match_operand:SI 2 "" "")))]
- ""
+ "!TARGET_64BIT"
+ "*
+{
+ if (constant_call_address_operand (operands[1], QImode))
+ {
+ if (SIBLING_CALL_P (insn))
+ return \"jmp\\t%P1\";
+ else
+ return \"call\\t%P1\";
+ }
+ if (SIBLING_CALL_P (insn))
+ return \"jmp\\t%*%1\";
+ else
+ return \"call\\t%*%1\";
+}"
+ [(set_attr "type" "callv")])
+
+(define_insn "*call_value_1_rex64"
+ [(set (match_operand 0 "" "")
+ (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rsm"))
+ (match_operand:DI 2 "" "")))]
+ "TARGET_64BIT"
"*
{
if (constant_call_address_operand (operands[1], QImode))