[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCRegisterInfo.cpp
Reid Spencer
reid at x10sys.com
Sun Aug 8 18:32:37 PDT 2004
Whoops, forgot to give Nate credit for this commit. It certainly wasn't
me who fixed it :)
Reid.
On Sun, 2004-08-08 at 18:24, Reid Spencer wrote:
> Changes in directory llvm/lib/Target/PowerPC:
>
> PowerPCRegisterInfo.cpp updated: 1.24 -> 1.25
> ---
> Log message:
>
> Fix stack size processing now that the return address isn't an implied
> push onto the top of the stack like x86, which uses the local area
> offset. This will allow the removal of PowerPCPEI.cpp soon.
>
>
> ---
> Diffs of the changes: (+4 -2)
>
> Index: llvm/lib/Target/PowerPC/PowerPCRegisterInfo.cpp
> diff -u llvm/lib/Target/PowerPC/PowerPCRegisterInfo.cpp:1.24 llvm/lib/Target/PowerPC/PowerPCRegisterInfo.cpp:1.25
> --- llvm/lib/Target/PowerPC/PowerPCRegisterInfo.cpp:1.24 Fri Aug 6 01:58:50 2004
> +++ llvm/lib/Target/PowerPC/PowerPCRegisterInfo.cpp Sun Aug 8 20:24:32 2004
> @@ -210,9 +210,11 @@
> // Do we need to allocate space on the stack?
> if (NumBytes == 0) return;
>
> - // Round the size to a multiple of the alignment
> + // Add the size of R1 to NumBytes size for the store of R1 to the bottom
> + // of the stack and round the size to a multiple of the alignment.
> unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment();
> - NumBytes = (NumBytes+Align-1)/Align*Align;
> + unsigned Size = getRegClass(PPC32::R1)->getSize();
> + NumBytes = (NumBytes+Size+Align-1)/Align*Align;
>
> // Update frame info to pretend that this is part of the stack...
> MFI->setStackSize(NumBytes);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20040808/f71f46ff/attachment.sig>
More information about the llvm-commits
mailing list