| Index: tests_lit/reader_tests/globalinit.pnacl.ll
|
| diff --git a/tests_lit/reader_tests/globalinit.pnacl.ll b/tests_lit/reader_tests/globalinit.pnacl.ll
|
| index cd4fda313ce03b97279459e6bb27179dcc49fed3..e1330ac2f7d58f733646b4ea1a247dfb977aa135 100644
|
| --- a/tests_lit/reader_tests/globalinit.pnacl.ll
|
| +++ b/tests_lit/reader_tests/globalinit.pnacl.ll
|
| @@ -1,11 +1,18 @@
|
| ; Test of global initializers.
|
|
|
| +; Test -ias=0 to test the lea "hack" until we are fully confident in -ias=1
|
| ; Check that we generate proper global initializers.
|
| -; RUN: %p2i -i %s --args -verbose inst | FileCheck %s
|
| +; RUN: %p2i -i %s --args -verbose none -ias=0 | FileCheck %s
|
|
|
| -; Check that what we generate is valid assembly
|
| +; Test -ias=1 and try to cross reference instructions w/ the symbol table.
|
| ; RUN: %p2i -i %s --args -verbose none \
|
| -; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj
|
| +; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
|
| +; RUN: | llvm-objdump -d -r --symbolize -x86-asm-syntax=intel - \
|
| +; RUN: | FileCheck --check-prefix=IAS %s
|
| +; RUN: %p2i -i %s --args --verbose none \
|
| +; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
|
| +; RUN: | llvm-objdump -d -t --symbolize -x86-asm-syntax=intel - \
|
| +; RUN: | FileCheck --check-prefix=SYMTAB %s
|
|
|
| ; Check that we don't generate errors
|
| ; RUN: %p2i -i %s --args -verbose none | FileCheck --check-prefix=ERRORS %s
|
| @@ -119,6 +126,49 @@ entry:
|
| ; CHECK: leal ArrayUninit,
|
| ; CHECK: .intel_syntax
|
|
|
| +; llvm-objdump does not indicate what symbol the mov/relocation applies to
|
| +; so we grep for "mov {{.*}}, OFFSET", along with "OFFSET {{.*}} symbol" in
|
| +; the symbol table as a sanity check. NOTE: The symbol table sorting has no
|
| +; relation to the code's references.
|
| +; IAS-LABEL: main
|
| +; SYMTAB-LABEL: SYMBOL TABLE
|
| +
|
| +; SYMTAB-DAG: 00000000 {{.*}} .data {{.*}} PrimitiveInit
|
| +; IAS: mov {{.*}}, 0
|
| +; IAS-NEXT: R_386_32
|
| +; IAS: call
|
| +
|
| +; SYMTAB-DAG: 00000000 {{.*}} .rodata {{.*}} PrimitiveInitConst
|
| +; IAS: mov {{.*}}, 0
|
| +; IAS-NEXT: R_386_32
|
| +; IAS: call
|
| +
|
| +; SYMTAB-DAG: 00000000 {{.*}} .bss {{.*}} PrimitiveInitStatic
|
| +; IAS: mov {{.*}}, 0
|
| +; IAS-NEXT: R_386_32
|
| +; IAS: call
|
| +
|
| +; SYMTAB-DAG: 00000004 {{.*}} .bss {{.*}} PrimitiveUninit
|
| +; IAS: mov {{.*}}, 4
|
| +; IAS-NEXT: R_386_32
|
| +; IAS: call
|
| +
|
| +; SYMTAB-DAG: 00000004{{.*}}.data{{.*}}ArrayInit
|
| +; IAS: mov {{.*}}, 4
|
| +; IAS-NEXT: R_386_32
|
| +; IAS: call
|
| +
|
| +; SYMTAB-DAG: 00000018 {{.*}} .data {{.*}} ArrayInitPartial
|
| +; IAS: mov {{.*}}, 24
|
| +; IAS-NEXT: R_386_32
|
| +; IAS: call
|
| +
|
| +; SYMTAB-DAG: 00000008 {{.*}} .bss {{.*}} ArrayUninit
|
| +; IAS: mov {{.*}}, 8
|
| +; IAS-NEXT: R_386_32
|
| +; IAS: call
|
| +
|
| +
|
| declare void @use(i32)
|
|
|
| define internal i32 @nacl_tp_tdb_offset(i32 %__0) {
|
|
|