[PowerPC] Add ROP Protection to prologue and epilogue
authorStefan Pintilie <stefanp@ca.ibm.com>
Thu, 13 May 2021 14:58:59 +0000 (09:58 -0500)
committerStefan Pintilie <stefanp@ca.ibm.com>
Thu, 13 May 2021 17:54:44 +0000 (12:54 -0500)
commit54310fc176fde539b15f3cc95d4a3555df446ff6
treec2bc626c83352d8ec76d422683500aa1c705aec6
parent50e0b2985e43baf61617c9734df71e949113f911
[PowerPC] Add ROP Protection to prologue and epilogue

Added hashst to the prologue and hashchk to the epilogue.
The hash for the prologue and epilogue must always be stored as the first
element in the local variable space on the stack.

Reviewed By: nemanjai, #powerpc

Differential Revision: https://reviews.llvm.org/D99377
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
llvm/lib/Target/PowerPC/PPCRegisterInfo.h
llvm/test/CodeGen/PowerPC/ppc64-rop-protection.ll [new file with mode: 0644]