Add a FIXME about access to negative stack-pointer offsets on PPC32.
authorHal Finkel <hfinkel@anl.gov>
Sat, 19 May 2012 21:52:55 +0000 (21:52 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 19 May 2012 21:52:55 +0000 (21:52 +0000)
The current code will generate a prologue which starts with something like:
        mflr 0
        stw 31, -4(1)
        stw 0, 4(1)
        stwu 1, -16(1)

But under the PPC32 SVR4 ABI, access to negative offsets from R1 is not allowed.

This was pointed out by Peter Bergner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157133 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCFrameLowering.cpp

index 5950290ca27e91d1ef066759a6fe707aeefe6fb3..be172c2435587e80d5da1f421bfa9953f41e9f46 100644 (file)
@@ -330,6 +330,8 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF) const {
       BuildMI(MBB, MBBI, dl, TII.get(PPC::MFLR), PPC::R0);
 
     if (HasFP)
+      // FIXME: On PPC32 SVR4, FPOffset is negative and access to negative
+      // offsets of R1 is not allowed.
       BuildMI(MBB, MBBI, dl, TII.get(PPC::STW))
         .addReg(PPC::R31)
         .addImm(FPOffset)