This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: __trunctfsf2 unresolved on alphaev56-dec-osf5.0
- To: Andrew Hobson <ahobson at eng dot mindspring dot net>
- Subject: Re: __trunctfsf2 unresolved on alphaev56-dec-osf5.0
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 27 Jan 2000 20:36:03 -0800
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <kjya9a3mv4.fsf@gamma.eng.mindspring.net>
On Thu, Jan 27, 2000 at 10:18:23PM -0500, Andrew Hobson wrote:
> Unresolved:
> __trunctfsf2
Here's something close. I have a query in to Compaq about functionality
missing from the library needed to get rounding completely correct.
r~
* alpha.md (trunctfsf2): New.
Index: alpha.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/alpha.md,v
retrieving revision 1.106
diff -u -p -d -r1.106 alpha.md
--- alpha.md 2000/01/27 10:17:37 1.106
+++ alpha.md 2000/01/28 04:26:07
@@ -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")