Skip to content

Commit 9cb755c

Browse files
authored
[Test][JITLink] Save rbx in ExecutionEngine/JITLink/x86-64/ELF_vtune.s (#86472)
The callee should preserve rbx according to the calling convention, but it is not in the test case `ExecutionEngine/JITLink/x86-64/ELF_vtune.s`. Not preserving the rbx register may result in some random error to the caller function. This patch adds the missing command to preserve the rbx.
1 parent 466017c commit 9cb755c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/test/ExecutionEngine/JITLink/x86-64/ELF_vtune.s

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ main:
2020
.cfi_def_cfa_offset 16
2121
.cfi_offset 6, -16
2222
movq %rsp, %rbp
23+
pushq %rbx
2324
.cfi_def_cfa_register 6
24-
movl %edi, -4(%rbp)
25-
movq %rsi, -16(%rbp)
26-
movl -4(%rbp), %ebx
25+
movl %edi, -16(%rbp)
26+
movq %rsi, -24(%rbp)
27+
movl -16(%rbp), %ebx
2728
addl $1, %ebx
28-
movl $0, %eax
29+
movl $0, %eax
30+
popq %rbx
2931
popq %rbp
3032
.cfi_def_cfa 7, 8
3133
ret

0 commit comments

Comments
 (0)