| 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 | %if --need=target_X8632 --command FileCheck %s |
| 8 | 8 |
| 9 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --target arm32 \ | 9 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --target arm32 \ |
| 10 ; RUN: -i %s --args -O2 --skip-unimplemented \ | 10 ; RUN: -i %s --args -O2 --skip-unimplemented \ |
| 11 ; RUN: | %if --need=target_ARM32 --command FileCheck %s | 11 ; RUN: | %if --need=target_ARM32 --command FileCheck %s |
| 12 | 12 |
| 13 ; Test instructions for materializing addresses. | 13 ; Test instructions for materializing addresses. |
| 14 ; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \ | 14 ; RUN: %if --need=target_X8632 --command %p2i --filetype=asm --target x8632 \ |
| 15 ; RUN: -i %s --args -O2 \ | 15 ; RUN: -i %s --args -O2 \ |
| 16 ; RUN: | %if --need=target_X8632 --command FileCheck %s --check-prefix=X8632 | 16 ; RUN: | %if --need=target_X8632 --command FileCheck %s --check-prefix=X8632 |
| 17 | 17 |
| 18 ; Test instructions with -filetype=obj and try to cross reference instructions | 18 ; Test instructions with -filetype=obj and try to cross reference instructions |
| 19 ; w/ the symbol table. | 19 ; w/ the symbol table. |
| 20 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ | 20 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ |
| 21 ; RUN: --target x8632 -i %s --args --verbose none \ | 21 ; RUN: --target x8632 -i %s --args --verbose none \ |
| 22 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=IAS %s | 22 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=IAS %s |
| 23 | 23 |
| 24 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ | 24 ; RUN: %if --need=target_X8632 --command %p2i --assemble --disassemble \ |
| 25 ; RUN: --dis-flags=-t --target x8632 -i %s --args --verbose none \ | 25 ; RUN: --dis-flags=-t --target x8632 -i %s --args --verbose none \ |
| 26 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=SYMTAB %s | 26 ; RUN: | %if --need=target_X8632 --command FileCheck --check-prefix=SYMTAB %s |
| 27 | 27 |
| 28 ; Only checking symtab for ARM for now. TODO(jvoung): Need to lower | 28 ; This is not really IAS, but we can switch when that is implemented. |
| 29 ; arguments at callsite. | 29 ; For now we can at least see the instructions / relocations. |
| 30 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ |
| 31 ; RUN: --disassemble --target arm32 -i %s \ |
| 32 ; RUN: --args --verbose none --skip-unimplemented \ |
| 33 ; RUN: | %if --need=target_ARM32 --command FileCheck \ |
| 34 ; RUN: --check-prefix=IASARM32 %s |
| 35 |
| 30 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ | 36 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ |
| 31 ; RUN: --disassemble --dis-flags=-t --target arm32 -i %s \ | 37 ; RUN: --disassemble --dis-flags=-t --target arm32 -i %s \ |
| 32 ; RUN: --args --verbose none --skip-unimplemented \ | 38 ; RUN: --args --verbose none --skip-unimplemented \ |
| 33 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix=SYMTAB %s | 39 ; RUN: | %if --need=target_ARM32 --command FileCheck --check-prefix=SYMTAB %s |
| 34 | 40 |
| 35 define internal i32 @main(i32 %argc, i32 %argv) { | 41 define internal i32 @main(i32 %argc, i32 %argv) { |
| 36 entry: | 42 entry: |
| 37 %expanded1 = ptrtoint [4 x i8]* @PrimitiveInit to i32 | 43 %expanded1 = ptrtoint [4 x i8]* @PrimitiveInit to i32 |
| 38 call void @use(i32 %expanded1) | 44 call void @use(i32 %expanded1) |
| 39 %expanded3 = ptrtoint [4 x i8]* @PrimitiveInitConst to i32 | 45 %expanded3 = ptrtoint [4 x i8]* @PrimitiveInitConst to i32 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 62 ; objdump does not indicate what symbol the mov/relocation applies to | 68 ; objdump does not indicate what symbol the mov/relocation applies to |
| 63 ; so we grep for "mov {{.*}}, OFFSET, sec", along with | 69 ; so we grep for "mov {{.*}}, OFFSET, sec", along with |
| 64 ; "OFFSET {{.*}} sec {{.*}} symbol" in the symbol table as a sanity check. | 70 ; "OFFSET {{.*}} sec {{.*}} symbol" in the symbol table as a sanity check. |
| 65 ; NOTE: The symbol table sorting has no relation to the code's references. | 71 ; NOTE: The symbol table sorting has no relation to the code's references. |
| 66 ; IAS-LABEL: main | 72 ; IAS-LABEL: main |
| 67 ; SYMTAB-LABEL: SYMBOL TABLE | 73 ; SYMTAB-LABEL: SYMBOL TABLE |
| 68 | 74 |
| 69 ; SYMTAB-DAG: 00000000 {{.*}} .data {{.*}} PrimitiveInit | 75 ; SYMTAB-DAG: 00000000 {{.*}} .data {{.*}} PrimitiveInit |
| 70 ; IAS: mov {{.*}},0x0 {{.*}} .data | 76 ; IAS: mov {{.*}},0x0 {{.*}} .data |
| 71 ; IAS: call | 77 ; IAS: call |
| 78 ; IASARM32: movw {{.*}} PrimitiveInit |
| 79 ; IASARM32: movt {{.*}} PrimitiveInit |
| 80 ; IASARM32: bl |
| 72 | 81 |
| 73 ; SYMTAB-DAG: 00000000 {{.*}} .rodata {{.*}} PrimitiveInitConst | 82 ; SYMTAB-DAG: 00000000 {{.*}} .rodata {{.*}} PrimitiveInitConst |
| 74 ; IAS: mov {{.*}},0x0 {{.*}} .rodata | 83 ; IAS: mov {{.*}},0x0 {{.*}} .rodata |
| 75 ; IAS: call | 84 ; IAS: call |
| 85 ; IASARM32: movw {{.*}} PrimitiveInitConst |
| 86 ; IASARM32: movt {{.*}} PrimitiveInitConst |
| 87 ; IASARM32: bl |
| 76 | 88 |
| 77 ; SYMTAB-DAG: 00000000 {{.*}} .bss {{.*}} PrimitiveInitStatic | 89 ; SYMTAB-DAG: 00000000 {{.*}} .bss {{.*}} PrimitiveInitStatic |
| 78 ; IAS: mov {{.*}},0x0 {{.*}} .bss | 90 ; IAS: mov {{.*}},0x0 {{.*}} .bss |
| 79 ; IAS: call | 91 ; IAS: call |
| 92 ; IASARM32: movw {{.*}} PrimitiveInitStatic |
| 93 ; IASARM32: movt {{.*}} PrimitiveInitStatic |
| 94 ; IASARM32: bl |
| 80 | 95 |
| 81 ; SYMTAB-DAG: 00000004 {{.*}} .bss {{.*}} PrimitiveUninit | 96 ; SYMTAB-DAG: 00000004 {{.*}} .bss {{.*}} PrimitiveUninit |
| 82 ; IAS: mov {{.*}},0x4 {{.*}} .bss | 97 ; IAS: mov {{.*}},0x4 {{.*}} .bss |
| 83 ; IAS: call | 98 ; IAS: call |
| 99 ; IASARM32: movw {{.*}} PrimitiveUninit |
| 100 ; IASARM32: movt {{.*}} PrimitiveUninit |
| 101 ; IASARM32: bl |
| 84 | 102 |
| 85 ; SYMTAB-DAG: 00000004{{.*}}.data{{.*}}ArrayInit | 103 ; SYMTAB-DAG: 00000004{{.*}}.data{{.*}}ArrayInit |
| 86 ; IAS: mov {{.*}},0x4 {{.*}} .data | 104 ; IAS: mov {{.*}},0x4 {{.*}} .data |
| 87 ; IAS: call | 105 ; IAS: call |
| 106 ; IASARM32: movw {{.*}} ArrayInit |
| 107 ; IASARM32: movt {{.*}} ArrayInit |
| 108 ; IASARM32: bl |
| 88 | 109 |
| 89 ; SYMTAB-DAG: 00000018 {{.*}} .data {{.*}} ArrayInitPartial | 110 ; SYMTAB-DAG: 00000018 {{.*}} .data {{.*}} ArrayInitPartial |
| 90 ; IAS: mov {{.*}},0x18 {{.*}} .data | 111 ; IAS: mov {{.*}},0x18 {{.*}} .data |
| 91 ; IAS: call | 112 ; IAS: call |
| 113 ; IASARM32: movw {{.*}} ArrayInitPartial |
| 114 ; IASARM32: movt {{.*}} ArrayInitPartial |
| 115 ; IASARM32: bl |
| 92 | 116 |
| 93 ; SYMTAB-DAG: 00000008 {{.*}} .bss {{.*}} ArrayUninit | 117 ; SYMTAB-DAG: 00000008 {{.*}} .bss {{.*}} ArrayUninit |
| 94 ; IAS: mov {{.*}},0x8 {{.*}} .bss | 118 ; IAS: mov {{.*}},0x8 {{.*}} .bss |
| 95 ; IAS: call | 119 ; IAS: call |
| 96 | 120 ; IASARM32: movw {{.*}} ArrayUninit |
| 121 ; IASARM32: movt {{.*}} ArrayUninit |
| 122 ; IASARM32: bl |
| 97 | 123 |
| 98 declare void @use(i32) | 124 declare void @use(i32) |
| 99 | 125 |
| 100 define internal i32 @nacl_tp_tdb_offset(i32 %__0) { | 126 define internal i32 @nacl_tp_tdb_offset(i32 %__0) { |
| 101 entry: | 127 entry: |
| 102 ret i32 0 | 128 ret i32 0 |
| 103 } | 129 } |
| 104 | 130 |
| 105 define internal i32 @nacl_tp_tls_offset(i32 %size) { | 131 define internal i32 @nacl_tp_tls_offset(i32 %size) { |
| 106 entry: | 132 entry: |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 ; CHECK: .section .rodata,"a",%progbits | 204 ; CHECK: .section .rodata,"a",%progbits |
| 179 ; CHECK-NEXT: .p2align 2 | 205 ; CHECK-NEXT: .p2align 2 |
| 180 ; CHECK-NEXT: ArrayUninitConstInt: | 206 ; CHECK-NEXT: ArrayUninitConstInt: |
| 181 ; CHECK-NEXT: .zero 20 | 207 ; CHECK-NEXT: .zero 20 |
| 182 ; CHECK-NEXT: .size ArrayUninitConstInt, 20 | 208 ; CHECK-NEXT: .size ArrayUninitConstInt, 20 |
| 183 | 209 |
| 184 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 210 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
| 185 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 211 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
| 186 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 | 212 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 |
| 187 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 | 213 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 |
| OLD | NEW |