[llvm] [Test][ORC][JITLink] Preserve rbp in the test `ExecutionEngine/JITLink/x86-64/ELF_vtune.s` (PR #86472)
Wu Yingcong via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 01:03:30 PDT 2024
https://github.com/yingcong-wu created https://github.com/llvm/llvm-project/pull/86472
The callee should preserve rbx, 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. This patch add the missing command to preserve the rbx.
>From d203fedc15f081fda3177866d060ccf2d9385048 Mon Sep 17 00:00:00 2001
From: "Wu, Yingcong" <yingcong.wu at intel.com>
Date: Mon, 25 Mar 2024 00:57:15 -0700
Subject: [PATCH] preserve rbp
---
llvm/test/ExecutionEngine/JITLink/x86-64/ELF_vtune.s | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/llvm/test/ExecutionEngine/JITLink/x86-64/ELF_vtune.s b/llvm/test/ExecutionEngine/JITLink/x86-64/ELF_vtune.s
index 1c95bde51e1211..b734457c1ad7f7 100644
--- a/llvm/test/ExecutionEngine/JITLink/x86-64/ELF_vtune.s
+++ b/llvm/test/ExecutionEngine/JITLink/x86-64/ELF_vtune.s
@@ -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)
+ movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
- movl -4(%rbp), %ebx
+ movl -8(%rbp), %ebx
addl $1, %ebx
- movl $0, %eax
+ movl $0, %eax
+ popq %rbx
popq %rbp
.cfi_def_cfa 7, 8
ret
More information about the llvm-commits
mailing list