From 2fd910dc72c1993846fc964d4d56ea2622d0cacf Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 1 Jun 2014 04:07:07 +0000 Subject: [PATCH] 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 --- compiler-rt/lib/builtins/x86_64/floatundidf.S | 8 ++++++-- compiler-rt/lib/builtins/x86_64/floatundisf.S | 8 ++++++-- compiler-rt/lib/builtins/x86_64/floatundixf.S | 12 ++++++++++-- 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 65601dc..7c94231 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 fa8177a..c840913 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 a0e8b17..6603935 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: -- 2.7.4