summaryrefslogtreecommitdiff
path: root/lib/builtins/fixunsdfdi.c
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-06 04:33:02 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-06 04:33:02 +0000
commit274ff40dd9cd0d190e714976dc59d8f4e6bc9de1 (patch)
treebe3eb88519f38c2cafd0fe27e3a3b55bbd3dc40d /lib/builtins/fixunsdfdi.c
parentf6701be7d871012c3f521edf6568a16c69d99099 (diff)
builtins: tweak constant spelling
Use 4294967296.f instead of 0x1p32f to fix MSVC. NFC. Patch by Tee Hao Wei! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249374 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/fixunsdfdi.c')
-rw-r--r--lib/builtins/fixunsdfdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/builtins/fixunsdfdi.c b/lib/builtins/fixunsdfdi.c
index 2e0d87eac..4b0bc9e1d 100644
--- a/lib/builtins/fixunsdfdi.c
+++ b/lib/builtins/fixunsdfdi.c
@@ -22,8 +22,8 @@ COMPILER_RT_ABI du_int
__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;
}