aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-01-27 20:36:43 -0800
committerRichard Henderson <rth@gcc.gnu.org>2000-01-27 20:36:43 -0800
commit138eff91a262e1006e755e02eafd9c8ce5287721 (patch)
tree682dacdb62607c8d97bc30a1f30be9ace92b2ffe
parent0843179b2ebd7e55d7a640a0fc57c07b632ac645 (diff)
downloadgcc-138eff91a262e1006e755e02eafd9c8ce5287721.zip
gcc-138eff91a262e1006e755e02eafd9c8ce5287721.tar.gz
gcc-138eff91a262e1006e755e02eafd9c8ce5287721.tar.bz2
* alpha.md (trunctfsf2): New.
From-SVN: r31662
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/alpha/alpha.md16
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6397e8b..0dc225f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2000-01-27 Richard Henderson <rth@cygnus.com>
+
+ * alpha.md (trunctfsf2): New.
+
2000-01-27 Andrew Hobson <ahobson@eng.mindspring.net>
* configure.in (alpha-dec-osf5): Enable MASK_SUPPORT_ARCH.
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 4fa6e56..844f830 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -2207,6 +2207,22 @@
"TARGET_HAS_XFLOATING_LIBS"
"alpha_emit_xfloating_cvt (FLOAT_TRUNCATE, operands); DONE;")
+;; ??? This isn't quite right, as rounding isn't correct. But it's
+;; extremely tortureous to do this correctly with the functionality
+;; availible in the library.
+
+(define_expand "trunctfsf2"
+ [(use (match_operand:SF 0 "register_operand" ""))
+ (use (match_operand:TF 1 "general_operand" ""))]
+ "TARGET_HAS_XFLOATING_LIBS"
+ "
+{
+ rtx tmp = gen_reg_rtx (DFmode);
+ emit_insn (gen_trunctfdf2 (tmp, operands[1]));
+ emit_insn (gen_truncdfsf2 (operands[0], tmp));
+ DONE;
+}")
+
(define_insn ""
[(set (match_operand:SF 0 "register_operand" "=&f")
(div:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")