summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-06-01 04:07:07 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-06-01 04:07:07 +0000
commit2fd910dc72c1993846fc964d4d56ea2622d0cacf (patch)
treecc297ffdd64981163231e2222e4285000c76713d
parent57aa97f53a76478c405b3d0900134a27130163e0 (diff)
downloadbcm5719-llvm-2fd910dc72c1993846fc964d4d56ea2622d0cacf.tar.gz
bcm5719-llvm-2fd910dc72c1993846fc964d4d56ea2622d0cacf.zip
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. llvm-svn: 209986
-rw-r--r--compiler-rt/lib/builtins/x86_64/floatundidf.S8
-rw-r--r--compiler-rt/lib/builtins/x86_64/floatundisf.S8
-rw-r--r--compiler-rt/lib/builtins/x86_64/floatundixf.S12
3 files changed, 22 insertions, 6 deletions
diff --git a/compiler-rt/lib/builtins/x86_64/floatundidf.S b/compiler-rt/lib/builtins/x86_64/floatundidf.S
index 65601dc1b76..7c9423193ee 100644
--- a/compiler-rt/lib/builtins/x86_64/floatundidf.S
+++ b/compiler-rt/lib/builtins/x86_64/floatundidf.S
@@ -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:
diff --git a/compiler-rt/lib/builtins/x86_64/floatundisf.S b/compiler-rt/lib/builtins/x86_64/floatundisf.S
index fa8177a9071..c840913098c 100644
--- a/compiler-rt/lib/builtins/x86_64/floatundisf.S
+++ b/compiler-rt/lib/builtins/x86_64/floatundisf.S
@@ -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
diff --git a/compiler-rt/lib/builtins/x86_64/floatundixf.S b/compiler-rt/lib/builtins/x86_64/floatundixf.S
index a0e8b179933..6603935e578 100644
--- a/compiler-rt/lib/builtins/x86_64/floatundixf.S
+++ b/compiler-rt/lib/builtins/x86_64/floatundixf.S
@@ -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:
OpenPOWER on IntegriCloud