From 27b52791311d667fad3ccab35b8d90db580cccbc Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 26 Jul 2014 21:08:41 +0000 Subject: builtins: move the readonly constants into rodata Place the floating point constants into the read-only data section. This was already being done for x86_64, this simply mirrors the behaviour for i686. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214034 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/builtins/i386/floatdidf.S | 8 ++++++-- lib/builtins/i386/floatundidf.S | 9 +++++++-- lib/builtins/i386/floatundisf.S | 9 +++++++-- lib/builtins/i386/floatundixf.S | 9 +++++++-- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/lib/builtins/i386/floatdidf.S b/lib/builtins/i386/floatdidf.S index c4626eda5..f4f5d01e5 100644 --- a/lib/builtins/i386/floatdidf.S +++ b/lib/builtins/i386/floatdidf.S @@ -7,8 +7,12 @@ #ifdef __i386__ -#ifndef __ELF__ -.const +#if defined(__APPLE__) + .const +#elif defined(__ELF__) + .section .rodata +#else + .section .rdata,"rd" #endif .balign 16 diff --git a/lib/builtins/i386/floatundidf.S b/lib/builtins/i386/floatundidf.S index 982c0fee6..fdc0a920b 100644 --- a/lib/builtins/i386/floatundidf.S +++ b/lib/builtins/i386/floatundidf.S @@ -17,9 +17,14 @@ #ifdef __i386__ -#ifndef __ELF__ -.const +#if defined(__APPLE__) + .const +#elif defined(__ELF__) + .rodata +#else + .section .rdata,"rd" #endif + .balign 16 twop52: .quad 0x4330000000000000 diff --git a/lib/builtins/i386/floatundisf.S b/lib/builtins/i386/floatundisf.S index 47f4346d7..5b816209f 100644 --- a/lib/builtins/i386/floatundisf.S +++ b/lib/builtins/i386/floatundisf.S @@ -52,9 +52,14 @@ END_COMPILERRT_FUNCTION(__floatundisf) #ifdef __i386__ -#ifndef __ELF__ -.const +#if defined(__APPLE__) + .const +#elif defined(__ELF__) + .section .rodata +#else + .section .rdata,"rd" #endif + .balign 16 twop52: .quad 0x4330000000000000 diff --git a/lib/builtins/i386/floatundixf.S b/lib/builtins/i386/floatundixf.S index a3533115e..d60ad7dbf 100644 --- a/lib/builtins/i386/floatundixf.S +++ b/lib/builtins/i386/floatundixf.S @@ -7,9 +7,14 @@ #ifdef __i386__ -#ifndef __ELF__ -.const +#if defined(__APPLE__) + .const +#elif defined(__ELF__) + .section .rodata +#else + .section .rdata,"rd" #endif + .balign 16 twop52: .quad 0x4330000000000000 -- cgit v1.2.1