[llvm] Xtensa] Implement windowed call ABI. (PR #130001)
Andrei Safronov via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 18 02:18:43 PDT 2025
================
@@ -895,8 +895,14 @@ SDValue XtensaTargetLowering::LowerSTACKSAVE(SDValue Op,
SDValue XtensaTargetLowering::LowerSTACKRESTORE(SDValue Op,
SelectionDAG &DAG) const {
- return DAG.getCopyToReg(Op.getOperand(0), SDLoc(Op), Xtensa::SP,
- Op.getOperand(1));
+ if (Subtarget.isWindowedABI()) {
+ SDValue NewSP =
+ DAG.getNode(XtensaISD::MOVSP, SDLoc(Op), MVT::i32, Op.getOperand(1));
+ return DAG.getCopyToReg(Op.getOperand(0), SDLoc(Op), Xtensa::SP, NewSP);
+ } else {
----------------
andreisfr wrote:
Fixed
https://github.com/llvm/llvm-project/pull/130001
More information about the llvm-commits
mailing list