cvs commit: src/lib/libc/sparc64/fpu fpu_qp.c

Stefan Farfeleder stefan at fafoe.narf.at
Thu Jun 23 08:17:57 GMT 2005


On Wed, Jun 22, 2005 at 08:28:02PM +0200, Marius Strobl wrote:
> On Tue, Jun 21, 2005 at 09:13:07PM +0000, Stefan Farfeleder wrote:
> > stefanf     2005-06-21 21:13:07 UTC
> > 
> >   Add the functions _Qp_cmp() and _Qp_cmpe() as described in the Sparc
> >   Compliance Definition.  On sparc64, GCC emits _Qp_cmp() calls for its
> >   __builtin_isfoo() functions which are used for C99's isfoo() macros.
> 
> Thanks!

You're welcome.  Another issue is that the SCD states ``Exceptions mimic
fcmpeq.'' for _Qp_{fge,fgt,fle,flt}().  This means they should set the
cmpe flag when calling __fpu_compare().

Index: fpu_qp.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/sparc64/fpu/fpu_qp.c,v
retrieving revision 1.7
diff -I.svn -u -r1.7 fpu_qp.c
--- fpu_qp.c	21 Jun 2005 21:13:07 -0000	1.7
+++ fpu_qp.c	23 Jun 2005 08:06:01 -0000
@@ -139,10 +139,10 @@
 _QP_QTOT(ux,	x,	u_long,	&u.a)
 
 _QP_CMP(feq,	0,	FCC_EQ)
-_QP_CMP(fge,	0,	FCC_GE)
-_QP_CMP(fgt,	0,	FCC_GT)
-_QP_CMP(fle,	0,	FCC_LE)
-_QP_CMP(flt,	0,	FCC_LT)
+_QP_CMP(fge,	1,	FCC_GE)
+_QP_CMP(fgt,	1,	FCC_GT)
+_QP_CMP(fle,	1,	FCC_LE)
+_QP_CMP(flt,	1,	FCC_LT)
 _QP_CMP(fne,	0, 	FCC_NE)
 _QP_CMP(cmp,	0, 	FCC_ID)
 _QP_CMP(cmpe,	1, 	FCC_ID)

Stefan


More information about the cvs-all mailing list