mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[X86] Use a better sentinel offset for the FrameAddr index
Other pieces of CodeGen want to negate frame object offsets to account for architectures where the stack grows down. Our object is a pseudo object so it's offset doesn't matter. However, we shouldn't choose an offset which results in undefined behavior if you negate it. llvm-svn: 237474
This commit is contained in:
parent
0c6b91deee
commit
eec8124e55
@ -15637,7 +15637,7 @@ SDValue X86TargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const {
|
||||
// Set up a frame object for the return address.
|
||||
unsigned SlotSize = RegInfo->getSlotSize();
|
||||
FrameAddrIndex = MF.getFrameInfo()->CreateFixedObject(
|
||||
SlotSize, /*Offset=*/INT64_MIN, /*IsImmutable=*/false);
|
||||
SlotSize, /*Offset=*/0, /*IsImmutable=*/false);
|
||||
FuncInfo->setFAIndex(FrameAddrIndex);
|
||||
}
|
||||
return DAG.getFrameIndex(FrameAddrIndex, VT);
|
||||
|
Loading…
Reference in New Issue
Block a user