[SystemZ] Return the right offsets from getCalleeSavedSpillSlots().
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 25 Nov 2019 17:48:47 +0000 (18:48 +0100)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 25 Nov 2019 18:03:05 +0000 (19:03 +0100)
commita7d3f6933ddbbd1c0b20529a0734ed66f98d75a0
treea8e5526fdaf52596357b3a156e8a28084ee3220c
parentaaf7f05a96e6c21b7a6d1ad9e73fb7ab5eee7d83
[SystemZ]  Return the right offsets from getCalleeSavedSpillSlots().

// Due to the SystemZ ABI, the DWARF CFA (Canonical Frame Address) is not
// equal to the incoming stack pointer, but to incoming stack pointer plus
// 160.  The getOffsetOfLocalArea() returned value is interpreted as "the
// offset of the local area from the CFA".

The immediate offsets into the Register save area returned by
getCalleeSavedSpillSlots() should take this offset into account, which this
patch makes sure of.

Patch and review by Ulrich Weigand.
https://reviews.llvm.org/D70427
llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
llvm/test/CodeGen/SystemZ/anyregcc-novec.ll