diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2007-03-28 08:39:03 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2007-03-28 08:39:03 +0000 |
commit | 99cd7dd0e611670e5285ad757806d1483e027476 (patch) | |
tree | 540dea2916de9820fb50484cd3db9665ea8f6a14 /gcc | |
parent | e318fc8faba5ae9a6be5bf986b56d9a91815dbbb (diff) | |
download | gcc-99cd7dd0e611670e5285ad757806d1483e027476.zip gcc-99cd7dd0e611670e5285ad757806d1483e027476.tar.gz gcc-99cd7dd0e611670e5285ad757806d1483e027476.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 27 |
2 files changed, 29 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a947007..081cbd5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 19e8402b..3fd6c31 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -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) |