aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32/soft-fp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/sparc/sparc32/soft-fp
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'sysdeps/sparc/sparc32/soft-fp')
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/Dist28
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/Makefile20
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/Versions8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_add.c8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_div.c4
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_dtoq.c10
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_itoq.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_lltoq.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_xtoq.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtod.c10
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoi.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoll.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_qtox.c)10
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtos.c10
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtou.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_qtoui.c)6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoull.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_qtoux.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_sqrt.c3
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_stoq.c10
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_sub.c8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_utoq.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_uitoq.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/sfp-machine.h14
20 files changed, 82 insertions, 111 deletions
diff --git a/sysdeps/sparc/sparc32/soft-fp/Dist b/sysdeps/sparc/sparc32/soft-fp/Dist
deleted file mode 100644
index b3c7344889..0000000000
--- a/sysdeps/sparc/sparc32/soft-fp/Dist
+++ /dev/null
@@ -1,28 +0,0 @@
-q_add.c
-q_cmp.c
-q_cmpe.c
-q_div.c
-q_dtoq.c
-q_feq.c
-q_fge.c
-q_fgt.c
-q_fle.c
-q_flt.c
-q_fne.c
-q_itoq.c
-q_mul.c
-q_neg.c
-q_qtod.c
-q_qtoi.c
-q_qtos.c
-q_qtoui.c
-q_qtoux.c
-q_qtox.c
-q_sqrt.c
-q_stoq.c
-q_sub.c
-q_uitoq.c
-q_util.c
-q_uxtoq.c
-q_xtoq.c
-sfp-machine.h
diff --git a/sysdeps/sparc/sparc32/soft-fp/Makefile b/sysdeps/sparc/sparc32/soft-fp/Makefile
index bba9bf7f86..d447b48285 100644
--- a/sysdeps/sparc/sparc32/soft-fp/Makefile
+++ b/sysdeps/sparc/sparc32/soft-fp/Makefile
@@ -1,6 +1,6 @@
# Software floating-point emulation.
# Makefile for SPARC v8 long double utility functions (_Q_*).
-# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jakub Jelinek (jj@ultra.linux.cz).
#
@@ -20,13 +20,11 @@
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
-# Currently gcc does not support TFmode long double on sparc32
-# so these routines are not used.
-#ifeq ($(subdir),soft-fp)
-#sparc32-quad-routines := q_add q_cmp q_cmpe q_div q_dtoq q_feq q_fge \
-# q_fgt q_fle q_flt q_fne q_itoq q_mul q_neg q_qtod q_qtoi \
-# q_qtos q_qtoui q_qtoux q_qtox q_sqrt q_stoq q_sub q_uitoq \
-# q_uxtoq q_xtoq q_util
-#sysdep_routines += $(sparc32-quad-routines)
-#
-#endif
+ifeq ($(subdir),soft-fp)
+sparc32-quad-routines := q_add q_cmp q_cmpe q_div q_dtoq q_feq q_fge \
+ q_fgt q_fle q_flt q_fne q_itoq q_mul q_neg q_qtod q_qtoi \
+ q_qtos q_qtou q_qtoull q_qtoll q_sqrt q_stoq q_sub q_utoq \
+ q_ulltoq q_lltoq q_util
+sysdep_routines += $(sparc32-quad-routines)
+
+endif
diff --git a/sysdeps/sparc/sparc32/soft-fp/Versions b/sysdeps/sparc/sparc32/soft-fp/Versions
new file mode 100644
index 0000000000..6a09249c46
--- /dev/null
+++ b/sysdeps/sparc/sparc32/soft-fp/Versions
@@ -0,0 +1,8 @@
+libc {
+ GLIBC_2.4 {
+ _Q_add; _Q_cmp; _Q_cmpe; _Q_div; _Q_dtoq; _Q_feq; _Q_fge; _Q_fgt;
+ _Q_fle; _Q_flt; _Q_fne; _Q_itoq; _Q_mul; _Q_neg; _Q_qtod; _Q_qtoi;
+ _Q_qtos; _Q_qtou; _Q_qtoull; _Q_qtoll; _Q_sqrt; _Q_stoq; _Q_sub;
+ _Q_utoq; _Q_ulltoq; _Q_lltoq;
+ }
+}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_add.c b/sysdeps/sparc/sparc32/soft-fp/q_add.c
index fb93461593..987c725582 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_add.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_add.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,10 +30,10 @@ long double _Q_add(const long double a, const long double b)
long double c;
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
- FP_UNPACK_Q(B, b);
+ FP_UNPACK_SEMIRAW_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(B, b);
FP_ADD_Q(C, A, B);
- FP_PACK_Q(c, C);
+ FP_PACK_SEMIRAW_Q(c, C);
FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_div.c b/sysdeps/sparc/sparc32/soft-fp/q_div.c
index bb4e697236..86db5ed9e9 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_div.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_div.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -35,5 +35,5 @@ long double _Q_div(const long double a, const long double b)
FP_DIV_Q(C, A, B);
FP_PACK_Q(c, C);
FP_HANDLE_EXCEPTIONS;
- return long double;
+ return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c b/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c
index 5cac5c0840..6b119f4501 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)(a)
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,13 +32,13 @@ long double _Q_dtoq(const double a)
long double c;
FP_INIT_ROUNDMODE;
- FP_UNPACK_D(A, a);
+ FP_UNPACK_RAW_D(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
- FP_CONV(Q,D,4,2,C,A);
+ FP_EXTEND(Q,D,4,2,C,A);
#else
- FP_CONV(Q,D,2,1,C,A);
+ FP_EXTEND(Q,D,2,1,C,A);
#endif
- FP_PACK_Q(c, C);
+ FP_PACK_RAW_Q(c, C);
FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
index 0010b3bcbf..b50942f75f 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)(a)
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,8 +30,8 @@ long double _Q_itoq(const int a)
int b = a;
long double c;
- FP_FROM_INT_Q(C, b, 32, int);
- FP_PACK_Q(c, C);
+ FP_FROM_INT_Q(C, b, 32, unsigned int);
+ FP_PACK_RAW_Q(c, C);
FP_CLEAR_EXCEPTIONS;
FP_HANDLE_EXCEPTIONS;
return c;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_xtoq.c b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
index 867ef27131..f977585e42 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_xtoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)a
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -23,15 +23,15 @@
#include "soft-fp.h"
#include "quad.h"
-long double _Q_xtoq(const long long a)
+long double _Q_lltoq(const long long a)
{
FP_DECL_EX;
FP_DECL_Q(C);
long double c;
long long b = a;
- FP_FROM_INT_Q(C, b, 64, long long);
- FP_PACK_Q(c, C);
+ FP_FROM_INT_Q(C, b, 64, unsigned long long);
+ FP_PACK_RAW_Q(c, C);
FP_CLEAR_EXCEPTIONS;
FP_HANDLE_EXCEPTIONS;
return c;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtod.c b/sysdeps/sparc/sparc32/soft-fp/q_qtod.c
index b0778476b8..82b01ec8a1 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtod.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtod.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (double)a
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,13 +32,13 @@ double _Q_qtod(const long double a)
double r;
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
- FP_CONV(D,Q,2,4,R,A);
+ FP_TRUNC(D,Q,2,4,R,A);
#else
- FP_CONV(D,Q,1,2,R,A);
+ FP_TRUNC(D,Q,1,2,R,A);
#endif
- FP_PACK_D(r, R);
+ FP_PACK_SEMIRAW_D(r, R);
FP_HANDLE_EXCEPTIONS;
return r;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c
index 0440e9abba..270ba9f677 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (int)a
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -28,9 +28,9 @@ int _Q_qtoi(const long double a)
{
FP_DECL_EX;
FP_DECL_Q(A);
- int r;
+ unsigned int r;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_RAW_Q(A, a);
FP_TO_INT_Q(r, A, 32, 1);
FP_HANDLE_EXCEPTIONS;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtox.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c
index 108373328e..e0d29019b3 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtox.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
- Return (long)a
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Return (long long)a
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -24,13 +24,13 @@
#include "soft-fp.h"
#include "quad.h"
-long long _Q_qtox(const long double a)
+long long _Q_qtoll(const long double a)
{
FP_DECL_EX;
FP_DECL_Q(A);
- long long r;
+ unsigned long long r;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_RAW_Q(A, a);
FP_TO_INT_Q(r, A, 64, 1);
FP_HANDLE_EXCEPTIONS;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtos.c b/sysdeps/sparc/sparc32/soft-fp/q_qtos.c
index 31c8d6ac82..93daa23cac 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtos.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtos.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (float)a
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -32,13 +32,13 @@ float _Q_qtos(const long double a)
float r;
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
- FP_CONV(S,Q,1,4,R,A);
+ FP_TRUNC(S,Q,1,4,R,A);
#else
- FP_CONV(S,Q,1,2,R,A);
+ FP_TRUNC(S,Q,1,2,R,A);
#endif
- FP_PACK_S(r, R);
+ FP_PACK_SEMIRAW_S(r, R);
FP_HANDLE_EXCEPTIONS;
return r;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoui.c b/sysdeps/sparc/sparc32/soft-fp/q_qtou.c
index bdbf052e09..812b4e06ea 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoui.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtou.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (unsigned int)a
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -24,13 +24,13 @@
#include "soft-fp.h"
#include "quad.h"
-unsigned int _Q_qtoui(const long double a)
+unsigned int _Q_qtou(const long double a)
{
FP_DECL_EX;
FP_DECL_Q(A);
unsigned int r;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_RAW_Q(A, a);
FP_TO_INT_Q(r, A, 32, -1);
FP_HANDLE_EXCEPTIONS;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoux.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c
index 3e6d40f220..7a88c9f382 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoux.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
- Return (unsigned long)a
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Return (unsigned long long)a
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -24,13 +24,13 @@
#include "soft-fp.h"
#include "quad.h"
-unsigned long long _Q_qtoux(const long double a)
+unsigned long long _Q_qtoull(const long double a)
{
FP_DECL_EX;
FP_DECL_Q(A);
unsigned long long r;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_RAW_Q(A, a);
FP_TO_INT_Q(r, A, 64, -1);
FP_HANDLE_EXCEPTIONS;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c b/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c
index 7516ed7c5c..373d02a639 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return sqrtl(a)
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -36,3 +36,4 @@ long double _Q_sqrt(const long double a)
FP_HANDLE_EXCEPTIONS;
return c;
}
+strong_alias (_Q_sqrt, __ieee754_sqrtl);
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_stoq.c b/sysdeps/sparc/sparc32/soft-fp/q_stoq.c
index 98609faf20..714d880dd7 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_stoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_stoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
c = (long double)(a)
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -31,13 +31,13 @@ long double _Q_stoq(const float a)
FP_DECL_Q(C);
long double c;
- FP_UNPACK_S(A, a);
+ FP_UNPACK_RAW_S(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
- FP_CONV(Q,S,4,1,C,A);
+ FP_EXTEND(Q,S,4,1,C,A);
#else
- FP_CONV(Q,S,2,1,C,A);
+ FP_EXTEND(Q,S,2,1,C,A);
#endif
- FP_PACK_Q(c, C);
+ FP_PACK_RAW_Q(c, C);
FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_sub.c b/sysdeps/sparc/sparc32/soft-fp/q_sub.c
index 1987aea480..8616727bb1 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_sub.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_sub.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
c = a - b
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -30,10 +30,10 @@ long double _Q_sub(const long double a, const long double b)
long double c;
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
- FP_UNPACK_Q(B, b);
+ FP_UNPACK_SEMIRAW_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(B, b);
FP_SUB_Q(C, A, B);
- FP_PACK_Q(c, C);
+ FP_PACK_SEMIRAW_Q(c, C);
FP_HANDLE_EXCEPTIONS;
return c;
}
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
index 8944e9614d..53c0add2d8 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return (long double)(a)
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -23,15 +23,15 @@
#include "soft-fp.h"
#include "quad.h"
-long double _Q_uxtoq(const unsigned long long a)
+long double _Q_ulltoq(const unsigned long long a)
{
FP_DECL_EX;
FP_DECL_Q(C);
long double c;
unsigned long long b = a;
- FP_FROM_INT_Q(C, b, 64, long long);
- FP_PACK_Q(c, C);
+ FP_FROM_INT_Q(C, b, 64, unsigned long long);
+ FP_PACK_RAW_Q(c, C);
FP_CLEAR_EXCEPTIONS;
FP_HANDLE_EXCEPTIONS;
return c;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_uitoq.c b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
index b716fabde2..f902bf8397 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_uitoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
c = (long double)(a)
- Copyright (C) 1997,1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -23,15 +23,15 @@
#include "soft-fp.h"
#include "quad.h"
-long double _Q_uitoq(const unsigned int a)
+long double _Q_utoq(const unsigned int a)
{
FP_DECL_EX;
FP_DECL_Q(C);
long double c;
unsigned int b = a;
- FP_FROM_INT_Q(C, b, 32, int);
- FP_PACK_Q(c, C);
+ FP_FROM_INT_Q(C, b, 32, unsigned int);
+ FP_PACK_RAW_Q(c, C);
FP_CLEAR_EXCEPTIONS;
FP_HANDLE_EXCEPTIONS;
return c;
diff --git a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
index 40bcbb4762..f1211705ef 100644
--- a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
+++ b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent software floating-point definitions.
Sparc userland (_Q_*) version.
- Copyright (C) 1997,1998,1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999, 2002, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz) and
@@ -22,6 +22,7 @@
02111-1307 USA. */
#include <fpu_control.h>
+#include <stdlib.h>
#define _FP_W_TYPE_SIZE 32
#define _FP_W_TYPE unsigned long
@@ -208,14 +209,5 @@ do { \
" : : "r" (___Q_numbers) : "f30"); \
} \
else \
- { \
- __asm__ __volatile__("\
- mov %0, %%o0\n\
- mov %%o7, %%g1\n\
- call ___Q_simulate_exceptions\n\
- mov %%g1, %%o7\
- " : : "r" (_fex) : \
- "g1", "g2", "g3", "g4", "g5", "o0", \
- "o1", "o2", "o3", "o4", "o5", "cc"); \
- } \
+ ___Q_simulate_exceptions (_fex); \
} while (0)