From 36185b09460cc80cbf05e55704b1f2637cde76e4 Mon Sep 17 00:00:00 2001 From: stefanf Date: Tue, 21 Jun 2005 21:13:07 +0000 Subject: 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. Approved by: re(dwhite) PR: 73782 --- lib/libc/sparc64/fpu/fpu_qp.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/libc/sparc64/fpu/fpu_qp.c b/lib/libc/sparc64/fpu/fpu_qp.c index e730eba..a5cc00a 100644 --- a/lib/libc/sparc64/fpu/fpu_qp.c +++ b/lib/libc/sparc64/fpu/fpu_qp.c @@ -86,11 +86,12 @@ _Qp_qto ## qname(u_int *c) \ #define FCC_LE(fcc) ((fcc) == FSR_CC_EQ || (fcc) == FSR_CC_LT) #define FCC_LT(fcc) ((fcc) == FSR_CC_LT) #define FCC_NE(fcc) ((fcc) != FSR_CC_EQ) +#define FCC_ID(fcc) (fcc) #define _QP_CMP(name, cmpe, test) \ -int _Qp_f ## name(u_int *a, u_int *b) ; \ +int _Qp_ ## name(u_int *a, u_int *b) ; \ int \ -_Qp_f ## name(u_int *a, u_int *b) \ +_Qp_ ## name(u_int *a, u_int *b) \ { \ struct fpemu fe; \ __asm __volatile("stx %%fsr, %0" : "=m" (fe.fe_fsr) :); \ @@ -137,9 +138,11 @@ _QP_QTOT(x, x, long, &u.a) _QP_QTOT(ui, i, u_int) _QP_QTOT(ux, x, u_long, &u.a) -_QP_CMP(eq, 0, FCC_EQ) -_QP_CMP(ge, 0, FCC_GE) -_QP_CMP(gt, 0, FCC_GT) -_QP_CMP(le, 0, FCC_LE) -_QP_CMP(lt, 0, FCC_LT) -_QP_CMP(ne, 0, FCC_NE) +_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(fne, 0, FCC_NE) +_QP_CMP(cmp, 0, FCC_ID) +_QP_CMP(cmpe, 1, FCC_ID) -- cgit v1.1