[PATCH] D13511: [mips] Use correct frame register for DWARF info when dynamically realigning the stack.
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 05:59:29 PDT 2015
vkalintiris added inline comments.
================
Comment at: lib/Target/Mips/MipsSEFrameLowering.cpp:588-593
@@ +587,8 @@
+
+ // Find out the correct register.
+ FrameReg = ABI.GetStackPtr();
+ if (hasBP(MF))
+ FrameReg = ABI.GetBasePtr();
+ else if (MRI->needsStackRealignment(MF))
+ FrameReg = ABI.GetStackPtr();
+
----------------
dsanders wrote:
> I'm surprised that the frame pointer isn't a possible choice here. Shouldn't MipsRegisterInfo::getFrameRegister() be called somewhere?
`MipsRegisterInfo::getFrameRegister()` computes the frame register ($sp or $fp). Here, we want to calculate the register + offset used for a specific frame index location. This can also include the base register $s7 when using dynamic stack realignment + VLAs.
http://reviews.llvm.org/D13511
More information about the llvm-commits
mailing list