about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/soft-fp
diff options
context:
space:
mode:
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_qtod.c10
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoi.c6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtos.c10
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoui.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_qtou.c)6
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtoux.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_qtoull.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_qtox.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_qtoll.c)10
-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_uitoq.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_utoq.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/q_xtoq.c (renamed from sysdeps/sparc/sparc32/soft-fp/q_lltoq.c)8
-rw-r--r--sysdeps/sparc/sparc32/soft-fp/sfp-machine.h14
20 files changed, 111 insertions, 82 deletions
diff --git a/sysdeps/sparc/sparc32/soft-fp/Dist b/sysdeps/sparc/sparc32/soft-fp/Dist
new file mode 100644
index 0000000000..b3c7344889
--- /dev/null
+++ b/sysdeps/sparc/sparc32/soft-fp/Dist
@@ -0,0 +1,28 @@
+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 d447b48285..bba9bf7f86 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, 2006 Free Software Foundation, Inc.
+#  Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 #  This file is part of the GNU C Library.
 #  Contributed by Jakub Jelinek (jj@ultra.linux.cz).
 #
@@ -20,11 +20,13 @@
 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 # 02111-1307 USA.
 
-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
+#  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
diff --git a/sysdeps/sparc/sparc32/soft-fp/Versions b/sysdeps/sparc/sparc32/soft-fp/Versions
deleted file mode 100644
index 6a09249c46..0000000000
--- a/sysdeps/sparc/sparc32/soft-fp/Versions
+++ /dev/null
@@ -1,8 +0,0 @@
-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 987c725582..fb93461593 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_SEMIRAW_Q(A, a);
-  FP_UNPACK_SEMIRAW_Q(B, b);
+  FP_UNPACK_Q(A, a);
+  FP_UNPACK_Q(B, b);
   FP_ADD_Q(C, A, B);
-  FP_PACK_SEMIRAW_Q(c, C);
+  FP_PACK_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 86db5ed9e9..bb4e697236 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, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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 c;
+  return long double;
 }
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c b/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c
index 6b119f4501..5cac5c0840 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_RAW_D(A, a);
+  FP_UNPACK_D(A, a);
 #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
-  FP_EXTEND(Q,D,4,2,C,A);
+  FP_CONV(Q,D,4,2,C,A);
 #else
-  FP_EXTEND(Q,D,2,1,C,A);
+  FP_CONV(Q,D,2,1,C,A);
 #endif
-  FP_PACK_RAW_Q(c, C);
+  FP_PACK_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 b50942f75f..0010b3bcbf 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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, unsigned int);
-  FP_PACK_RAW_Q(c, C);
+  FP_FROM_INT_Q(C, b, 32, int);
+  FP_PACK_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 82b01ec8a1..b0778476b8 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_SEMIRAW_Q(A, a);
+  FP_UNPACK_Q(A, a);
 #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
-  FP_TRUNC(D,Q,2,4,R,A);
+  FP_CONV(D,Q,2,4,R,A);
 #else
-  FP_TRUNC(D,Q,1,2,R,A);
+  FP_CONV(D,Q,1,2,R,A);
 #endif
-  FP_PACK_SEMIRAW_D(r, R);
+  FP_PACK_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 270ba9f677..0440e9abba 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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);
-  unsigned int r;
+  int r;
 
