This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc's soft-fp as canonical home for more files


On Thu, 10 Oct 2013, Joseph S. Myers wrote:

> Here are two patches to bring these files over from libgcc, the first
> copying the files verbatim and the second making the copyright and
> license notices match current glibc practice.  (Presume that
> <https://sourceware.org/ml/libc-alpha/2013-10/msg00353.html> would
> also be updated to cover the new files.)

And here is the corresponding patch to that one for the new files,
making them initialize the required state.

2013-10-10  Joseph Myers  <joseph@codesourcery.com>

	* soft-fp/fixdfti.c (__fixdfti): Use FP_INIT_EXCEPTIONS.
	* soft-fp/fixsfti.c (__fixsfti): Likewise.
	* soft-fp/fixtfti.c (__fixtfti): Likewise.
	* soft-fp/fixunsdfti.c (__fixunsdfti): Likewise.
	* soft-fp/fixunssfti.c (__fixunssfti): Likewise.
	* soft-fp/fixunstfti.c (__fixunstfti): Likewise.
	* soft-fp/floattidf.c (__floattidf): Use FP_INIT_ROUNDMODE.
	* soft-fp/floattisf.c (__floattisf): Likewise.
	* soft-fp/floattitf.c (__floattitf): Likewise.
	* soft-fp/floatuntidf.c (__floatuntidf): Likewise.
	* soft-fp/floatuntisf.c (__floatuntisf): Likewise.
	* soft-fp/floatuntitf.c (__floatuntitf): Likewise.

diff --git a/soft-fp/fixdfti.c b/soft-fp/fixdfti.c
index a108c67..0b82377 100644
--- a/soft-fp/fixdfti.c
+++ b/soft-fp/fixdfti.c
@@ -36,6 +36,7 @@ TItype __fixdfti(DFtype a)
   FP_DECL_D(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, TI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixsfti.c b/soft-fp/fixsfti.c
index c65561d..84f898b 100644
--- a/soft-fp/fixsfti.c
+++ b/soft-fp/fixsfti.c
@@ -36,6 +36,7 @@ TItype __fixsfti(SFtype a)
   FP_DECL_S(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, TI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixtfti.c b/soft-fp/fixtfti.c
index 44fe147..f65d739 100644
--- a/soft-fp/fixtfti.c
+++ b/soft-fp/fixtfti.c
@@ -36,6 +36,7 @@ TItype __fixtfti(TFtype a)
   FP_DECL_Q(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, TI_BITS, 1);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunsdfti.c b/soft-fp/fixunsdfti.c
index a64e0bd..653f3ee 100644
--- a/soft-fp/fixunsdfti.c
+++ b/soft-fp/fixunsdfti.c
@@ -36,6 +36,7 @@ UTItype __fixunsdfti(DFtype a)
   FP_DECL_D(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_D(A, a);
   FP_TO_INT_D(r, A, TI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunssfti.c b/soft-fp/fixunssfti.c
index ae96b30..20b07e9 100644
--- a/soft-fp/fixunssfti.c
+++ b/soft-fp/fixunssfti.c
@@ -36,6 +36,7 @@ UTItype __fixunssfti(SFtype a)
   FP_DECL_S(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_S(A, a);
   FP_TO_INT_S(r, A, TI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/fixunstfti.c b/soft-fp/fixunstfti.c
index b89e1cc..1a959aa 100644
--- a/soft-fp/fixunstfti.c
+++ b/soft-fp/fixunstfti.c
@@ -36,6 +36,7 @@ UTItype __fixunstfti(TFtype a)
   FP_DECL_Q(A);
   UTItype r;
 
+  FP_INIT_EXCEPTIONS;
   FP_UNPACK_RAW_Q(A, a);
   FP_TO_INT_Q(r, A, TI_BITS, 0);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floattidf.c b/soft-fp/floattidf.c
index 778904e..aad11cb 100644
--- a/soft-fp/floattidf.c
+++ b/soft-fp/floattidf.c
@@ -36,6 +36,7 @@ DFtype __floattidf(TItype i)
   FP_DECL_D(A);
   DFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_D(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_D(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floattisf.c b/soft-fp/floattisf.c
index 03ed1e2..dd932af 100644
--- a/soft-fp/floattisf.c
+++ b/soft-fp/floattisf.c
@@ -36,6 +36,7 @@ SFtype __floattisf(TItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floattitf.c b/soft-fp/floattitf.c
index fdfad61..40e66b3 100644
--- a/soft-fp/floattitf.c
+++ b/soft-fp/floattitf.c
@@ -36,6 +36,7 @@ TFtype __floattitf(TItype i)
   FP_DECL_Q(A);
   TFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_Q(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_Q(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatuntidf.c b/soft-fp/floatuntidf.c
index d533563..ec9a41c 100644
--- a/soft-fp/floatuntidf.c
+++ b/soft-fp/floatuntidf.c
@@ -36,6 +36,7 @@ DFtype __floatuntidf(UTItype i)
   FP_DECL_D(A);
   DFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_D(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_D(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatuntisf.c b/soft-fp/floatuntisf.c
index f0ae352..d70b025 100644
--- a/soft-fp/floatuntisf.c
+++ b/soft-fp/floatuntisf.c
@@ -36,6 +36,7 @@ SFtype __floatuntisf(UTItype i)
   FP_DECL_S(A);
   SFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_S(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_S(a, A);
   FP_HANDLE_EXCEPTIONS;
diff --git a/soft-fp/floatuntitf.c b/soft-fp/floatuntitf.c
index b7beb03..ee278eb 100644
--- a/soft-fp/floatuntitf.c
+++ b/soft-fp/floatuntitf.c
@@ -36,6 +36,7 @@ TFtype __floatuntitf(UTItype i)
   FP_DECL_Q(A);
   TFtype a;
 
+  FP_INIT_ROUNDMODE;
   FP_FROM_INT_Q(A, i, TI_BITS, UTItype);
   FP_PACK_RAW_Q(a, A);
   FP_HANDLE_EXCEPTIONS;

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]