llvm.org GIT mirror llvm / 8ac661c
[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 Marcin Koscielnicki 4 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
18631863 "Only Linux target is expected to contain LOAD_STACK_GUARD");
18641864 const int64_t Offset = Subtarget.isPPC64() ? -0x7010 : -0x7008;
18651865 const unsigned Reg = Subtarget.isPPC64() ? PPC::X13 : PPC::R2;
1866 MI->setDesc(get(PPC::LD));
1866 MI->setDesc(get(Subtarget.isPPC64() ? PPC::LD : PPC::LWZ));
18671867 MachineInstrBuilder(*MI->getParent()->getParent(), MI)
18681868 .addImm(Offset)
18691869 .addReg(Reg);
44
55 ; DARWIN32: __stack_chk_guard
66 ; DARWIN64: __stack_chk_guard
7 ; LINUX32: ld {{[0-9]+}}, -28680(2)
7 ; LINUX32: lwz {{[0-9]+}}, -28680(2)
88 ; LINUX64: ld {{[0-9]+}}, -28688(13)
99
1010 ; DARWIN32: __stack_chk_fail