1
- ; RUN: llc < %s -mtriple=i686-pc-windows-msvc | FileCheck %s -check-prefix=X32
1
+ ; RUN: llc < %s -mtriple=i686-pc-windows-msvc | FileCheck %s -check-prefix=X86
2
2
; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc | FileCheck %s -check-prefixes=X64,X64_MSVC
3
- ; RUN: llc < %s -mtriple=i686-w64-windows-gnu | FileCheck %s -check-prefixes=X32,X32_MINGW
3
+ ; RUN: llc < %s -mtriple=i686-w64-windows-gnu | FileCheck %s -check-prefixes=X86,X86_MINGW
4
4
; RUN: llc < %s -mtriple=x86_64-w64-windows-gnu | FileCheck %s -check-prefixes=X64,X64_MINGW
5
5
; Control Flow Guard is currently only available on Windows
6
6
@@ -19,10 +19,10 @@ entry:
19
19
%1 = call i32 %0 () #0
20
20
ret i32 %1
21
21
22
- ; X32 -LABEL: func_guard_nocf
23
- ; X32: movl $_target_func, %eax
24
- ; X32 -NOT: __guard_check_icall_fptr
25
- ; X32: calll *%eax
22
+ ; X86 -LABEL: func_guard_nocf
23
+ ; X86: movl $_target_func, %eax
24
+ ; X86 -NOT: __guard_check_icall_fptr
25
+ ; X86: calll *%eax
26
26
27
27
; X64-LABEL: func_guard_nocf
28
28
; X64: leaq target_func(%rip), %rax
@@ -43,12 +43,12 @@ entry:
43
43
ret i32 %1
44
44
45
45
; On i686, the call to __guard_check_icall_fptr should come immediately before the call to the target function.
46
- ; X32 -LABEL: func_optnone_cf
47
- ; X32: leal _target_func, %eax
48
- ; X32: movl %eax, (%esp)
49
- ; X32: movl (%esp), %ecx
50
- ; X32: calll *___guard_check_icall_fptr
51
- ; X32 -NEXT: calll *%ecx
46
+ ; X86 -LABEL: func_optnone_cf
47
+ ; X86: leal _target_func, %eax
48
+ ; X86: movl %eax, (%esp)
49
+ ; X86: movl (%esp), %ecx
50
+ ; X86: calll *___guard_check_icall_fptr
51
+ ; X86 -NEXT: calll *%ecx
52
52
53
53
; On x86_64, __guard_dispatch_icall_fptr tail calls the function, so there should be only one call instruction.
54
54
; X64-LABEL: func_optnone_cf
@@ -70,11 +70,11 @@ entry:
70
70
ret i32 %1
71
71
72
72
; On i686, the call to __guard_check_icall_fptr should come immediately before the call to the target function.
73
- ; X32 -LABEL: func_cf
74
- ; X32: movl $_target_func, %esi
75
- ; X32: movl $_target_func, %ecx
76
- ; X32: calll *___guard_check_icall_fptr
77
- ; X32 -NEXT: calll *%esi
73
+ ; X86 -LABEL: func_cf
74
+ ; X86: movl $_target_func, %esi
75
+ ; X86: movl $_target_func, %ecx
76
+ ; X86: calll *___guard_check_icall_fptr
77
+ ; X86 -NEXT: calll *%esi
78
78
79
79
; On x86_64, __guard_dispatch_icall_fptr tail calls the function, so there should be only one call instruction.
80
80
; X64-LABEL: func_cf
@@ -102,14 +102,14 @@ lpad: ; preds = %entry
102
102
ret i32 -1
103
103
104
104
; On i686, the call to __guard_check_icall_fptr should come immediately before the call to the target function.
105
- ; X32 -LABEL: func_cf_invoke
106
- ; X32: movl $_target_func, %esi
107
- ; X32: movl $_target_func, %ecx
108
- ; X32: calll *___guard_check_icall_fptr
109
- ; X32_MINGW -NEXT: Ltmp0:
110
- ; X32 -NEXT: calll *%esi
111
- ; X32 : # %invoke.cont
112
- ; X32 : # %lpad
105
+ ; X86 -LABEL: func_cf_invoke
106
+ ; X86: movl $_target_func, %esi
107
+ ; X86: movl $_target_func, %ecx
108
+ ; X86: calll *___guard_check_icall_fptr
109
+ ; X86_MINGW -NEXT: Ltmp0:
110
+ ; X86 -NEXT: calll *%esi
111
+ ; X86 : # %invoke.cont
112
+ ; X86 : # %lpad
113
113
114
114
; On x86_64, __guard_dispatch_icall_fptr tail calls the function, so there should be only one call instruction.
115
115
; X64-LABEL: func_cf_invoke
@@ -135,11 +135,11 @@ entry:
135
135
ret double %1
136
136
137
137
; On i686, the call to __guard_check_icall_fptr should come immediately before the call to the target function.
138
- ; X32 -LABEL: func_cf_doubles
139
- ; X32: movl $_target_func_doubles, %esi
140
- ; X32: movl $_target_func_doubles, %ecx
141
- ; X32: calll *___guard_check_icall_fptr
142
- ; X32: calll *%esi
138
+ ; X86 -LABEL: func_cf_doubles
139
+ ; X86: movl $_target_func_doubles, %esi
140
+ ; X86: movl $_target_func_doubles, %ecx
141
+ ; X86: calll *___guard_check_icall_fptr
142
+ ; X86: calll *%esi
143
143
144
144
145
145
; On x86_64, __guard_dispatch_icall_fptr tail calls the function, so there should be only one call instruction.
@@ -169,12 +169,12 @@ entry:
169
169
ret i32 %1
170
170
171
171
; On i686, the call to __guard_check_icall_fptr should come immediately before the call to the target function.
172
- ; X32 -LABEL: func_cf_tail
173
- ; X32: movl $_target_func, %ecx
174
- ; X32: calll *___guard_check_icall_fptr
175
- ; X32: movl $_target_func, %eax
176
- ; X32: jmpl *%eax # TAILCALL
177
- ; X32 -NOT: calll
172
+ ; X86 -LABEL: func_cf_tail
173
+ ; X86: movl $_target_func, %ecx
174
+ ; X86: calll *___guard_check_icall_fptr
175
+ ; X86: movl $_target_func, %eax
176
+ ; X86: jmpl *%eax # TAILCALL
177
+ ; X86 -NOT: calll
178
178
179
179
; X64-LABEL: func_cf_tail
180
180
; X64: leaq target_func(%rip), %rax
@@ -197,14 +197,14 @@ entry:
197
197
ret i32 %rv
198
198
199
199
; On i686, the call to __guard_check_icall_fptr should come immediately before the call to the target function.
200
- ; X32 -LABEL: _vmptr_thunk:
201
- ; X32 : movl %eax, %esi
202
- ; X32 : movl (%eax), %eax
203
- ; X32 : movl 4(%eax), %ecx
204
- ; X32 : calll *___guard_check_icall_fptr
205
- ; X32 : movl %esi, %eax
206
- ; X32 : jmpl *%ecx # TAILCALL
207
- ; X32 -NOT: calll
200
+ ; X86 -LABEL: _vmptr_thunk:
201
+ ; X86 : movl %eax, %esi
202
+ ; X86 : movl (%eax), %eax
203
+ ; X86 : movl 4(%eax), %ecx
204
+ ; X86 : calll *___guard_check_icall_fptr
205
+ ; X86 : movl %esi, %eax
206
+ ; X86 : jmpl *%ecx # TAILCALL
207
+ ; X86 -NOT: calll
208
208
209
209
; Use NEXT here because we previously had an extra instruction in this sequence.
210
210
; X64-LABEL: vmptr_thunk:
@@ -227,9 +227,9 @@ define i32 @func_cf_setjmp() {
227
227
%3 = call ptr @llvm.frameaddress (i32 0 )
228
228
%4 = call i32 @_setjmp (ptr @buf1 , ptr %3 ) #2
229
229
230
- ; X32 -LABEL: func_cf_setjmp
231
- ; X32 : calll __setjmp
232
- ; X32 -NEXT: $cfgsj_func_cf_setjmp0:
230
+ ; X86 -LABEL: func_cf_setjmp
231
+ ; X86 : calll __setjmp
232
+ ; X86 -NEXT: $cfgsj_func_cf_setjmp0:
233
233
234
234
; X64-LABEL: func_cf_setjmp
235
235
; X64: callq _setjmp
@@ -238,8 +238,8 @@ define i32 @func_cf_setjmp() {
238
238
%5 = call ptr @llvm.frameaddress (i32 0 )
239
239
%6 = call i32 @_setjmp (ptr @buf1 , ptr %5 ) #2
240
240
241
- ; X32 : calll __setjmp
242
- ; X32 -NEXT: $cfgsj_func_cf_setjmp1:
241
+ ; X86 : calll __setjmp
242
+ ; X86 -NEXT: $cfgsj_func_cf_setjmp1:
243
243
244
244
; X64: callq _setjmp
245
245
; X64-NEXT: $cfgsj_func_cf_setjmp1:
@@ -248,9 +248,9 @@ define i32 @func_cf_setjmp() {
248
248
%7 = load i32 , ptr %2 , align 4
249
249
ret i32 %7
250
250
251
- ; X32 : .section .gljmp$y,"dr"
252
- ; X32 -NEXT: .symidx $cfgsj_func_cf_setjmp0
253
- ; X32 -NEXT: .symidx $cfgsj_func_cf_setjmp1
251
+ ; X86 : .section .gljmp$y,"dr"
252
+ ; X86 -NEXT: .symidx $cfgsj_func_cf_setjmp0
253
+ ; X86 -NEXT: .symidx $cfgsj_func_cf_setjmp1
254
254
255
255
; X64: .section .gljmp$y,"dr"
256
256
; X64-NEXT: .symidx $cfgsj_func_cf_setjmp0
0 commit comments