Skip to content

Commit

Permalink
[Test][JITLink] Save rbx in ExecutionEngine/JITLink/x86-64/ELF_vtune.s (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
yingcong-wu authored Apr 15, 2024
1 parent 466017c commit 9cb755c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions llvm/test/ExecutionEngine/JITLink/x86-64/ELF_vtune.s
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ main:
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
pushq %rbx
.cfi_def_cfa_register 6
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
movl -4(%rbp), %ebx
movl %edi, -16(%rbp)
movq %rsi, -24(%rbp)
movl -16(%rbp), %ebx
addl $1, %ebx
movl $0, %eax
movl $0, %eax
popq %rbx
popq %rbp
.cfi_def_cfa 7, 8
ret
Expand Down

0 comments on commit 9cb755c

Please sign in to comment.