[PATCH] D144541: [X86] Save/restore base pointer register when it is clobbered
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 25 16:30:12 PST 2023
LuoYuanke added a comment.
In D144541#4152619 <https://reviews.llvm.org/D144541#4152619>, @efriedma wrote:
> What happens if an inline asm both has a memory reference, and clobbers the base pointer? How do we refer to memory?
That's a good question. Maybe exchange ebp and esi. Base pointer (esi) is used to reference the stack slot before realignment and frame pointer (ebp) is used to reference stack slot after realignment. Since ebp is reserved in ABI, user can not clobber ebp in inline assembly. What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144541/new/
https://reviews.llvm.org/D144541
More information about the llvm-commits
mailing list