-  FP_UNPACK_RAW_Q(A, a);
+  FP_UNPACK_Q(A, a);
   FP_TO_INT_Q(r, A, 32, 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 93daa23cac..31c8d6ac82 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_SEMIRAW_Q(A, a);
+  FP_UNPACK_Q(A, a);
 #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
-  FP_TRUNC(S,Q,1,4,R,A);
+  FP_CONV(S,Q,1,4,R,A);
 #else
-  FP_TRUNC(S,Q,1,2,R,A);
+  FP_CONV(S,Q,1,2,R,A);
 #endif
-  FP_PACK_SEMIRAW_S(r, R);
+  FP_PACK_S(r, R);
   FP_HANDLE_EXCEPTIONS;
 
   return r;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtou.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoui.c
index 812b4e06ea..bdbf052e09 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtou.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoui.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return (unsigned int)a
-   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_qtou(const long double a)
+unsigned int _Q_qtoui(const long double a)
 {
   FP_DECL_EX;
   FP_DECL_Q(A);
   unsigned int r;
 
-  FP_UNPACK_RAW_Q(A, a);
+  FP_UNPACK_Q(A, a);
   FP_TO_INT_Q(r, A, 32, -1);
   FP_HANDLE_EXCEPTIONS;
 
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoux.c
index 7a88c9f382..3e6d40f220 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoux.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
-   Return (unsigned long long)a
-   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   Return (unsigned long)a
+   Copyright (C) 1997,1999 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_qtoull(const long double a)
+unsigned long long _Q_qtoux(const long double a)
 {
   FP_DECL_EX;
   FP_DECL_Q(A);
   unsigned long long r;
 
-  FP_UNPACK_RAW_Q(A, a);
+  FP_UNPACK_Q(A, a);
   FP_TO_INT_Q(r, A, 64, -1);
   FP_HANDLE_EXCEPTIONS;
 
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c b/sysdeps/sparc/sparc32/soft-fp/q_qtox.c
index e0d29019b3..108373328e 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_qtox.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
-   Return (long long)a
-   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   Return (long)a
+   Copyright (C) 1997,1999 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_qtoll(const long double a)
+long long _Q_qtox(const long double a)
 {
   FP_DECL_EX;
   FP_DECL_Q(A);
-  unsigned long long r;
+  long long r;
 
-  FP_UNPACK_RAW_Q(A, a);
+  FP_UNPACK_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 373d02a639..7516ed7c5c 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, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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,4 +36,3 @@ 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 714d880dd7..98609faf20 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_RAW_S(A, a);
+  FP_UNPACK_S(A, a);
 #if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
-  FP_EXTEND(Q,S,4,1,C,A);
+  FP_CONV(Q,S,4,1,C,A);
 #else
-  FP_EXTEND(Q,S,2,1,C,A);
+  FP_CONV(Q,S,2,1,C,A);
 #endif
-  FP_PACK_RAW_Q(c, C);
+  FP_PACK_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 8616727bb1..1987aea480 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,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_SEMIRAW_Q(A, a);
-  FP_UNPACK_SEMIRAW_Q(B, b);
+  FP_UNPACK_Q(A, a);
+  FP_UNPACK_Q(B, b);
   FP_SUB_Q(C, A, B);
-  FP_PACK_SEMIRAW_Q(c, C);
+  FP_PACK_Q(c, C);
   FP_HANDLE_EXCEPTIONS;
   return c;
 }
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c b/sysdeps/sparc/sparc32/soft-fp/q_uitoq.c
index f902bf8397..b716fabde2 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_uitoq.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    c = (long double)(a)
-   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_utoq(const unsigned int a)
+long double _Q_uitoq(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, unsigned int);
-  FP_PACK_RAW_Q(c, C);
+  FP_FROM_INT_Q(C, b, 32, int);
+  FP_PACK_Q(c, C);
   FP_CLEAR_EXCEPTIONS;
   FP_HANDLE_EXCEPTIONS;
   return c;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c
index 53c0add2d8..8944e9614d 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return (long double)(a)
-   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_ulltoq(const unsigned long long a)
+long double _Q_uxtoq(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, unsigned long long);
-  FP_PACK_RAW_Q(c, C);
+  FP_FROM_INT_Q(C, b, 64, long long);
+  FP_PACK_Q(c, C);
   FP_CLEAR_EXCEPTIONS;
   FP_HANDLE_EXCEPTIONS;
   return c;
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_xtoq.c
index f977585e42..867ef27131 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_xtoq.c
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return (long double)a
-   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999 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_lltoq(const long long a)
+long double _Q_xtoq(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, unsigned long long);
-  FP_PACK_RAW_Q(c, C);
+  FP_FROM_INT_Q(C, b, 64, long long);
+  FP_PACK_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 f1211705ef..40bcbb4762 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, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,1999, 2002 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,7 +22,6 @@
    02111-1307 USA.  */
 
 #include <fpu_control.h>
-#include <stdlib.h>
 
 #define _FP_W_TYPE_SIZE		32
 #define _FP_W_TYPE		unsigned long
@@ -209,5 +208,14 @@ do {								\
       	" : : "r" (___Q_numbers) : "f30");			\
     }								\
   else								\
-    ___Q_simulate_exceptions (_fex);			        \
+    {								\
+      __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");			\
+    }								\
 } while (0)