s390.md ("fix_trunc<mode>di2"): New expander.

2007-03-28  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md ("fix_trunc<mode>di2"): New expander.
	("fix_trunc<DFP:mode>di2_dfp"): New insn definition renamed from
	fix_trunc<mode>di2.
	("fixuns_truncdddi2", "fixuns_trunctddi2"): Use 
	fix_trunc<DFP:mode>di2_dfp instead of fix_trunc<mode>di2.
	("fix_truncdfsi2", "fix_truncsfsi2", "fixuns_truncdddi2",
	"fixuns_trunctddi2"): Whitespace fix.

From-SVN: r123291
This commit is contained in:
Andreas Krebbel 2007-03-28 08:39:03 +00:00 committed by Andreas Krebbel
parent e318fc8fab
commit 99cd7dd0e6
2 changed files with 29 additions and 8 deletions

View File

@ -1,3 +1,13 @@
2007-03-28 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md ("fix_trunc<mode>di2"): New expander.
("fix_trunc<DFP:mode>di2_dfp"): New insn definition renamed from
fix_trunc<mode>di2.
("fixuns_truncdddi2", "fixuns_trunctddi2"): Use
fix_trunc<DFP:mode>di2_dfp instead of fix_trunc<mode>di2.
("fix_truncdfsi2", "fix_truncsfsi2", "fixuns_truncdddi2",
"fixuns_trunctddi2"): Whitespace fix.
2007-03-28 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.h (CALL_COOKIE_RET_TRAMP_SHIFT): Move after

View File

@ -3219,11 +3219,11 @@
emit_jump_insn (gen_blt (label1));
emit_insn (gen_subtd3 (temp, temp,
CONST_DOUBLE_FROM_REAL_VALUE (sub, TDmode)));
emit_insn (gen_fix_trunctddi2 (operands[0], temp, GEN_INT(11)));
emit_insn (gen_fix_trunctddi2_dfp (operands[0], temp, GEN_INT (11)));
emit_jump (label2);
emit_label (label1);
emit_insn (gen_fix_truncdddi2 (operands[0], operands[1], GEN_INT(9)));
emit_insn (gen_fix_truncdddi2_dfp (operands[0], operands[1], GEN_INT (9)));
emit_label (label2);
DONE;
})
@ -3247,11 +3247,11 @@
emit_jump_insn (gen_blt (label1));
emit_insn (gen_subtd3 (temp, operands[1],
CONST_DOUBLE_FROM_REAL_VALUE (sub, TDmode)));
emit_insn (gen_fix_trunctddi2 (operands[0], temp, GEN_INT(11)));
emit_insn (gen_fix_trunctddi2_dfp (operands[0], temp, GEN_INT (11)));
emit_jump (label2);
emit_label (label1);
emit_insn (gen_fix_trunctddi2 (operands[0], operands[1], GEN_INT(9)));
emit_insn (gen_fix_trunctddi2_dfp (operands[0], operands[1], GEN_INT (9)));
emit_label (label2);
DONE;
})
@ -3281,12 +3281,12 @@
emit_insn (gen_sub<BFP:mode>3 (temp, operands[1],
CONST_DOUBLE_FROM_REAL_VALUE (sub, <BFP:MODE>mode)));
emit_insn (gen_fix_trunc<BFP:mode><GPR:mode>2_ieee (operands[0], temp,
GEN_INT(7)));
GEN_INT (7)));
emit_jump (label2);
emit_label (label1);
emit_insn (gen_fix_trunc<BFP:mode><GPR:mode>2_ieee (operands[0],
operands[1], GEN_INT(5)));
operands[1], GEN_INT (5)));
emit_label (label2);
DONE;
})
@ -3298,7 +3298,7 @@
{
operands[1] = force_reg (<MODE>mode, operands[1]);
emit_insn (gen_fix_trunc<mode>di2_ieee (operands[0], operands[1],
GEN_INT(5)));
GEN_INT (5)));
DONE;
})
@ -3318,8 +3318,19 @@
; fix_trunc(td|dd)di2 instruction pattern(s).
;
(define_expand "fix_trunc<mode>di2"
[(set (match_operand:DI 0 "register_operand" "")
(fix:DI (match_operand:DFP 1 "nonimmediate_operand" "")))]
"TARGET_64BIT && TARGET_HARD_FLOAT && TARGET_HARD_DFP"
{
operands[1] = force_reg (<MODE>mode, operands[1]);
emit_insn (gen_fix_trunc<mode>di2_dfp (operands[0], operands[1],
GEN_INT (9)));
DONE;
})
; cgxtr, cgdtr
(define_insn "fix_trunc<DFP:mode>di2"
(define_insn "fix_trunc<DFP:mode>di2_dfp"
[(set (match_operand:DI 0 "register_operand" "=d")
(fix:DI (match_operand:DFP 1 "register_operand" "f")))
(unspec:DI [(match_operand:DI 2 "immediate_operand" "K")] UNSPEC_ROUND)