• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc  %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
2; RUN:    elf-dump --dump-section-data | FileCheck  -check-prefix=OBJ %s
3; RUN: llc  %s -mtriple=armv7-linux-gnueabi -o - | \
4; RUN:    FileCheck  -check-prefix=ASM %s
5
6
7@dummy = internal global i32 666
8@array00 = internal global [20 x i32] zeroinitializer
9@sum = internal global i32 55
10@STRIDE = internal global i32 8
11
12; ASM:          .type   array00,%object         @ @array00
13; ASM-NEXT:     .lcomm  array00,80
14; ASM-NEXT:     .type   _MergedGlobals,%object  @ @_MergedGlobals
15
16
17
18; OBJ:          Section 0x00000004
19; OBJ-NEXT:     '.bss'
20
21; OBJ:          'array00'
22; OBJ-NEXT:     'st_value', 0x00000000
23; OBJ-NEXT:     'st_size', 0x00000050
24; OBJ-NEXT:     'st_bind', 0x00000000
25; OBJ-NEXT:     'st_type', 0x00000001
26; OBJ-NEXT:     'st_other', 0x00000000
27; OBJ-NEXT:     'st_shndx', 0x00000004
28
29define i32 @main(i32 %argc) nounwind {
30  %1 = load i32* @sum, align 4
31  %2 = getelementptr  [20 x i32]* @array00, i32 0, i32 %argc
32  %3 = load i32* %2, align 4
33  %4 = add i32 %1, %3
34  ret i32 %4;
35}
36