mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
[PowerPC] [SSP] Fix stack guard load for 32-bit.
r266809 incorrectly used LD to load the stack guard, it should be LWZ. Differential Revision: http://reviews.llvm.org/D19358 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267017 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e69bdcfeab
commit
8ac661cafb
@ -1864,7 +1864,7 @@ bool PPCInstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
|
||||
"Only Linux target is expected to contain LOAD_STACK_GUARD");
|
||||
const int64_t Offset = Subtarget.isPPC64() ? -0x7010 : -0x7008;
|
||||
const unsigned Reg = Subtarget.isPPC64() ? PPC::X13 : PPC::R2;
|
||||
MI->setDesc(get(PPC::LD));
|
||||
MI->setDesc(get(Subtarget.isPPC64() ? PPC::LD : PPC::LWZ));
|
||||
MachineInstrBuilder(*MI->getParent()->getParent(), MI)
|
||||
.addImm(Offset)
|
||||
.addReg(Reg);
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
; DARWIN32: __stack_chk_guard
|
||||
; DARWIN64: __stack_chk_guard
|
||||
; LINUX32: ld {{[0-9]+}}, -28680(2)
|
||||
; LINUX32: lwz {{[0-9]+}}, -28680(2)
|
||||
; LINUX64: ld {{[0-9]+}}, -28688(13)
|
||||
|
||||
; DARWIN32: __stack_chk_fail
|
||||
|
Loading…
Reference in New Issue
Block a user