[PATCH] D144625: [X86] Fix the base pointer save/restore bug
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 01:13:05 PST 2023
LuoYuanke created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
LuoYuanke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Previous the stack slot for spilling base pointer register is allocated
after the stack realignment. When the stack is naturally aligned the
stack slot is share with other data that allocated from stack and cause
data corrupt. Another issue is the stack slot for save/restore the
callee saved register is not fixed for each function. It depends on the
register usage of them in each function.
This patch is to recalculate the offset the stack slot for base pointer
register during the prolog/epilog insert pass, and allocate the stack
slot when spilling callee saved registers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144625
Files:
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86MachineFunctionInfo.cpp
llvm/lib/Target/X86/X86MachineFunctionInfo.h
llvm/test/CodeGen/X86/sjlj-baseptr.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144625.499763.patch
Type: text/x-patch
Size: 4504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230223/7cb3f351/attachment.bin>
More information about the llvm-commits
mailing list