diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-04-23 21:29:34 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-04-23 21:29:34 +0000 |
commit | 49babc916aa0186ba8347d0216069a84cb67da31 (patch) | |
tree | 7e2ada28b32af3c8223f662ec4360e792d08136a /test | |
parent | 08e5ef25fb0be95aef82d3dd2d4b81aa1cd08aed (diff) | |
download | llvm-49babc916aa0186ba8347d0216069a84cb67da31.tar.gz llvm-49babc916aa0186ba8347d0216069a84cb67da31.tar.bz2 llvm-49babc916aa0186ba8347d0216069a84cb67da31.tar.xz |
MC: honour IMAGE_SCN_CNT_INITIALIZED_DATA
Emit the flag to indicate to the assembler that a section contains data if there
is pre-populated data present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/Generic/initialised-data.ll | 8 | ||||
-rw-r--r-- | test/CodeGen/X86/dllexport-x86_64.ll | 6 | ||||
-rw-r--r-- | test/CodeGen/X86/dllexport.ll | 6 | ||||
-rw-r--r-- | test/CodeGen/X86/global-sections.ll | 6 | ||||
-rw-r--r-- | test/DebugInfo/COFF/asm.ll | 4 | ||||
-rw-r--r-- | test/DebugInfo/COFF/multifile.ll | 4 | ||||
-rw-r--r-- | test/DebugInfo/COFF/multifunction.ll | 4 | ||||
-rw-r--r-- | test/DebugInfo/COFF/simple.ll | 4 | ||||
-rw-r--r-- | test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll | 2 | ||||
-rw-r--r-- | test/DebugInfo/X86/coff_debug_info_type.ll | 2 | ||||
-rw-r--r-- | test/MC/COFF/global_ctors_dtors.ll | 8 | ||||
-rw-r--r-- | test/MC/COFF/weak-symbol.ll | 8 |
12 files changed, 35 insertions, 27 deletions
diff --git a/test/CodeGen/Generic/initialised-data.ll b/test/CodeGen/Generic/initialised-data.ll new file mode 100644 index 0000000000..9f428bc3fd --- /dev/null +++ b/test/CodeGen/Generic/initialised-data.ll @@ -0,0 +1,8 @@ +; RUN: llc -mtriple i686-windows %s -o - | FileCheck %s +; RUN: llc -mtriple x86_64-windows %s -o - | FileCheck %s +; RUN: llc -mtriple thumbv7-windows %s -o - | FileCheck %s + +@data = dllexport constant [5 x i8] c"data\00", align 1 + +; CHECK: .section .rdata,"rd" + diff --git a/test/CodeGen/X86/dllexport-x86_64.ll b/test/CodeGen/X86/dllexport-x86_64.ll index a38c2d8f8a..af0f85b00e 100644 --- a/test/CodeGen/X86/dllexport-x86_64.ll +++ b/test/CodeGen/X86/dllexport-x86_64.ll @@ -40,18 +40,18 @@ define weak_odr dllexport void @weak1() { ; CHECK: .globl Var1 @Var1 = dllexport global i32 1, align 4 -; CHECK: .rdata,"r" +; CHECK: .rdata,"rd" ; CHECK: .globl Var2 @Var2 = dllexport unnamed_addr constant i32 1 ; CHECK: .comm Var3 @Var3 = common dllexport global i32 0, align 4 -; CHECK: .section .data,"w",discard,WeakVar1 +; CHECK: .section .data,"wd",discard,WeakVar1 ; CHECK: .globl WeakVar1 @WeakVar1 = weak_odr dllexport global i32 1, align 4 -; CHECK: .section .rdata,"r",discard,WeakVar2 +; CHECK: .section .rdata,"rd",discard,WeakVar2 ; CHECK: .globl WeakVar2 @WeakVar2 = weak_odr dllexport unnamed_addr constant i32 1 diff --git a/test/CodeGen/X86/dllexport.ll b/test/CodeGen/X86/dllexport.ll index 1b34d23869..eba6d6946e 100644 --- a/test/CodeGen/X86/dllexport.ll +++ b/test/CodeGen/X86/dllexport.ll @@ -55,18 +55,18 @@ define weak_odr dllexport void @weak1() { ; CHECK: .globl _Var1 @Var1 = dllexport global i32 1, align 4 -; CHECK: .rdata,"r" +; CHECK: .rdata,"rd" ; CHECK: .globl _Var2 @Var2 = dllexport unnamed_addr constant i32 1 ; CHECK: .comm _Var3 @Var3 = common dllexport global i32 0, align 4 -; CHECK: .section .data,"w",discard,_WeakVar1 +; CHECK: .section .data,"wd",discard,_WeakVar1 ; CHECK: .globl _WeakVar1 @WeakVar1 = weak_odr dllexport global i32 1, align 4 -; CHECK: .section .rdata,"r",discard,_WeakVar2 +; CHECK: .section .rdata,"rd",discard,_WeakVar2 ; CHECK: .globl _WeakVar2 @WeakVar2 = weak_odr dllexport unnamed_addr constant i32 1 diff --git a/test/CodeGen/X86/global-sections.ll b/test/CodeGen/X86/global-sections.ll index 5ad504719f..7f123c1067 100644 --- a/test/CodeGen/X86/global-sections.ll +++ b/test/CodeGen/X86/global-sections.ll @@ -48,7 +48,7 @@ define void @F1() { ; LINUX-SECTIONS: .section .rodata.G3,"a",@progbits ; LINUX-SECTIONS: .globl G3 -; WIN32-SECTIONS: .section .rdata,"r",one_only,_G3 +; WIN32-SECTIONS: .section .rdata,"rd",one_only,_G3 ; WIN32-SECTIONS: .globl _G3 @@ -127,7 +127,7 @@ define void @F1() { ; LINUX-SECTIONS: .section .rodata.G7,"aMS",@progbits,1 ; LINUX-SECTIONS: .globl G7 -; WIN32-SECTIONS: .section .rdata,"r",one_only,_G7 +; WIN32-SECTIONS: .section .rdata,"rd",one_only,_G7 ; WIN32-SECTIONS: .globl _G7 @@ -190,7 +190,7 @@ define void @F1() { ; LINUX-SECTIONS: .asciz "foo" ; LINUX-SECTIONS: .size .LG14, 4 -; WIN32-SECTIONS: .section .rdata,"r" +; WIN32-SECTIONS: .section .rdata,"rd" ; WIN32-SECTIONS: L_G14: ; WIN32-SECTIONS: .asciz "foo" diff --git a/test/DebugInfo/COFF/asm.ll b/test/DebugInfo/COFF/asm.ll index 1ce3681908..8c9dff0cdf 100644 --- a/test/DebugInfo/COFF/asm.ll +++ b/test/DebugInfo/COFF/asm.ll @@ -21,7 +21,7 @@ ; X86-NEXT: ret ; X86-NEXT: [[END_OF_F:.*]]: ; -; X86-LABEL: .section .debug$S,"rn" +; X86-LABEL: .section .debug$S,"rnd" ; X86-NEXT: .long 4 ; X86-NEXT: .long 242 ; X86-NEXT: .long [[F2_END:.*]]-[[F2_START:.*]] @@ -90,7 +90,7 @@ ; X64-NEXT: ret ; X64-NEXT: [[END_OF_F:.*]]: ; -; X64-LABEL: .section .debug$S,"rn" +; X64-LABEL: .section .debug$S,"rnd" ; X64-NEXT: .long 4 ; X64-NEXT: .long 242 ; X64-NEXT: .long [[F2_END:.*]]-[[F2_START:.*]] diff --git a/test/DebugInfo/COFF/multifile.ll b/test/DebugInfo/COFF/multifile.ll index 53a645ed3f..c04bdb3b7c 100644 --- a/test/DebugInfo/COFF/multifile.ll +++ b/test/DebugInfo/COFF/multifile.ll @@ -28,7 +28,7 @@ ; X86-NEXT: ret ; X86-NEXT: [[END_OF_F:.*]]: ; -; X86-LABEL: .section .debug$S,"rn" +; X86-LABEL: .section .debug$S,"rnd" ; X86-NEXT: .long 4 ; X86-NEXT: .long 242 ; X86-NEXT: .long [[F2_END:.*]]-[[F2_START:.*]] @@ -122,7 +122,7 @@ ; X64-NEXT: ret ; X64-NEXT: [[END_OF_F:.*]]: ; -; X64-LABEL: .section .debug$S,"rn" +; X64-LABEL: .section .debug$S,"rnd" ; X64-NEXT: .long 4 ; X64-NEXT: .long 242 ; X64-NEXT: .long [[F2_END:.*]]-[[F2_START:.*]] diff --git a/test/DebugInfo/COFF/multifunction.ll b/test/DebugInfo/COFF/multifunction.ll index d664716e7d..5a6555805f 100644 --- a/test/DebugInfo/COFF/multifunction.ll +++ b/test/DebugInfo/COFF/multifunction.ll @@ -50,7 +50,7 @@ ; X86-NEXT: ret ; X86-NEXT: [[END_OF_F:.*]]: ; -; X86-LABEL: .section .debug$S,"rn" +; X86-LABEL: .section .debug$S,"rnd" ; X86-NEXT: .long 4 ; Line table subsection for x ; X86-NEXT: .long 242 @@ -200,7 +200,7 @@ ; X64-NEXT: ret ; X64-NEXT: [[END_OF_F:.*]]: ; -; X64-LABEL: .section .debug$S,"rn" +; X64-LABEL: .section .debug$S,"rnd" ; X64-NEXT: .long 4 ; Line table subsection for x ; X64-NEXT: .long 242 diff --git a/test/DebugInfo/COFF/simple.ll b/test/DebugInfo/COFF/simple.ll index 8fa6870a54..2613a18298 100644 --- a/test/DebugInfo/COFF/simple.ll +++ b/test/DebugInfo/COFF/simple.ll @@ -19,7 +19,7 @@ ; X86-NEXT: ret ; X86-NEXT: [[END_OF_F:.*]]: ; -; X86-LABEL: .section .debug$S,"rn" +; X86-LABEL: .section .debug$S,"rnd" ; X86-NEXT: .long 4 ; X86-NEXT: .long 242 ; X86-NEXT: .long [[F2_END:.*]]-[[F2_START:.*]] @@ -81,7 +81,7 @@ ; X64-NEXT: ret ; X64-NEXT: [[END_OF_F:.*]]: ; -; X64-LABEL: .section .debug$S,"rn" +; X64-LABEL: .section .debug$S,"rnd" ; X64-NEXT: .long 4 ; X64-NEXT: .long 242 ; X64-NEXT: .long [[F2_END:.*]]-[[F2_START:.*]] diff --git a/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll b/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll index f5e2eae0a4..4d2e427344 100644 --- a/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll +++ b/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll @@ -22,7 +22,7 @@ ; X86-NEXT: [[END_OF_BAR:^L.*]]:{{$}} ; X86-NOT: ret -; X86-LABEL: .section .debug$S,"rn" +; X86-LABEL: .section .debug$S,"rnd" ; X86: .secrel32 "?bar@@YAXHZZ" ; X86-NEXT: .secidx "?bar@@YAXHZZ" ; X86: .long 0 diff --git a/test/DebugInfo/X86/coff_debug_info_type.ll b/test/DebugInfo/X86/coff_debug_info_type.ll index e61c8076b6..a0b8ccc6ec 100644 --- a/test/DebugInfo/X86/coff_debug_info_type.ll +++ b/test/DebugInfo/X86/coff_debug_info_type.ll @@ -4,7 +4,7 @@ ; CHECK: .section .debug_info ; RUN: llc -mtriple=i686-pc-win32 -filetype=asm -O0 < %s | FileCheck -check-prefix=WIN32 %s -; WIN32: .section .debug$S,"rn" +; WIN32: .section .debug$S,"rnd" ; generated from: ; clang -g -S -emit-llvm test.c -o test.ll diff --git a/test/MC/COFF/global_ctors_dtors.ll b/test/MC/COFF/global_ctors_dtors.ll index 2a25219a77..b95093ac88 100644 --- a/test/MC/COFF/global_ctors_dtors.ll +++ b/test/MC/COFF/global_ctors_dtors.ll @@ -29,11 +29,11 @@ define i32 @main() nounwind { ret i32 0 } -; WIN32: .section .CRT$XCU,"r" +; WIN32: .section .CRT$XCU,"rd" ; WIN32: a_global_ctor -; WIN32: .section .CRT$XTX,"r" +; WIN32: .section .CRT$XTX,"rd" ; WIN32: a_global_dtor -; MINGW32: .section .ctors,"w" +; MINGW32: .section .ctors,"wd" ; MINGW32: a_global_ctor -; MINGW32: .section .dtors,"w" +; MINGW32: .section .dtors,"wd" ; MINGW32: a_global_dtor diff --git a/test/MC/COFF/weak-symbol.ll b/test/MC/COFF/weak-symbol.ll index c06692ed90..fd78307c1f 100644 --- a/test/MC/COFF/weak-symbol.ll +++ b/test/MC/COFF/weak-symbol.ll @@ -28,20 +28,20 @@ define weak void @f() section ".sect" { }
; Weak global
-; X86: .section .data,"r",discard,_a
+; X86: .section .data,"rd",discard,_a
; X86: .globl _a
; X86: .zero 12
;
-; X64: .section .data,"r",discard,a
+; X64: .section .data,"rd",discard,a
; X64: .globl a
; X64: .zero 12
@a = weak unnamed_addr constant { i32, i32, i32 } { i32 0, i32 0, i32 0}, section ".data"
-; X86: .section .tls$,"w",discard,_b
+; X86: .section .tls$,"wd",discard,_b
; X86: .globl _b
; X86: .long 0
;
-; X64: .section .tls$,"w",discard,b
+; X64: .section .tls$,"wd",discard,b
; X64: .globl b
; X64: .long 0
|