================
@@ -2720,6 +2721,30 @@ static SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG)
{
Align(std::min(PtrVT.getFixedSizeInBits(), VT.getFixedSizeInBits()) /
8));
}
+static SDValue LowerSTACKADDRESS(SDValue Op, SelectionDAG &DAG,
+ const SparcSubtarget *Subtarget) {
+ SDValue Chain = Op.getOperand(0);
+ EVT VT = Op->getValueType(0);
+ SDLoc DL(Op);
+ unsigned OffsetToStackStart = 0;
+
+ unsigned SPReg = SP::O6;
+ SDValue SP = DAG.getCopyFromReg(Chain, DL, SPReg, VT);
+
+ // Unbias the stack pointer register.
+ OffsetToStackStart += Subtarget->getStackPointerBias();
+ // Move past the register save area: 8 in registers + 8 local registers.
+ OffsetToStackStart += 16 * (Subtarget->is64Bit() ? 8 : 4);
+ // Move past the struct return address slot (4 bytes) on SPARC 32-bit.
+ if (!Subtarget->is64Bit()) {
----------------
nikic wrote:
No braces for single line if.
https://github.com/llvm/llvm-project/pull/148281
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits