[PATCH] D24093: [PPC] Claim stack frame before storing into it, if no red zone is present

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 10:58:25 PDT 2016


kparzysz created this revision.
kparzysz added a reviewer: hfinkel.
kparzysz added a subscriber: llvm-commits.
kparzysz set the repository for this revision to rL LLVM.
Herald added a subscriber: nemanjai.

PPC32/SVRV4 does not have red zone.  Despite that, the frame lowering code would first save all required registers, and then update the stack pointer at the end.

This is ok on PPC64, but on PPC32 in the absence of the red zone there is no guarantee that this part of the stack will not be modified by any interrupt.  To avoid this, make sure to claim the stack frame first before storing into it.

https://llvm.org/bugs/show_bug.cgi?id=26519

Repository:
  rL LLVM

https://reviews.llvm.org/D24093

Files:
  lib/Target/PowerPC/PPCFrameLowering.cpp
  test/CodeGen/PowerPC/crsave.ll
  test/CodeGen/PowerPC/empty-functions.ll
  test/CodeGen/PowerPC/ppc32-pic-large.ll
  test/CodeGen/PowerPC/ppc32-pic.ll
  test/CodeGen/PowerPC/stack-realign.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24093.69885.patch
Type: text/x-patch
Size: 10427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160831/dcc9f57e/attachment.bin>


More information about the llvm-commits mailing list