OLD | NEW |
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: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
6 ; RUN: --target x8632 -i %s --args -O2 \ | 6 ; RUN: --target x8632 -i %s --args -O2 \ |
7 ; RUN: | %if --need=target_X8632 --command FileCheck %s | 7 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
8 ; RUN: %if --need=allow_dump --need=target_X8632 --command %p2i --filetype=asm \ | 8 ; RUN: %if --need=allow_dump --need=target_X8632 --command %p2i --filetype=asm \ |
9 ; RUN: --assemble --disassemble -i %s --args -O2 \ | 9 ; RUN: --assemble --disassemble -i %s --args -O2 \ |
10 ; RUN: | %if --need=allow_dump --need=target_X8632 --command FileCheck %s | 10 ; RUN: | %if --need=allow_dump --need=target_X8632 --command FileCheck %s |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 ; CHECK: call [[REGISTER]] | 84 ; CHECK: call [[REGISTER]] |
85 ; CHECK: call [[REGISTER]] | 85 ; CHECK: call [[REGISTER]] |
86 ; | 86 ; |
87 ; OPTM1-LABEL: CallIndirectGlobal | 87 ; OPTM1-LABEL: CallIndirectGlobal |
88 ; OPTM1: call [[TARGET:.+]] | 88 ; OPTM1: call [[TARGET:.+]] |
89 ; OPTM1: call [[TARGET]] | 89 ; OPTM1: call [[TARGET]] |
90 ; OPTM1: call [[TARGET]] | 90 ; OPTM1: call [[TARGET]] |
91 ; OPTM1: call [[TARGET]] | 91 ; OPTM1: call [[TARGET]] |
92 ; | 92 ; |
93 ; ARM32-LABEL: CallIndirectGlobal | 93 ; ARM32-LABEL: CallIndirectGlobal |
94 ; ARM32: blx [[REGISTER:r.*]] | 94 ; ARM32: blx {{r.*}} |
95 ; ARM32: blx [[REGISTER]] | 95 ; ARM32: blx [[REGISTER:r[0-9]*]] |
96 ; ARM32: blx [[REGISTER]] | 96 ; ARM32: blx [[REGISTER]] |
97 ; ARM32: blx [[REGISTER]] | 97 ; ARM32: blx [[REGISTER]] |
98 | 98 |
99 ; Calling an absolute address is used for non-IRT PNaCl pexes to directly | 99 ; Calling an absolute address is used for non-IRT PNaCl pexes to directly |
100 ; access syscall trampolines. This is not really an indirect call, but | 100 ; access syscall trampolines. This is not really an indirect call, but |
101 ; there is a cast from int to pointer first. | 101 ; there is a cast from int to pointer first. |
102 define internal void @CallConst() { | 102 define internal void @CallConst() { |
103 entry: | 103 entry: |
104 %__1 = inttoptr i32 66496 to void ()* | 104 %__1 = inttoptr i32 66496 to void ()* |
105 call void %__1() | 105 call void %__1() |
(...skipping 13 matching lines...) Expand all Loading... |
119 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* | 119 ; OPTM1: e8 bc 03 01 00 call {{[0-9a-f]+}} {{.*}} R_386_PC32 *ABS* |
120 ; | 120 ; |
121 ; ARM32-LABEL: CallConst | 121 ; ARM32-LABEL: CallConst |
122 ; ARM32: movw [[REGISTER:r.*]], #960 | 122 ; ARM32: movw [[REGISTER:r.*]], #960 |
123 ; ARM32: movt [[REGISTER]], #1 | 123 ; ARM32: movt [[REGISTER]], #1 |
124 ; ARM32: blx [[REGISTER]] | 124 ; ARM32: blx [[REGISTER]] |
125 ; The legalization of the constant could be shared, but it isn't. | 125 ; The legalization of the constant could be shared, but it isn't. |
126 ; ARM32: movw [[REGISTER:r.*]], #960 | 126 ; ARM32: movw [[REGISTER:r.*]], #960 |
127 ; ARM32: blx [[REGISTER]] | 127 ; ARM32: blx [[REGISTER]] |
128 ; ARM32: blx [[REGISTER]] | 128 ; ARM32: blx [[REGISTER]] |
OLD | NEW |