aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/config/floatunsidf.c
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2007-05-19 01:19:51 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2007-05-19 01:19:51 +0000
commit6b834ef156bcf24dcf0e281f57ee5bde03ca07cf (patch)
tree0cb530c9c38af219e6dda2994c078b6b2b9ad853 /contrib/gcc/config/floatunsidf.c
parent9ba78bf6b1135ae200742b2a97ae5bc71c9fd265 (diff)
GCC 4.2.0 release.
Notes
Notes: svn path=/vendor/gcc/dist/; revision=169689
Diffstat (limited to 'contrib/gcc/config/floatunsidf.c')
-rw-r--r--contrib/gcc/config/floatunsidf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/gcc/config/floatunsidf.c b/contrib/gcc/config/floatunsidf.c
new file mode 100644
index 000000000000..ff28112502b7
--- /dev/null
+++ b/contrib/gcc/config/floatunsidf.c
@@ -0,0 +1,15 @@
+/* Public domain. */
+typedef int SItype __attribute__ ((mode (SI)));
+typedef unsigned int USItype __attribute__ ((mode (SI)));
+typedef float DFtype __attribute__ ((mode (DF)));
+
+DFtype
+__floatunsidf (USItype u)
+{
+ SItype s = (SItype) u;
+ DFtype r = (DFtype) s;
+ if (s < 0)
+ r += (DFtype)2.0 * (DFtype) ((USItype) 1
+ << (sizeof (USItype) * __CHAR_BIT__ - 1));
+ return r;
+}