OLD | NEW |
1 ; Test of global initializers. | 1 ; Test of global initializers. |
2 | 2 |
3 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
4 | 4 |
5 ; Test initializers with -filetype=asm. | 5 ; Test initializers with -filetype=asm. |
6 ; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \ | 6 ; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \ |
7 ; RUN: -i %s --args -O2 | %if --need=target_X8632 --command FileCheck %s | 7 ; RUN: -i %s --args -O2 -allow-externally-defined-symbols \ |
| 8 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
8 | 9 |
9 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --target arm32 \ | 10 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --target arm32 \ |
10 ; RUN: -i %s --args -O2 --skip-unimplemented \ | 11 ; RUN: -i %s --args -O2 --skip-unimplemented \ |
| 12 ; RUN: -allow-externally-defined-symbols \ |
11 ; RUN: | %if --need=target_ARM32 --command FileCheck %s | 13 ; RUN: | %if --need=target_ARM32 --command FileCheck %s |
12 | 14 |
13 ; Test instructions for materializing addresses. | 15 ; Test instructions for materializing addresses. |
14 ; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \ | 16 ; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \ |
15 ; RUN: -i %s --args -O2 \ | 17 ; RUN: -i %s --args -O2 -allow-externally-defined-symbols \ |
16 ; RUN: | %if --need=target_X8632 --command FileCheck %s --check-prefix=X8632 | 18 ; RUN: | %if --need=target_X8632 --command FileCheck %s --check-prefix=X8632 |
17 | 19 |
18 ; Test instructions with -filetype=obj and try to cross reference instructions | 20 ; Test instructions with -filetype=obj and try to cross reference instructions |
19 ; w/ the symbol table. | 21 ; w/ the symbol table. |
20 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ | 22 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ |
21 ; RUN: --target x8632 -i %s --args --verbose none \ | 23 ; RUN: --target x8632 -i %s --args --verbose none \ |
| 24 ; RUN: -allow-externally-defined-symbols \ |
22 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=IAS %s | 25 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=IAS %s |
23 | 26 |
24 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ | 27 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ |
25 ; RUN: --dis-flags=-t --target x8632 -i %s --args --verbose none \ | 28 ; RUN: --dis-flags=-t --target x8632 -i %s --args --verbose none \ |
| 29 ; RUN: -allow-externally-defined-symbols \ |
26 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=SYMTAB %s | 30 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=SYMTAB %s |
27 | 31 |
28 ; This is not really IAS, but we can switch when that is implemented. | 32 ; This is not really IAS, but we can switch when that is implemented. |
29 ; For now we can at least see the instructions / relocations. | 33 ; For now we can at least see the instructions / relocations. |
30 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ | 34 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ |
31 ; RUN: --disassemble --target arm32 -i %s \ | 35 ; RUN: --disassemble --target arm32 -i %s \ |
32 ; RUN: --args --verbose none --skip-unimplemented \ | 36 ; RUN: --args --verbose none --skip-unimplemented \ |
| 37 ; RUN: -allow-externally-defined-symbols \ |
33 ; RUN: | %if --need=target_ARM32 --command FileCheck \ | 38 ; RUN: | %if --need=target_ARM32 --command FileCheck \ |
34 ; RUN: --check-prefix=IASARM32 %s | 39 ; RUN: --check-prefix=IASARM32 %s |
35 | 40 |
36 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ | 41 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ |
37 ; RUN: --disassemble --dis-flags=-t --target arm32 -i %s \ | 42 ; RUN: --disassemble --dis-flags=-t --target arm32 -i %s \ |
38 ; RUN: --args --verbose none --skip-unimplemented \ | 43 ; RUN: --args --verbose none --skip-unimplemented \ |
| 44 ; RUN: -allow-externally-defined-symbols \ |
39 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix=SYMTAB %s | 45 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix=SYMTAB %s |
40 | 46 |
41 define internal i32 @main(i32 %argc, i32 %argv) { | 47 define internal i32 @main(i32 %argc, i32 %argv) { |
42 entry: | 48 entry: |
43 %expanded1 = ptrtoint [4 x i8]* @PrimitiveInit to i32 | 49 %expanded1 = ptrtoint [4 x i8]* @PrimitiveInit to i32 |
44 call void @use(i32 %expanded1) | 50 call void @use(i32 %expanded1) |
45 %expanded3 = ptrtoint [4 x i8]* @PrimitiveInitConst to i32 | 51 %expanded3 = ptrtoint [4 x i8]* @PrimitiveInitConst to i32 |
46 call void @use(i32 %expanded3) | 52 call void @use(i32 %expanded3) |
47 %expanded5 = ptrtoint [4 x i8]* @PrimitiveInitStatic to i32 | 53 %expanded5 = ptrtoint [4 x i8]* @PrimitiveInitStatic to i32 |
48 call void @use(i32 %expanded5) | 54 call void @use(i32 %expanded5) |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 ; CHECK: .section .rodata,"a",%progbits | 210 ; CHECK: .section .rodata,"a",%progbits |
205 ; CHECK-NEXT: .p2align 2 | 211 ; CHECK-NEXT: .p2align 2 |
206 ; CHECK-NEXT: ArrayUninitConstInt: | 212 ; CHECK-NEXT: ArrayUninitConstInt: |
207 ; CHECK-NEXT: .zero 20 | 213 ; CHECK-NEXT: .zero 20 |
208 ; CHECK-NEXT: .size ArrayUninitConstInt, 20 | 214 ; CHECK-NEXT: .size ArrayUninitConstInt, 20 |
209 | 215 |
210 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 216 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
211 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 217 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
212 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 | 218 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 |
213 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 | 219 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 |
OLD | NEW |