mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-05 12:31:46 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
21a996a0e3
commit
7fa889dd87
@ -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…
x
Reference in New Issue
Block a user