builtins: tweak constant spelling

Use 4294967296.f instead of 0x1p32f to fix MSVC.  NFC.

Patch by Tee Hao Wei!

llvm-svn: 249374
This commit is contained in:
Saleem Abdulrasool 2015-10-06 04:33:02 +00:00
parent 89a92b9fb2
commit 4c81f0a1be
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}