summaryrefslogtreecommitdiffstats
path: root/compiler-rt
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
commit4c81f0a1bed040351ef45c82e28653ff98f267c3 (patch)
treeb016834714404178894f33de053182b29df6f67a /compiler-rt
parent89a92b9fb256a22c68b8f5efbc6feb3ef2876b1d (diff)
downloadbcm5719-llvm-4c81f0a1bed040351ef45c82e28653ff98f267c3.tar.gz
bcm5719-llvm-4c81f0a1bed040351ef45c82e28653ff98f267c3.zip
builtins: tweak constant spelling
Use 4294967296.f instead of 0x1p32f to fix MSVC. NFC. Patch by Tee Hao Wei! llvm-svn: 249374
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/builtins/fixunsdfdi.c4
-rw-r--r--compiler-rt/lib/builtins/fixunssfdi.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/builtins/fixunsdfdi.c b/compiler-rt/lib/builtins/fixunsdfdi.c
index 2e0d87eacf0..4b0bc9e1d05 100644
--- a/compiler-rt/lib/builtins/fixunsdfdi.c
+++ b/compiler-rt/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;
}
diff --git a/compiler-rt/lib/builtins/fixunssfdi.c b/compiler-rt/lib/builtins/fixunssfdi.c
index 5a154e82cff..f8ebab854f9 100644
--- a/compiler-rt/lib/builtins/fixunssfdi.c
+++ b/compiler-rt/lib/builtins/fixunssfdi.c
@@ -23,8 +23,8 @@ __fixunssfdi(float a)
{
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;
}
OpenPOWER on IntegriCloud