builtins: move the readonly constants into rodata
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 26 Jul 2014 21:08:41 +0000 (21:08 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 26 Jul 2014 21:08:41 +0000 (21:08 +0000)
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.

llvm-svn: 214034

compiler-rt/lib/builtins/i386/floatdidf.S
compiler-rt/lib/builtins/i386/floatundidf.S
compiler-rt/lib/builtins/i386/floatundisf.S
compiler-rt/lib/builtins/i386/floatundixf.S

index c4626ed..f4f5d01 100644 (file)
@@ -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
index 982c0fe..fdc0a92 100644 (file)
 
 #ifdef __i386__
 
-#ifndef __ELF__
-.const
+#if defined(__APPLE__)
+       .const
+#elif defined(__ELF__)
+       .rodata
+#else
+       .section .rdata,"rd"
 #endif
+
        .balign 16
 twop52:
        .quad 0x4330000000000000
index 47f4346..5b81620 100644 (file)
@@ -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
index a353311..d60ad7d 100644 (file)
@@ -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