[PATCH] D109203: [X86] Don't clobber EBX in stackprobes
Elliot Saba via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 3 10:27:03 PDT 2021
staticfloat marked 2 inline comments as done.
staticfloat added inline comments.
================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:655
- Register FinalStackProbed = Uses64BitFramePtr ? X86::R11 : X86::R11D;
+ Register FinalStackProbed = Uses64BitFramePtr ? X86::R11 : X86::EAX;
BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::COPY), FinalStackProbed)
----------------
pengfei wrote:
> How about x32, a model that using 32 bit pointer on 64bit target? Can we use
> ```
> Register FinalStackProbed = Uses64BitFramePtr ? X86::R11 : Is64Bit ? X86::R11D : X86::EAX;
> ```
Ah, good thinking. Better to use these registers when we can. Updated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109203/new/
https://reviews.llvm.org/D109203
More information about the llvm-commits
mailing list