Fix x86/x64 on Linux, Credit to Rafael Espindola.
llvm-svn: 86075
This commit is contained in:
parent
f05d57283e
commit
8f40ca3b8f
|
@ -7,7 +7,9 @@
|
|||
|
||||
#ifdef __i386__
|
||||
|
||||
#ifndef __ELF__
|
||||
.const
|
||||
#endif
|
||||
.align 4
|
||||
twop52: .quad 0x4330000000000000
|
||||
twop32: .quad 0x41f0000000000000
|
||||
|
|
|
@ -26,4 +26,4 @@ DEFINE_COMPILERRT_FUNCTION(__floatdixf)
|
|||
fildll 4(%esp)
|
||||
ret
|
||||
|
||||
#endif // __i386__
|
||||
#endif // __i386__
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
|
||||
#ifdef __i386__
|
||||
|
||||
#ifndef __ELF__
|
||||
.const
|
||||
#endif
|
||||
.align 4
|
||||
twop52: .quad 0x4330000000000000
|
||||
twop84_plus_twop52:
|
||||
|
|
|
@ -51,8 +51,12 @@ DEFINE_COMPILERRT_FUNCTION(__floatundisf)
|
|||
|
||||
#ifdef __i386__
|
||||
|
||||
#ifndef __ELF__
|
||||
.const
|
||||
.align 3
|
||||
#else
|
||||
.align 8
|
||||
#endif
|
||||
twop52: .quad 0x4330000000000000
|
||||
.quad 0x0000000000000fff
|
||||
sticky: .quad 0x0000000000000000
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
#ifdef __i386__
|
||||
|
||||
#ifndef __ELF__
|
||||
.const
|
||||
#endif
|
||||
.align 4
|
||||
twop52: .quad 0x4330000000000000
|
||||
twop84_plus_twop52_neg:
|
||||
|
@ -32,4 +34,4 @@ DEFINE_COMPILERRT_FUNCTION(__floatundixf)
|
|||
faddl 4(%esp)
|
||||
ret
|
||||
|
||||
#endif // __i386__
|
||||
#endif // __i386__
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
|
||||
#ifdef __x86_64__
|
||||
|
||||
#ifndef __ELF__
|
||||
.const
|
||||
#endif
|
||||
.align 4
|
||||
twop52: .quad 0x4330000000000000
|
||||
twop84_plus_twop52:
|
||||
|
@ -38,4 +40,4 @@ DEFINE_COMPILERRT_FUNCTION(__floatundidf)
|
|||
addsd %xmm1, %xmm0 // a_hi + a_lo (round happens here)
|
||||
ret
|
||||
|
||||
#endif // __x86_64__
|
||||
#endif // __x86_64__
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
#ifdef __x86_64__
|
||||
|
||||
#ifndef __ELF__
|
||||
.literal4
|
||||
#endif
|
||||
two: .single 2.0
|
||||
|
||||
#define REL_ADDR(_a) (_a)(%rip)
|
||||
|
@ -28,4 +30,4 @@ DEFINE_COMPILERRT_FUNCTION(__floatundisf)
|
|||
mulss REL_ADDR(two), %xmm0
|
||||
ret
|
||||
|
||||
#endif // __x86_64__
|
||||
#endif // __x86_64__
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
#ifdef __x86_64__
|
||||
|
||||
#ifndef __ELF__
|
||||
.const
|
||||
#endif
|
||||
.align 4
|
||||
twop64: .quad 0x43f0000000000000
|
||||
|
||||
|
@ -57,4 +59,4 @@ DEFINE_COMPILERRT_FUNCTION(__floatundixf)
|
|||
|
||||
#endif // __x86_64__
|
||||
|
||||
*/
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue