[PATCH] D13411: Use 4294967296.f instead of 0x1p32f to fix MSVC
angelsl via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 23:47:41 PDT 2015
angelsl updated this revision to Diff 36481.
angelsl added a comment.
Corrections made.
http://reviews.llvm.org/D13411
Files:
lib/builtins/fixunsdfdi.c
lib/builtins/fixunssfdi.c
Index: lib/builtins/fixunssfdi.c
===================================================================
--- lib/builtins/fixunssfdi.c
+++ lib/builtins/fixunssfdi.c
@@ -23,8 +23,8 @@
{
if (a <= 0.0f) return 0;
double da = a;
- su_int high = da/0x1p32f;
- su_int low = da - (double)high*0x1p32f;
+ su_int high = da/4294967296.f; /* da/0x1p32f; */
+ su_int low = da - (double)high*4294967296.f; /* high*0x1p32f; */
return ((du_int)high << 32) | low;
}
Index: lib/builtins/fixunsdfdi.c
===================================================================
--- lib/builtins/fixunsdfdi.c
+++ lib/builtins/fixunsdfdi.c
@@ -22,8 +22,8 @@
__fixunsdfdi(double a)
{
if (a <= 0.0) return 0;
- su_int high = a/0x1p32f;
- su_int low = a - (double)high*0x1p32f;
+ su_int high = a/4294967296.f; /* a/0x1p32f; */
+ su_int low = a - (double)high*4294967296.f; /* high*0x1p32f; */
return ((du_int)high << 32) | low;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13411.36481.patch
Type: text/x-patch
Size: 952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151005/1cef28cf/attachment.bin>
More information about the llvm-commits
mailing list