mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:04:40 +08:00
builtins: Expand out floating point exponents for MSVC
MSVC 2013 doesnt support C99 fully, including the hexidecimal floating point representation. Use the expanded value to permit building with it. Patch by Tee Hao Wei! llvm-svn: 250365
This commit is contained in:
@@ -32,8 +32,8 @@ ARM_EABI_FNALIAS(l2d, floatdidf)
|
||||
COMPILER_RT_ABI double
|
||||
__floatdidf(di_int a)
|
||||
{
|
||||
static const double twop52 = 0x1.0p52;
|
||||
static const double twop32 = 0x1.0p32;
|
||||
static const double twop52 = 4503599627370496.0; // 0x1.0p52
|
||||
static const double twop32 = 4294967296.0; // 0x1.0p32
|
||||
|
||||
union { int64_t x; double d; } low = { .d = twop52 };
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ ARM_EABI_FNALIAS(ul2d, floatundidf)
|
||||
COMPILER_RT_ABI double
|
||||
__floatundidf(du_int a)
|
||||
{
|
||||
static const double twop52 = 0x1.0p52;
|
||||
static const double twop84 = 0x1.0p84;
|
||||
static const double twop84_plus_twop52 = 0x1.00000001p84;
|
||||
static const double twop52 = 4503599627370496.0; // 0x1.0p52
|
||||
static const double twop84 = 19342813113834066795298816.0; // 0x1.0p84
|
||||
static const double twop84_plus_twop52 = 19342813118337666422669312.0; // 0x1.00000001p84
|
||||
|
||||
union { uint64_t x; double d; } high = { .d = twop84 };
|
||||
union { uint64_t x; double d; } low = { .d = twop52 };
|
||||
|
||||
Reference in New Issue
Block a user