Evan Cheng | 5de5d4b | 2011-01-17 08:03:18 +0000 | [diff] [blame] | 1 | ; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \ |
Jason W Kim | f13743b | 2010-12-16 03:12:17 +0000 | [diff] [blame] | 2 | ; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s |
Evan Cheng | 5de5d4b | 2011-01-17 08:03:18 +0000 | [diff] [blame] | 3 | ; RUN: llc %s -mtriple=armv7-linux-gnueabi -o - | \ |
Jason W Kim | f13743b | 2010-12-16 03:12:17 +0000 | [diff] [blame] | 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 |
Chris Lattner | bffc2b4 | 2011-04-26 06:14:13 +0000 | [diff] [blame] | 13 | ; ASM-NEXT: .lcomm array00,80 |
Jason W Kim | f13743b | 2010-12-16 03:12:17 +0000 | [diff] [blame] | 14 | ; ASM-NEXT: .type _MergedGlobals,%object @ @_MergedGlobals |
| 15 | |
| 16 | |
| 17 | |
Rafael Espindola | 014180d | 2011-08-04 13:39:15 +0000 | [diff] [blame] | 18 | ; OBJ: Section 4 |
Jason W Kim | f13743b | 2010-12-16 03:12:17 +0000 | [diff] [blame] | 19 | ; OBJ-NEXT: '.bss' |
| 20 | |
| 21 | ; OBJ: 'array00' |
| 22 | ; OBJ-NEXT: 'st_value', 0x00000000 |
| 23 | ; OBJ-NEXT: 'st_size', 0x00000050 |
Rafael Espindola | d7c2783 | 2011-08-04 15:10:35 +0000 | [diff] [blame] | 24 | ; OBJ-NEXT: 'st_bind', 0x0 |
Rafael Espindola | 71a8f5c | 2011-08-04 15:24:00 +0000 | [diff] [blame] | 25 | ; OBJ-NEXT: 'st_type', 0x1 |
Rafael Espindola | 67ac0c0 | 2011-08-04 15:38:19 +0000 | [diff] [blame] | 26 | ; OBJ-NEXT: 'st_other', 0x00 |
Rafael Espindola | 251a2bb | 2011-08-04 15:50:13 +0000 | [diff] [blame] | 27 | ; OBJ-NEXT: 'st_shndx', 0x0004 |
Jason W Kim | f13743b | 2010-12-16 03:12:17 +0000 | [diff] [blame] | 28 | |
| 29 | define 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 | } |