diff options
author | Robert Lytton <robert@xmos.com> | 2014-02-11 10:36:26 +0000 |
---|---|---|
committer | Robert Lytton <robert@xmos.com> | 2014-02-11 10:36:26 +0000 |
commit | 70b5ba49c31fd92c3b34456ef696bd24675bcda3 (patch) | |
tree | 1492dd7379898b7a972d50388d17c28fac356119 /llvm/test/CodeGen/XCore/codemodel.ll | |
parent | 9b6bb461b11ffb5420f87e338cf7878d5ef03352 (diff) | |
download | bcm5719-llvm-70b5ba49c31fd92c3b34456ef696bd24675bcda3.tar.gz bcm5719-llvm-70b5ba49c31fd92c3b34456ef696bd24675bcda3.zip |
XCore target: fix const section handling
Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.
Clang now emits ".cp.rodata" section information.
All other externally visible constant data will be placed in the DP section.
llvm-svn: 201144
Diffstat (limited to 'llvm/test/CodeGen/XCore/codemodel.ll')
-rw-r--r-- | llvm/test/CodeGen/XCore/codemodel.ll | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/XCore/codemodel.ll b/llvm/test/CodeGen/XCore/codemodel.ll index cc532ea7def..0245893c478 100644 --- a/llvm/test/CodeGen/XCore/codemodel.ll +++ b/llvm/test/CodeGen/XCore/codemodel.ll @@ -171,27 +171,43 @@ entry: ; LARGE: .space 40 @s = global [10 x i32] zeroinitializer -; CHECK: .section .cp.rodata,"ac",@progbits +; CHECK: .section .dp.rodata,"awd",@progbits ; CHECK-LABEL: cl: ; CHECK: .space 400 -; LARGE: .section .cp.rodata.large,"ac",@progbits +; LARGE: .section .dp.rodata.large,"awd",@progbits ; LARGE-LABEL: cl: ; LARGE: .space 400 @cl = constant [100 x i32] zeroinitializer ; CHECK-LABEL: cs: ; CHECK: .space 40 -; LARGE: .section .cp.rodata,"ac",@progbits +; LARGE: .section .dp.rodata,"awd",@progbits ; LARGE-LABEL: cs: ; LARGE: .space 40 @cs = constant [10 x i32] zeroinitializer +; CHECK: .section .cp.rodata,"ac",@progbits +; CHECK-LABEL: icl: +; CHECK: .space 400 +; LARGE: .section .cp.rodata.large,"ac",@progbits +; LARGE-LABEL: icl: +; LARGE: .space 400 +@icl = internal constant [100 x i32] zeroinitializer + +; CHECK-LABEL: cs: +; CHECK: .space 40 +; LARGE: .section .cp.rodata,"ac",@progbits +; LARGE-LABEL: cs: +; LARGE: .space 40 +@ics = internal constant [10 x i32] zeroinitializer + ; CHECK: .section .cp.namedsection,"ac",@progbits ; CHECK-LABEL: cpsec: ; CHECK: .long 0 -@cpsec = global i32 0, section ".cp.namedsection" +@cpsec = constant i32 0, section ".cp.namedsection" ; CHECK: .section .dp.namedsection,"awd",@progbits ; CHECK-LABEL: dpsec: ; CHECK: .long 0 @dpsec = global i32 0, section ".dp.namedsection" + |