Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: tests_lit/llvm2ice_tests/callindirect.pnacl.ll

Issue 1017373002: Subzero: Assemble calls to constant addresses. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: move test back Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/main.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Test of multiple indirect calls to the same target. Each call 1 ; Test of multiple indirect calls to the same target. Each call
2 ; should be to the same operand, whether it's in a register or on the 2 ; should be to the same operand, whether it's in a register or on the
3 ; stack. 3 ; stack.
4 4
5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \
6 ; RUN: | FileCheck %s 6 ; RUN: | FileCheck %s
7 ; RUN: %if --need=allow_dump --command %p2i --filetype=asm --assemble \
8 ; RUN: --disassemble -i %s --args -O2 \
9 ; RUN: | %if --need=allow_dump --command FileCheck %s
7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ 10 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \
8 ; RUN: | FileCheck --check-prefix=OPTM1 %s 11 ; RUN: | FileCheck --check-prefix=OPTM1 %s
9 12
10 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 13 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
11 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 14 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4
12 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 15 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8
13 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 16 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4
14 17
15 define internal void @CallIndirect(i32 %f) { 18 define internal void @CallIndirect(i32 %f) {
16 entry: 19 entry:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ; CHECK: call [[REGISTER]] 58 ; CHECK: call [[REGISTER]]
56 ; CHECK: call [[REGISTER]] 59 ; CHECK: call [[REGISTER]]
57 ; 60 ;
58 ; OPTM1-LABEL: CallIndirectGlobal 61 ; OPTM1-LABEL: CallIndirectGlobal
59 ; OPTM1: call [[TARGET:.+]] 62 ; OPTM1: call [[TARGET:.+]]
60 ; OPTM1: call [[TARGET]] 63 ; OPTM1: call [[TARGET]]
61 ; OPTM1: call [[TARGET]] 64 ; OPTM1: call [[TARGET]]
62 ; OPTM1: call [[TARGET]] 65 ; OPTM1: call [[TARGET]]
63 66
64 ; Calling an absolute address is used for non-IRT PNaCl pexes to directly 67 ; Calling an absolute address is used for non-IRT PNaCl pexes to directly
65 ; access syscall trampolines. Do we need to support this? 68 ; access syscall trampolines. This is not really an indirect call, but
66 ; define internal void @CallIndirectConst() { 69 ; there is a cast from int to pointer first.
67 ; entry: 70 define internal void @CallConst() {
68 ; %__1 = inttoptr i32 66496 to void ()* 71 entry:
69 ; call void %__1() 72 %__1 = inttoptr i32 66496 to void ()*
70 ; call void %__1() 73 call void %__1()
71 ; call void %__1() 74 call void %__1()
72 ; call void %__1() 75 call void %__1()
73 ; call void %__1() 76 ret void
74 ; ret void 77 }
75 ; } 78
79 ; CHECK-LABEL: CallConst
80 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS*
81 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS*
82 ; CHECK: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS*
83 ;
84 ; OPTM1-LABEL: CallConst
85 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS*
86 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS*
87 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS*
OLDNEW
« no previous file with comments | « src/main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698