[compiler-rt] r209986 - compiler-rt: prefer .rodata for non MachO targets

Saleem Abdulrasool compnerd at compnerd.org
Sat May 31 21:07:07 PDT 2014


Author: compnerd
Date: Sat May 31 23:07:07 2014
New Revision: 209986

URL: http://llvm.org/viewvc/llvm-project?rev=209986&view=rev
Log:
compiler-rt: prefer .rodata for non MachO targets

Place constants into .rdata if targeting ELF or COFF/PE.  This should be
functionally identical, however, the data would be placed into a different
section.  This is purely a cleanup change.

Modified:
    compiler-rt/trunk/lib/builtins/x86_64/floatundidf.S
    compiler-rt/trunk/lib/builtins/x86_64/floatundisf.S
    compiler-rt/trunk/lib/builtins/x86_64/floatundixf.S

Modified: compiler-rt/trunk/lib/builtins/x86_64/floatundidf.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/x86_64/floatundidf.S?rev=209986&r1=209985&r2=209986&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/x86_64/floatundidf.S (original)
+++ compiler-rt/trunk/lib/builtins/x86_64/floatundidf.S Sat May 31 23:07:07 2014
@@ -17,8 +17,12 @@
 
 #ifdef __x86_64__
 
-#ifndef __ELF__
-.const
+#if defined(__APPLE__)
+	.const
+#elif defined(__ELF__)
+	.rodata
+#else
+	.section .rdata,"rd"
 #endif
 	.balign 4
 twop52:

Modified: compiler-rt/trunk/lib/builtins/x86_64/floatundisf.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/x86_64/floatundisf.S?rev=209986&r1=209985&r2=209986&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/x86_64/floatundisf.S (original)
+++ compiler-rt/trunk/lib/builtins/x86_64/floatundisf.S Sat May 31 23:07:07 2014
@@ -7,8 +7,12 @@
 
 #ifdef __x86_64__
 
-#ifndef __ELF__
-.literal4
+#if defined(__APPLE__)
+	.literal4
+#elif defined(__ELF__)
+	.rodata
+#else
+	.section .rdata,"rd"
 #endif
 two:
 	.single 2.0

Modified: compiler-rt/trunk/lib/builtins/x86_64/floatundixf.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/x86_64/floatundixf.S?rev=209986&r1=209985&r2=209986&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/x86_64/floatundixf.S (original)
+++ compiler-rt/trunk/lib/builtins/x86_64/floatundixf.S Sat May 31 23:07:07 2014
@@ -7,8 +7,12 @@
 
 #ifdef __x86_64__
 
-#ifndef __ELF__
-.const
+#if defined(__APPLE__)
+	.const
+#elif defined(__ELF__)
+	.rodata
+#else
+	.section .rdata,"rd"
 #endif
 	.balign 4
 twop64:
@@ -39,6 +43,10 @@ END_COMPILERRT_FUNCTION(__floatundixf)
 
 #if defined(__APPLE__)
 	.const
+#elif defined(__ELF__)
+	.rdata
+#else
+	.section .rdata,"rd"
 #endif
 	.balign 4
 twop52:





More information about the llvm-commits mailing list