[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:
Marcin Koscielnicki 2016-04-21 17:36:05 +00:00
parent e69bdcfeab
commit 8ac661cafb
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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