aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
diff options
context:
space:
mode:
authorJason W Kim <jason.w.kim.2009@gmail.com>2010-12-16 03:12:17 +0000
committerJason W Kim <jason.w.kim.2009@gmail.com>2010-12-16 03:12:17 +0000
commitf13743bb3c3fb37a59b59f26056bc391bf0adcdc (patch)
treed7b9a84b10bccb7b243d03a583fdfae5d59bb1fa /test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
parent745dacc91d7ee9531bfba76b21beb5d4eef93a7d (diff)
downloadexternal_llvm-f13743bb3c3fb37a59b59f26056bc391bf0adcdc.zip
external_llvm-f13743bb3c3fb37a59b59f26056bc391bf0adcdc.tar.gz
external_llvm-f13743bb3c3fb37a59b59f26056bc391bf0adcdc.tar.bz2
1. ARM/MC/ELF: A few more ELF relocs for .o
2. Fixed EmitLocalCommonSymbol for ELF (Yes, they exist. :) Test added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/2010-12-15-elf-lcomm.ll')
-rw-r--r--test/CodeGen/ARM/2010-12-15-elf-lcomm.ll35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll b/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
new file mode 100644
index 0000000..e08fe8d5
--- /dev/null
+++ b/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
@@ -0,0 +1,35 @@
+; RUN: llc %s -mtriple=armv7-linux-gnueabi -arm-use-movt -filetype=obj -o - | \
+; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+; RUN: llc %s -mtriple=armv7-linux-gnueabi -arm-use-movt -o - | \
+; RUN: FileCheck -check-prefix=ASM %s
+
+
+@dummy = internal global i32 666
+@array00 = internal global [20 x i32] zeroinitializer
+@sum = internal global i32 55
+@STRIDE = internal global i32 8
+
+; ASM: .type array00,%object @ @array00
+; ASM-NEXT: .lcomm array00,80 @ @array00
+; ASM-NEXT: .type _MergedGlobals,%object @ @_MergedGlobals
+
+
+
+; OBJ: Section 0x00000003
+; OBJ-NEXT: '.bss'
+
+; OBJ: 'array00'
+; OBJ-NEXT: 'st_value', 0x00000000
+; OBJ-NEXT: 'st_size', 0x00000050
+; OBJ-NEXT: 'st_bind', 0x00000000
+; OBJ-NEXT: 'st_type', 0x00000001
+; OBJ-NEXT: 'st_other', 0x00000000
+; OBJ-NEXT: 'st_shndx', 0x00000003
+
+define i32 @main(i32 %argc) nounwind {
+ %1 = load i32* @sum, align 4
+ %2 = getelementptr [20 x i32]* @array00, i32 0, i32 %argc
+ %3 = load i32* %2, align 4
+ %4 = add i32 %1, %3
+ ret i32 %4;
+}