Skip to content

Commit 39c7902

Browse files
author
Alexander Yermolovich
committed
updated tests
1 parent b83c335 commit 39c7902

16 files changed

+65
-334
lines changed

bolt/test/X86/Inputs/helperSafeICFGlobalConstPtrNoPic.s

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,8 @@
22
# #define MY_CONST const
33
# int FooVar = 1;
44
# int BarVar = 2;
5-
# [[clang::noinline]]
6-
# MY_CONST int barAddHdlper(int a, int b) {
7-
# return a + b;
8-
# }
9-
#
10-
# MY_CONST int (*const funcGlobalBarMulExt)(int, int) = barAddHdlper;
11-
# MY_CONST int fooGlobalFuncHelper(int a, int b) {
12-
# return 5 + funcGlobalBarMulExt(a, b);
13-
# }
14-
155
.text
166
.file "helper.cpp"
17-
.globl _Z12barAddHdlperii # -- Begin function _Z12barAddHdlperii
18-
.p2align 4, 0x90
19-
.type _Z12barAddHdlperii,@function
20-
_Z12barAddHdlperii: # @_Z12barAddHdlperii
21-
.cfi_startproc
22-
# %bb.0:
23-
pushq %rbp
24-
.cfi_def_cfa_offset 16
25-
.cfi_offset %rbp, -16
26-
movq %rsp, %rbp
27-
.cfi_def_cfa_register %rbp
28-
movl %edi, -4(%rbp)
29-
movl %esi, -8(%rbp)
30-
movl -4(%rbp), %eax
31-
addl -8(%rbp), %eax
32-
popq %rbp
33-
.cfi_def_cfa %rsp, 8
34-
retq
35-
.Lfunc_end0:
36-
.size _Z12barAddHdlperii, .Lfunc_end0-_Z12barAddHdlperii
37-
.cfi_endproc
38-
# -- End function
39-
.globl _Z19fooGlobalFuncHelperii # -- Begin function _Z19fooGlobalFuncHelperii
40-
.p2align 4, 0x90
41-
.type _Z19fooGlobalFuncHelperii,@function
42-
_Z19fooGlobalFuncHelperii: # @_Z19fooGlobalFuncHelperii
43-
.cfi_startproc
44-
# %bb.0:
45-
pushq %rbp
46-
.cfi_def_cfa_offset 16
47-
.cfi_offset %rbp, -16
48-
movq %rsp, %rbp
49-
.cfi_def_cfa_register %rbp
50-
subq $16, %rsp
51-
movl %edi, -4(%rbp)
52-
movl %esi, -8(%rbp)
53-
movl -4(%rbp), %edi
54-
movl -8(%rbp), %esi
55-
callq _Z12barAddHdlperii
56-
addl $5, %eax
57-
addq $16, %rsp
58-
popq %rbp
59-
.cfi_def_cfa %rsp, 8
60-
retq
61-
.Lfunc_end1:
62-
.size _Z19fooGlobalFuncHelperii, .Lfunc_end1-_Z19fooGlobalFuncHelperii
63-
.cfi_endproc
64-
# -- End function
657
.type FooVar,@object # @FooVar
668
.data
679
.globl FooVar
@@ -80,4 +22,3 @@ BarVar:
8022
.ident "clang version 20.0.0git"
8123
.section ".note.GNU-stack","",@progbits
8224
.addrsig
83-
.addrsig_sym _Z12barAddHdlperii

bolt/test/X86/Inputs/helperSafeICFGlobalConstPtrPic.s

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,8 @@
22
# #define MY_CONST const
33
# int FooVar = 1;
44
# int BarVar = 2;
5-
# [[clang::noinline]]
6-
# MY_CONST int barAddHdlper(int a, int b) {
7-
# return a + b;
8-
# }
9-
#
10-
# MY_CONST int (*const funcGlobalBarMulExt)(int, int) = barAddHdlper;
11-
# MY_CONST int fooGlobalFuncHelper(int a, int b) {
12-
# return 5 + funcGlobalBarMulExt(a, b);
13-
# }
14-
15-
165
.text
176
.file "helper.cpp"
18-
.globl _Z12barAddHdlperii # -- Begin function _Z12barAddHdlperii
19-
.p2align 4, 0x90
20-
.type _Z12barAddHdlperii,@function
21-
_Z12barAddHdlperii: # @_Z12barAddHdlperii
22-
.cfi_startproc
23-
# %bb.0:
24-
pushq %rbp
25-
.cfi_def_cfa_offset 16
26-
.cfi_offset %rbp, -16
27-
movq %rsp, %rbp
28-
.cfi_def_cfa_register %rbp
29-
movl %edi, -4(%rbp)
30-
movl %esi, -8(%rbp)
31-
movl -4(%rbp), %eax
32-
addl -8(%rbp), %eax
33-
popq %rbp
34-
.cfi_def_cfa %rsp, 8
35-
retq
36-
.Lfunc_end0:
37-
.size _Z12barAddHdlperii, .Lfunc_end0-_Z12barAddHdlperii
38-
.cfi_endproc
39-
# -- End function
40-
.globl _Z19fooGlobalFuncHelperii # -- Begin function _Z19fooGlobalFuncHelperii
41-
.p2align 4, 0x90
42-
.type _Z19fooGlobalFuncHelperii,@function
43-
_Z19fooGlobalFuncHelperii: # @_Z19fooGlobalFuncHelperii
44-
.cfi_startproc
45-
# %bb.0:
46-
pushq %rbp
47-
.cfi_def_cfa_offset 16
48-
.cfi_offset %rbp, -16
49-
movq %rsp, %rbp
50-
.cfi_def_cfa_register %rbp
51-
subq $16, %rsp
52-
movl %edi, -4(%rbp)
53-
movl %esi, -8(%rbp)
54-
movl -4(%rbp), %edi
55-
movl -8(%rbp), %esi
56-
callq _Z12barAddHdlperii
57-
addl $5, %eax
58-
addq $16, %rsp
59-
popq %rbp
60-
.cfi_def_cfa %rsp, 8
61-
retq
62-
.Lfunc_end1:
63-
.size _Z19fooGlobalFuncHelperii, .Lfunc_end1-_Z19fooGlobalFuncHelperii
64-
.cfi_endproc
65-
# -- End function
667
.type FooVar,@object # @FooVar
678
.data
689
.globl FooVar
@@ -81,4 +22,3 @@ BarVar:
8122
.ident "clang version 20.0.0git"
8223
.section ".note.GNU-stack","",@progbits
8324
.addrsig
84-
.addrsig_sym _Z12barAddHdlperii

0 commit comments

Comments
 (0)