diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp index 8d8e4bf6358f3..4c1dd16518cab 100644 --- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp @@ -568,6 +568,18 @@ getPushOrLibCallsSavedInfo(const MachineFunction &MF, return PushOrLibCallsCSI; for (const auto &CS : CSI) { + if (RVFI->useQCIInterrupt(MF)) { + // Some registers are saved by both `QC.C.MIENTER(.NEST)` and + // `QC.CM.PUSH(FP)`. In these cases, prioritise the CFI info that points + // to the versions saved by `QC.C.MIENTER(.NEST)` which is what FP + // unwinding would use. + const auto *FII = llvm::find_if(FixedCSRFIQCIInterruptMap, [&](auto P) { + return P.first == CS.getReg(); + }); + if (FII != std::end(FixedCSRFIQCIInterruptMap)) + continue; + } + const auto *FII = llvm::find_if( FixedCSRFIMap, [&](MCPhysReg P) { return P == CS.getReg(); }); if (FII != std::end(FixedCSRFIMap)) @@ -866,12 +878,12 @@ static bool isPop(unsigned Opcode) { } static unsigned getPushOpcode(RISCVMachineFunctionInfo::PushPopKind Kind, - bool HasFP) { + bool UpdateFP) { switch (Kind) { case RISCVMachineFunctionInfo::PushPopKind::StdExtZcmp: return RISCV::CM_PUSH; case RISCVMachineFunctionInfo::PushPopKind::VendorXqccmp: - return HasFP ? RISCV::QC_CM_PUSHFP : RISCV::QC_CM_PUSH; + return UpdateFP ? RISCV::QC_CM_PUSHFP : RISCV::QC_CM_PUSH; default: llvm_unreachable("Unhandled PushPopKind"); } @@ -914,7 +926,10 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF, // Emit prologue for shadow call stack. emitSCSPrologue(MF, MBB, MBBI, DL); - auto FirstFrameSetup = MBBI; + // We keep track of the first instruction because it might be a + // `(QC.)CM.PUSH(FP)`, and we may need to adjust the immediate rather than + // inserting an `addi sp, sp, -N*16` + auto PossiblePush = MBBI; // Skip past all callee-saved register spill instructions. while (MBBI != MBB.end() && MBBI->getFlag(MachineInstr::FrameSetup)) @@ -988,19 +1003,29 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF, } if (RVFI->useQCIInterrupt(MF)) { - CFIBuilder.buildDefCFAOffset(QCIInterruptPushAmount); + // The function starts with `QC.C.MIENTER(.NEST)`, so the `(QC.)CM.PUSH(FP)` + // could only be the next instruction. + ++PossiblePush; + + // Insert the CFI metadata before where we think the `(QC.)CM.PUSH(FP)` + // could be. The PUSH will also get its own CFI metadata for its own + // modifications, which should come after the PUSH. + CFIInstBuilder PushCFIBuilder(MBB, PossiblePush, MachineInstr::FrameSetup); + PushCFIBuilder.buildDefCFAOffset(QCIInterruptPushAmount); for (const CalleeSavedInfo &CS : getQCISavedInfo(MF, CSI)) - CFIBuilder.buildOffset(CS.getReg(), - MFI.getObjectOffset(CS.getFrameIdx())); - } else if (RVFI->isPushable(MF) && FirstFrameSetup != MBB.end() && - isPush(FirstFrameSetup->getOpcode())) { + PushCFIBuilder.buildOffset(CS.getReg(), + MFI.getObjectOffset(CS.getFrameIdx())); + } + + if (RVFI->isPushable(MF) && PossiblePush != MBB.end() && + isPush(PossiblePush->getOpcode())) { // Use available stack adjustment in push instruction to allocate additional // stack space. Align the stack size down to a multiple of 16. This is // needed for RVE. // FIXME: Can we increase the stack size to a multiple of 16 instead? uint64_t StackAdj = std::min(alignDown(StackSize, 16), static_cast(48)); - FirstFrameSetup->getOperand(1).setImm(StackAdj); + PossiblePush->getOperand(1).setImm(StackAdj); StackSize -= StackAdj; CFIBuilder.buildDefCFAOffset(RealStackSize - StackSize); @@ -1305,17 +1330,21 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction &MF, for (const CalleeSavedInfo &CS : getPushOrLibCallsSavedInfo(MF, CSI)) CFIBuilder.buildRestore(CS.getReg()); - // Update CFA offset. After CM_POP SP should be equal to CFA, so CFA - // offset should be a zero. - CFIBuilder.buildDefCFAOffset(0); + // Update CFA Offset. If this is a QCI interrupt function, there will be a + // leftover offset which is deallocated by `QC.C.MILEAVERET`, otherwise + // getQCIInterruptStackSize() will be 0. + CFIBuilder.buildDefCFAOffset(RVFI->getQCIInterruptStackSize()); } } emitSiFiveCLICPreemptibleRestores(MF, MBB, MBBI, DL); - // Deallocate stack if StackSize isn't a zero yet + // Deallocate stack if StackSize isn't a zero yet. If this is a QCI interrupt + // function, there will be a leftover offset which is deallocated by + // `QC.C.MILEAVERET`, otherwise getQCIInterruptStackSize() will be 0. if (StackSize != 0) - deallocateStack(MF, MBB, MBBI, DL, StackSize, RealStackSize - StackSize); + deallocateStack(MF, MBB, MBBI, DL, StackSize, + RVFI->getQCIInterruptStackSize()); // Emit epilogue for shadow call stack. emitSCSEpilogue(MF, MBB, MBBI, DL); @@ -1894,10 +1923,17 @@ bool RISCVFrameLowering::assignCalleeSavedSpillSlots( if (RVFI->useQCIInterrupt(MF)) { RVFI->setQCIInterruptStackSize(QCIInterruptPushAmount); - } else if (RVFI->isPushable(MF)) { + } + + if (RVFI->isPushable(MF)) { // Determine how many GPRs we need to push and save it to RVFI. unsigned PushedRegNum = getNumPushPopRegs(CSI); - if (PushedRegNum) { + + // `QC.C.MIENTER(.NEST)` will save `ra` and `s0`, so we should only push if + // we want to push more than 2 registers. Otherwise, we should push if we + // want to push more than 0 registers. + unsigned OnlyPushIfMoreThan = RVFI->useQCIInterrupt(MF) ? 2 : 0; + if (PushedRegNum > OnlyPushIfMoreThan) { RVFI->setRVPushRegs(PushedRegNum); RVFI->setRVPushStackSize(alignTo((STI.getXLen() / 8) * PushedRegNum, 16)); } @@ -1923,8 +1959,9 @@ bool RISCVFrameLowering::assignCalleeSavedSpillSlots( CS.setFrameIdx(FrameIdx); continue; } - // TODO: QCI Interrupt + Push/Pop - } else if (RVFI->useSaveRestoreLibCalls(MF) || RVFI->isPushable(MF)) { + } + + if (RVFI->useSaveRestoreLibCalls(MF) || RVFI->isPushable(MF)) { const auto *FII = llvm::find_if( FixedCSRFIMap, [&](MCPhysReg P) { return P == CS.getReg(); }); unsigned RegNum = std::distance(std::begin(FixedCSRFIMap), FII); @@ -1937,6 +1974,9 @@ bool RISCVFrameLowering::assignCalleeSavedSpillSlots( else Offset = -int64_t(RegNum + 1) * Size; + if (RVFI->useQCIInterrupt(MF)) + Offset -= QCIInterruptPushAmount; + int FrameIdx = MFI.CreateFixedSpillStackObject(Size, Offset); assert(FrameIdx < 0); CS.setFrameIdx(FrameIdx); @@ -1965,10 +2005,13 @@ bool RISCVFrameLowering::assignCalleeSavedSpillSlots( // because there are gaps which are reserved for future use. MFI.CreateFixedSpillStackObject( QCIInterruptPushAmount, -static_cast(QCIInterruptPushAmount)); - } else if (RVFI->isPushable(MF)) { + } + + if (RVFI->isPushable(MF)) { + int64_t QCIOffset = RVFI->useQCIInterrupt(MF) ? QCIInterruptPushAmount : 0; // Allocate a fixed object that covers the full push. if (int64_t PushSize = RVFI->getRVPushStackSize()) - MFI.CreateFixedSpillStackObject(PushSize, -PushSize); + MFI.CreateFixedSpillStackObject(PushSize, -PushSize - QCIOffset); } else if (int LibCallRegs = getLibCallID(MF, CSI) + 1) { int64_t LibCallFrameSize = alignTo((STI.getXLen() / 8) * LibCallRegs, getStackAlign()); @@ -2003,13 +2046,15 @@ bool RISCVFrameLowering::spillCalleeSavedRegisters( for (auto [Reg, _Offset] : FixedCSRFIQCIInterruptMap) MBB.addLiveIn(Reg); - // TODO: Handle QCI Interrupt + Push/Pop - } else if (RVFI->isPushable(*MF)) { + } + + if (RVFI->isPushable(*MF)) { // Emit CM.PUSH with base StackAdj & evaluate Push stack unsigned PushedRegNum = RVFI->getRVPushRegs(); if (PushedRegNum > 0) { // Use encoded number to represent registers to spill. - unsigned Opcode = getPushOpcode(RVFI->getPushPopKind(*MF), hasFP(*MF)); + unsigned Opcode = getPushOpcode( + RVFI->getPushPopKind(*MF), hasFP(*MF) && !RVFI->useQCIInterrupt(*MF)); unsigned RegEnc = RISCVZC::encodeRegListNumRegs(PushedRegNum); MachineInstrBuilder PushBuilder = BuildMI(MBB, MI, DL, TII.get(Opcode)) @@ -2156,8 +2201,9 @@ bool RISCVFrameLowering::restoreCalleeSavedRegisters( // QC.C.MILEAVERET which we already inserted to return. assert(MI->getOpcode() == RISCV::QC_C_MILEAVERET && "Unexpected QCI Interrupt Return Instruction"); - // TODO: Handle QCI + Push/Pop - } else if (RVFI->isPushable(*MF)) { + } + + if (RVFI->isPushable(*MF)) { unsigned PushedRegNum = RVFI->getRVPushRegs(); if (PushedRegNum > 0) { unsigned Opcode = getPopOpcode(RVFI->getPushPopKind(*MF)); diff --git a/llvm/test/CodeGen/RISCV/qci-interrupt-attr.ll b/llvm/test/CodeGen/RISCV/qci-interrupt-attr.ll index 76d61eee07eef..03e10bba6af58 100644 --- a/llvm/test/CodeGen/RISCV/qci-interrupt-attr.ll +++ b/llvm/test/CodeGen/RISCV/qci-interrupt-attr.ll @@ -1,4 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 + ; RUN: llc -mtriple riscv32-unknown-elf -mattr=+experimental-xqciint -o - %s \ ; RUN: -verify-machineinstrs | FileCheck --check-prefix=QCI %s @@ -13,6 +14,14 @@ ; RUN: -o - %s -verify-machineinstrs \ ; RUN: | FileCheck --check-prefix=QCI-PUSH-POP %s +; RUN: llc -mtriple riscv32-unknown-elf -mattr=+experimental-xqciint,+experimental-xqccmp \ +; RUN: -o - %s -verify-machineinstrs \ +; RUN: | FileCheck --check-prefix=QCI-QCCMP-PUSH-POP %s + +; RUN: llc -mtriple riscv32-unknown-elf -mattr=+experimental-xqciint,+experimental-xqccmp \ +; RUN: -o - %s -verify-machineinstrs -frame-pointer=all \ +; RUN: | FileCheck --check-prefix=QCI-QCCMP-PUSH-POP-FP %s + ;; This tests "interrupt"="qci-nest" and "interrupt"="qci-nonest" frame lowering. ;; including CFI information. These tests should all lack `nounwind`. ;; @@ -91,6 +100,54 @@ define void @test_nest_empty() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nest_empty: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nest_empty: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret ret void } @@ -165,6 +222,54 @@ define void @test_nonest_empty() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nonest_empty: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nonest_empty: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret ret void } @@ -257,6 +362,64 @@ define void @test_nest_asm() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: #NO_APP ; QCI-PUSH-POP-NEXT: call use_i32 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nest_asm: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 1 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: # a0 <- a0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: call use_i32 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nest_asm: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: # a0 <- a0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: call use_i32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = call i32 asm sideeffect "/* $0 <- $1 */", "=r,r"(i32 1) call void @use_i32(i32 %1) ret void @@ -348,6 +511,64 @@ define void @test_nonest_asm() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: #NO_APP ; QCI-PUSH-POP-NEXT: call use_i32 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nonest_asm: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 1 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: # a0 <- a0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: call use_i32 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nonest_asm: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: # a0 <- a0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: call use_i32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = call i32 asm sideeffect "/* $0 <- $1 */", "=r,r"(i32 1) call void @use_i32(i32 %1) ret void @@ -475,6 +696,86 @@ define void @test_nest_call() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: addi sp, sp, 16 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nest_call: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, 16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nest_call: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-FP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, 16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = call i64 @function_with_one_stack_arg(i64 0, i64 1, i64 2, i64 3, i32 4) call void @use_i64(i64 %1) ret void @@ -599,6 +900,86 @@ define void @test_nonest_call() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: addi sp, sp, 16 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nonest_call: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, 16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nonest_call: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-FP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, 16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = call i64 @function_with_one_stack_arg(i64 0, i64 1, i64 2, i64 3, i32 4) call void @use_i64(i64 %1) ret void @@ -930,44 +1311,33 @@ define void @test_spill_nest() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 -; QCI-PUSH-POP-NEXT: addi sp, sp, -80 -; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 176 -; QCI-PUSH-POP-NEXT: sw s1, 76(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s2, 72(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s3, 68(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s4, 64(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s5, 60(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s6, 56(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s7, 52(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s8, 48(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s9, 44(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s10, 40(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s11, 36(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: .cfi_offset s1, -100 -; QCI-PUSH-POP-NEXT: .cfi_offset s2, -104 -; QCI-PUSH-POP-NEXT: .cfi_offset s3, -108 -; QCI-PUSH-POP-NEXT: .cfi_offset s4, -112 -; QCI-PUSH-POP-NEXT: .cfi_offset s5, -116 +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s11}, -96 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 192 +; QCI-PUSH-POP-NEXT: .cfi_offset s1, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s2, -136 +; QCI-PUSH-POP-NEXT: .cfi_offset s3, -132 +; QCI-PUSH-POP-NEXT: .cfi_offset s4, -128 +; QCI-PUSH-POP-NEXT: .cfi_offset s5, -124 ; QCI-PUSH-POP-NEXT: .cfi_offset s6, -120 -; QCI-PUSH-POP-NEXT: .cfi_offset s7, -124 -; QCI-PUSH-POP-NEXT: .cfi_offset s8, -128 -; QCI-PUSH-POP-NEXT: .cfi_offset s9, -132 -; QCI-PUSH-POP-NEXT: .cfi_offset s10, -136 -; QCI-PUSH-POP-NEXT: .cfi_offset s11, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s7, -116 +; QCI-PUSH-POP-NEXT: .cfi_offset s8, -112 +; QCI-PUSH-POP-NEXT: .cfi_offset s9, -108 +; QCI-PUSH-POP-NEXT: .cfi_offset s10, -104 +; QCI-PUSH-POP-NEXT: .cfi_offset s11, -100 ; QCI-PUSH-POP-NEXT: lui t0, %hi(var) ; QCI-PUSH-POP-NEXT: lw a0, %lo(var)(t0) -; QCI-PUSH-POP-NEXT: sw a0, 32(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(t0) ; QCI-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(t0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(t0) ; QCI-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(t0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(t0) ; QCI-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(t0) +; QCI-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: addi a5, t0, %lo(var) ; QCI-PUSH-POP-NEXT: lw a0, 16(a5) -; QCI-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 20(a5) ; QCI-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, 20(a5) +; QCI-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: lw t4, 24(a5) ; QCI-PUSH-POP-NEXT: lw t5, 28(a5) ; QCI-PUSH-POP-NEXT: lw t6, 32(a5) @@ -1020,29 +1390,19 @@ define void @test_spill_nest() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: sw t6, 32(a5) ; QCI-PUSH-POP-NEXT: sw t5, 28(a5) ; QCI-PUSH-POP-NEXT: sw t4, 24(a5) -; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 20(a5) -; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 16(a5) -; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+12)(t0) -; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+8)(t0) -; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+4)(t0) -; QCI-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var)(t0) -; QCI-PUSH-POP-NEXT: lw s1, 76(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s2, 72(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s3, 68(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s4, 64(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s5, 60(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s6, 56(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s7, 52(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s8, 48(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s9, 44(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s10, 40(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s11, 36(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s11}, 96 ; QCI-PUSH-POP-NEXT: .cfi_restore s1 ; QCI-PUSH-POP-NEXT: .cfi_restore s2 ; QCI-PUSH-POP-NEXT: .cfi_restore s3 @@ -1054,9 +1414,266 @@ define void @test_spill_nest() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: .cfi_restore s9 ; QCI-PUSH-POP-NEXT: .cfi_restore s10 ; QCI-PUSH-POP-NEXT: .cfi_restore s11 -; QCI-PUSH-POP-NEXT: addi sp, sp, 80 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_spill_nest: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s11}, -96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 192 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-NEXT: lui t0, %hi(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+4)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+8)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+12)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: addi a5, t0, %lo(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw t4, 24(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s1, 80(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t1, 92(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a7, 112(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s0, 116(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a6, 96(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a4, 100(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s0, 116(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a7, 112(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a4, 100(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a6, 96(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t1, 92(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s1, 80(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t4, 24(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+12)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+8)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+4)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s11}, 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_spill_nest: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s11}, -96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 192 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: lui t1, %hi(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -164(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+4)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -168(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+8)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -172(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+12)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -176(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi a5, t1, %lo(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -180(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -184(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 24(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -188(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t4, 80(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s1, 92(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t0, 112(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a4, 116(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a7, 96(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a6, 100(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a4, 116(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t0, 112(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a6, 100(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a7, 96(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s1, 92(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t4, 80(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -188(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 24(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -184(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -180(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -176(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+12)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -172(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+8)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -168(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+4)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -164(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 192 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s11}, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = load [32 x i32], ptr @var store volatile [32 x i32] %1, ptr @var ret void @@ -1386,44 +2003,33 @@ define void @test_spill_nonest() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 -; QCI-PUSH-POP-NEXT: addi sp, sp, -80 -; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 176 -; QCI-PUSH-POP-NEXT: sw s1, 76(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s2, 72(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s3, 68(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s4, 64(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s5, 60(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s6, 56(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s7, 52(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s8, 48(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s9, 44(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s10, 40(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s11, 36(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: .cfi_offset s1, -100 -; QCI-PUSH-POP-NEXT: .cfi_offset s2, -104 -; QCI-PUSH-POP-NEXT: .cfi_offset s3, -108 -; QCI-PUSH-POP-NEXT: .cfi_offset s4, -112 -; QCI-PUSH-POP-NEXT: .cfi_offset s5, -116 +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s11}, -96 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 192 +; QCI-PUSH-POP-NEXT: .cfi_offset s1, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s2, -136 +; QCI-PUSH-POP-NEXT: .cfi_offset s3, -132 +; QCI-PUSH-POP-NEXT: .cfi_offset s4, -128 +; QCI-PUSH-POP-NEXT: .cfi_offset s5, -124 ; QCI-PUSH-POP-NEXT: .cfi_offset s6, -120 -; QCI-PUSH-POP-NEXT: .cfi_offset s7, -124 -; QCI-PUSH-POP-NEXT: .cfi_offset s8, -128 -; QCI-PUSH-POP-NEXT: .cfi_offset s9, -132 -; QCI-PUSH-POP-NEXT: .cfi_offset s10, -136 -; QCI-PUSH-POP-NEXT: .cfi_offset s11, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s7, -116 +; QCI-PUSH-POP-NEXT: .cfi_offset s8, -112 +; QCI-PUSH-POP-NEXT: .cfi_offset s9, -108 +; QCI-PUSH-POP-NEXT: .cfi_offset s10, -104 +; QCI-PUSH-POP-NEXT: .cfi_offset s11, -100 ; QCI-PUSH-POP-NEXT: lui t0, %hi(var) ; QCI-PUSH-POP-NEXT: lw a0, %lo(var)(t0) -; QCI-PUSH-POP-NEXT: sw a0, 32(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(t0) ; QCI-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(t0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(t0) ; QCI-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(t0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(t0) ; QCI-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(t0) +; QCI-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: addi a5, t0, %lo(var) ; QCI-PUSH-POP-NEXT: lw a0, 16(a5) -; QCI-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 20(a5) ; QCI-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, 20(a5) +; QCI-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: lw t4, 24(a5) ; QCI-PUSH-POP-NEXT: lw t5, 28(a5) ; QCI-PUSH-POP-NEXT: lw t6, 32(a5) @@ -1476,29 +2082,19 @@ define void @test_spill_nonest() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: sw t6, 32(a5) ; QCI-PUSH-POP-NEXT: sw t5, 28(a5) ; QCI-PUSH-POP-NEXT: sw t4, 24(a5) -; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 20(a5) -; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 16(a5) -; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+12)(t0) -; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+8)(t0) -; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+4)(t0) -; QCI-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var)(t0) -; QCI-PUSH-POP-NEXT: lw s1, 76(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s2, 72(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s3, 68(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s4, 64(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s5, 60(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s6, 56(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s7, 52(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s8, 48(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s9, 44(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s10, 40(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s11, 36(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s11}, 96 ; QCI-PUSH-POP-NEXT: .cfi_restore s1 ; QCI-PUSH-POP-NEXT: .cfi_restore s2 ; QCI-PUSH-POP-NEXT: .cfi_restore s3 @@ -1510,9 +2106,266 @@ define void @test_spill_nonest() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: .cfi_restore s9 ; QCI-PUSH-POP-NEXT: .cfi_restore s10 ; QCI-PUSH-POP-NEXT: .cfi_restore s11 -; QCI-PUSH-POP-NEXT: addi sp, sp, 80 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_spill_nonest: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s11}, -96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 192 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-NEXT: lui t0, %hi(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+4)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+8)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+12)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: addi a5, t0, %lo(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw t4, 24(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s1, 80(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw t1, 92(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a7, 112(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw s0, 116(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a6, 96(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a4, 100(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s0, 116(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a7, 112(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a4, 100(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw a6, 96(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t1, 92(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s1, 80(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-NEXT: sw t4, 24(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+12)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+8)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+4)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var)(t0) +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s11}, 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_spill_nonest: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s11}, -96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 192 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: lui t1, %hi(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -164(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+4)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -168(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+8)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -172(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+12)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -176(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi a5, t1, %lo(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -180(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -184(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 24(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -188(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t4, 80(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s1, 92(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw t0, 112(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a4, 116(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a7, 96(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a6, 100(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 124(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a3, 120(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a4, 116(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t0, 112(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a1, 108(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a2, 104(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a6, 100(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a7, 96(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s1, 92(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t2, 88(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t3, 84(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t4, 80(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw ra, 76(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s11, 72(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s10, 68(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s9, 64(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s8, 60(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s7, 56(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s6, 52(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s5, 48(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s4, 44(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s3, 40(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s2, 36(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t6, 32(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw t5, 28(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -188(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 24(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -184(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 20(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -180(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 16(a5) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -176(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+12)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -172(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+8)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -168(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+4)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -164(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var)(t1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 192 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s11}, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = load [32 x i32], ptr @var store volatile [32 x i32] %1, ptr @var ret void @@ -1930,76 +2783,67 @@ define void @test_spill_call_nest() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 -; QCI-PUSH-POP-NEXT: addi sp, sp, -144 -; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 240 -; QCI-PUSH-POP-NEXT: sw s1, 140(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s2, 136(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s3, 132(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s4, 128(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s5, 124(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s6, 120(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s7, 116(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s8, 112(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s9, 108(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s10, 104(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s11, 100(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: .cfi_offset s1, -100 -; QCI-PUSH-POP-NEXT: .cfi_offset s2, -104 -; QCI-PUSH-POP-NEXT: .cfi_offset s3, -108 -; QCI-PUSH-POP-NEXT: .cfi_offset s4, -112 -; QCI-PUSH-POP-NEXT: .cfi_offset s5, -116 +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s11}, -112 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-PUSH-POP-NEXT: .cfi_offset s1, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s2, -136 +; QCI-PUSH-POP-NEXT: .cfi_offset s3, -132 +; QCI-PUSH-POP-NEXT: .cfi_offset s4, -128 +; QCI-PUSH-POP-NEXT: .cfi_offset s5, -124 ; QCI-PUSH-POP-NEXT: .cfi_offset s6, -120 -; QCI-PUSH-POP-NEXT: .cfi_offset s7, -124 -; QCI-PUSH-POP-NEXT: .cfi_offset s8, -128 -; QCI-PUSH-POP-NEXT: .cfi_offset s9, -132 -; QCI-PUSH-POP-NEXT: .cfi_offset s10, -136 -; QCI-PUSH-POP-NEXT: .cfi_offset s11, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s7, -116 +; QCI-PUSH-POP-NEXT: .cfi_offset s8, -112 +; QCI-PUSH-POP-NEXT: .cfi_offset s9, -108 +; QCI-PUSH-POP-NEXT: .cfi_offset s10, -104 +; QCI-PUSH-POP-NEXT: .cfi_offset s11, -100 +; QCI-PUSH-POP-NEXT: addi sp, sp, -48 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 256 ; QCI-PUSH-POP-NEXT: lui s0, %hi(var) ; QCI-PUSH-POP-NEXT: lw a0, %lo(var)(s0) -; QCI-PUSH-POP-NEXT: sw a0, 96(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(s0) ; QCI-PUSH-POP-NEXT: sw a0, 92(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(s0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(s0) ; QCI-PUSH-POP-NEXT: sw a0, 88(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(s0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(s0) ; QCI-PUSH-POP-NEXT: sw a0, 84(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(s0) +; QCI-PUSH-POP-NEXT: sw a0, 80(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: addi s1, s0, %lo(var) ; QCI-PUSH-POP-NEXT: lw a0, 16(s1) -; QCI-PUSH-POP-NEXT: sw a0, 80(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 20(s1) ; QCI-PUSH-POP-NEXT: sw a0, 76(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 24(s1) +; QCI-PUSH-POP-NEXT: lw a0, 20(s1) ; QCI-PUSH-POP-NEXT: sw a0, 72(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 28(s1) +; QCI-PUSH-POP-NEXT: lw a0, 24(s1) ; QCI-PUSH-POP-NEXT: sw a0, 68(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 32(s1) +; QCI-PUSH-POP-NEXT: lw a0, 28(s1) ; QCI-PUSH-POP-NEXT: sw a0, 64(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 36(s1) +; QCI-PUSH-POP-NEXT: lw a0, 32(s1) ; QCI-PUSH-POP-NEXT: sw a0, 60(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 40(s1) +; QCI-PUSH-POP-NEXT: lw a0, 36(s1) ; QCI-PUSH-POP-NEXT: sw a0, 56(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 44(s1) +; QCI-PUSH-POP-NEXT: lw a0, 40(s1) ; QCI-PUSH-POP-NEXT: sw a0, 52(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 48(s1) +; QCI-PUSH-POP-NEXT: lw a0, 44(s1) ; QCI-PUSH-POP-NEXT: sw a0, 48(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 52(s1) +; QCI-PUSH-POP-NEXT: lw a0, 48(s1) ; QCI-PUSH-POP-NEXT: sw a0, 44(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 56(s1) +; QCI-PUSH-POP-NEXT: lw a0, 52(s1) ; QCI-PUSH-POP-NEXT: sw a0, 40(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 60(s1) +; QCI-PUSH-POP-NEXT: lw a0, 56(s1) ; QCI-PUSH-POP-NEXT: sw a0, 36(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 64(s1) +; QCI-PUSH-POP-NEXT: lw a0, 60(s1) ; QCI-PUSH-POP-NEXT: sw a0, 32(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 68(s1) +; QCI-PUSH-POP-NEXT: lw a0, 64(s1) ; QCI-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 72(s1) +; QCI-PUSH-POP-NEXT: lw a0, 68(s1) ; QCI-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 76(s1) +; QCI-PUSH-POP-NEXT: lw a0, 72(s1) ; QCI-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 80(s1) +; QCI-PUSH-POP-NEXT: lw a0, 76(s1) ; QCI-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 84(s1) +; QCI-PUSH-POP-NEXT: lw a0, 80(s1) ; QCI-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, 84(s1) +; QCI-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: lw s4, 88(s1) ; QCI-PUSH-POP-NEXT: lw s5, 92(s1) ; QCI-PUSH-POP-NEXT: lw s6, 96(s1) @@ -2032,61 +2876,53 @@ define void @test_spill_call_nest() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: sw s6, 96(s1) ; QCI-PUSH-POP-NEXT: sw s5, 92(s1) ; QCI-PUSH-POP-NEXT: sw s4, 88(s1) -; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 84(s1) -; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 80(s1) -; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 76(s1) -; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 72(s1) -; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 68(s1) -; QCI-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 64(s1) -; QCI-PUSH-POP-NEXT: lw a0, 36(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 60(s1) -; QCI-PUSH-POP-NEXT: lw a0, 40(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 36(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 56(s1) -; QCI-PUSH-POP-NEXT: lw a0, 44(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 40(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 52(s1) -; QCI-PUSH-POP-NEXT: lw a0, 48(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 44(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 48(s1) -; QCI-PUSH-POP-NEXT: lw a0, 52(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 48(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 44(s1) -; QCI-PUSH-POP-NEXT: lw a0, 56(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 52(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 40(s1) -; QCI-PUSH-POP-NEXT: lw a0, 60(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 56(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 36(s1) -; QCI-PUSH-POP-NEXT: lw a0, 64(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 60(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 32(s1) -; QCI-PUSH-POP-NEXT: lw a0, 68(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 64(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 28(s1) -; QCI-PUSH-POP-NEXT: lw a0, 72(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 68(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 24(s1) -; QCI-PUSH-POP-NEXT: lw a0, 76(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 72(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 20(s1) -; QCI-PUSH-POP-NEXT: lw a0, 80(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 76(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 16(s1) -; QCI-PUSH-POP-NEXT: lw a0, 84(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 80(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+12)(s0) -; QCI-PUSH-POP-NEXT: lw a0, 88(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 84(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+8)(s0) -; QCI-PUSH-POP-NEXT: lw a0, 92(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 88(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+4)(s0) -; QCI-PUSH-POP-NEXT: lw a0, 96(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 92(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var)(s0) -; QCI-PUSH-POP-NEXT: lw s1, 140(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s2, 136(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s3, 132(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s4, 128(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s5, 124(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s6, 120(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s7, 116(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s8, 112(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s9, 108(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s10, 104(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s11, 100(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: addi sp, sp, 48 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s11}, 112 ; QCI-PUSH-POP-NEXT: .cfi_restore s1 ; QCI-PUSH-POP-NEXT: .cfi_restore s2 ; QCI-PUSH-POP-NEXT: .cfi_restore s3 @@ -2098,9 +2934,362 @@ define void @test_spill_call_nest() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: .cfi_restore s9 ; QCI-PUSH-POP-NEXT: .cfi_restore s10 ; QCI-PUSH-POP-NEXT: .cfi_restore s11 -; QCI-PUSH-POP-NEXT: addi sp, sp, 144 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_spill_call_nest: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s11}, -112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 256 +; QCI-QCCMP-PUSH-POP-NEXT: lui s0, %hi(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 92(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+4)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 88(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+8)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 84(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+12)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 80(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: addi s1, s0, %lo(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 76(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 72(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 68(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 64(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 60(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 56(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 52(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 48(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 44(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 40(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 36(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 32(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw s4, 88(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s5, 92(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s6, 96(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s7, 100(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s8, 104(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s9, 108(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s10, 112(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s11, 116(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s2, 120(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s3, 124(s1) +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-NEXT: sw s3, 124(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s2, 120(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s11, 116(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s10, 112(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s9, 108(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s8, 104(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s7, 100(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s6, 96(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s5, 92(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s4, 88(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 36(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 40(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 44(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 48(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 52(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 56(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 60(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 64(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 68(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 72(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 76(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 80(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+12)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 84(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+8)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 88(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+4)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 92(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, 48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s11}, 112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_spill_call_nest: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s11}, -112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 256 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: lui s6, %hi(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -164(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+4)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -168(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+8)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -172(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+12)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -176(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi s1, s6, %lo(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -180(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -184(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -188(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -192(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -196(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -200(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -204(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -208(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -212(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -216(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -220(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -224(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -228(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -232(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -236(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -240(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -244(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -248(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 88(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -252(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s8, 92(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s9, 96(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s10, 100(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s11, 104(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s2, 108(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s3, 112(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s4, 116(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s5, 120(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s7, 124(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-FP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s7, 124(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s5, 120(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s4, 116(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s3, 112(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s2, 108(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s11, 104(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s10, 100(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s9, 96(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s8, 92(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -252(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 88(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -248(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -244(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -240(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -236(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -232(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -228(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -224(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -220(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -216(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -212(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -208(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -204(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -200(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -196(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -192(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -188(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -184(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -180(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -176(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+12)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -172(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+8)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -168(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+4)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -164(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 256 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, 48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s11}, 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = load [32 x i32], ptr @var %2 = call i64 @function_with_one_stack_arg(i64 0, i64 1, i64 2, i64 3, i32 4) call void @use_i64(i64 %2) @@ -2520,76 +3709,67 @@ define void @test_spill_call_nonest() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 -; QCI-PUSH-POP-NEXT: addi sp, sp, -144 -; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 240 -; QCI-PUSH-POP-NEXT: sw s1, 140(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s2, 136(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s3, 132(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s4, 128(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s5, 124(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s6, 120(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s7, 116(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s8, 112(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s9, 108(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s10, 104(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: sw s11, 100(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: .cfi_offset s1, -100 -; QCI-PUSH-POP-NEXT: .cfi_offset s2, -104 -; QCI-PUSH-POP-NEXT: .cfi_offset s3, -108 -; QCI-PUSH-POP-NEXT: .cfi_offset s4, -112 -; QCI-PUSH-POP-NEXT: .cfi_offset s5, -116 +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s11}, -112 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-PUSH-POP-NEXT: .cfi_offset s1, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s2, -136 +; QCI-PUSH-POP-NEXT: .cfi_offset s3, -132 +; QCI-PUSH-POP-NEXT: .cfi_offset s4, -128 +; QCI-PUSH-POP-NEXT: .cfi_offset s5, -124 ; QCI-PUSH-POP-NEXT: .cfi_offset s6, -120 -; QCI-PUSH-POP-NEXT: .cfi_offset s7, -124 -; QCI-PUSH-POP-NEXT: .cfi_offset s8, -128 -; QCI-PUSH-POP-NEXT: .cfi_offset s9, -132 -; QCI-PUSH-POP-NEXT: .cfi_offset s10, -136 -; QCI-PUSH-POP-NEXT: .cfi_offset s11, -140 +; QCI-PUSH-POP-NEXT: .cfi_offset s7, -116 +; QCI-PUSH-POP-NEXT: .cfi_offset s8, -112 +; QCI-PUSH-POP-NEXT: .cfi_offset s9, -108 +; QCI-PUSH-POP-NEXT: .cfi_offset s10, -104 +; QCI-PUSH-POP-NEXT: .cfi_offset s11, -100 +; QCI-PUSH-POP-NEXT: addi sp, sp, -48 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 256 ; QCI-PUSH-POP-NEXT: lui s0, %hi(var) ; QCI-PUSH-POP-NEXT: lw a0, %lo(var)(s0) -; QCI-PUSH-POP-NEXT: sw a0, 96(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(s0) ; QCI-PUSH-POP-NEXT: sw a0, 92(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(s0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+4)(s0) ; QCI-PUSH-POP-NEXT: sw a0, 88(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(s0) +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+8)(s0) ; QCI-PUSH-POP-NEXT: sw a0, 84(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, %lo(var+12)(s0) +; QCI-PUSH-POP-NEXT: sw a0, 80(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: addi s1, s0, %lo(var) ; QCI-PUSH-POP-NEXT: lw a0, 16(s1) -; QCI-PUSH-POP-NEXT: sw a0, 80(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 20(s1) ; QCI-PUSH-POP-NEXT: sw a0, 76(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 24(s1) +; QCI-PUSH-POP-NEXT: lw a0, 20(s1) ; QCI-PUSH-POP-NEXT: sw a0, 72(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 28(s1) +; QCI-PUSH-POP-NEXT: lw a0, 24(s1) ; QCI-PUSH-POP-NEXT: sw a0, 68(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 32(s1) +; QCI-PUSH-POP-NEXT: lw a0, 28(s1) ; QCI-PUSH-POP-NEXT: sw a0, 64(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 36(s1) +; QCI-PUSH-POP-NEXT: lw a0, 32(s1) ; QCI-PUSH-POP-NEXT: sw a0, 60(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 40(s1) +; QCI-PUSH-POP-NEXT: lw a0, 36(s1) ; QCI-PUSH-POP-NEXT: sw a0, 56(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 44(s1) +; QCI-PUSH-POP-NEXT: lw a0, 40(s1) ; QCI-PUSH-POP-NEXT: sw a0, 52(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 48(s1) +; QCI-PUSH-POP-NEXT: lw a0, 44(s1) ; QCI-PUSH-POP-NEXT: sw a0, 48(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 52(s1) +; QCI-PUSH-POP-NEXT: lw a0, 48(s1) ; QCI-PUSH-POP-NEXT: sw a0, 44(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 56(s1) +; QCI-PUSH-POP-NEXT: lw a0, 52(s1) ; QCI-PUSH-POP-NEXT: sw a0, 40(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 60(s1) +; QCI-PUSH-POP-NEXT: lw a0, 56(s1) ; QCI-PUSH-POP-NEXT: sw a0, 36(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 64(s1) +; QCI-PUSH-POP-NEXT: lw a0, 60(s1) ; QCI-PUSH-POP-NEXT: sw a0, 32(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 68(s1) +; QCI-PUSH-POP-NEXT: lw a0, 64(s1) ; QCI-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 72(s1) +; QCI-PUSH-POP-NEXT: lw a0, 68(s1) ; QCI-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 76(s1) +; QCI-PUSH-POP-NEXT: lw a0, 72(s1) ; QCI-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 80(s1) +; QCI-PUSH-POP-NEXT: lw a0, 76(s1) ; QCI-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill -; QCI-PUSH-POP-NEXT: lw a0, 84(s1) +; QCI-PUSH-POP-NEXT: lw a0, 80(s1) ; QCI-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: lw a0, 84(s1) +; QCI-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill ; QCI-PUSH-POP-NEXT: lw s4, 88(s1) ; QCI-PUSH-POP-NEXT: lw s5, 92(s1) ; QCI-PUSH-POP-NEXT: lw s6, 96(s1) @@ -2622,61 +3802,53 @@ define void @test_spill_call_nonest() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: sw s6, 96(s1) ; QCI-PUSH-POP-NEXT: sw s5, 92(s1) ; QCI-PUSH-POP-NEXT: sw s4, 88(s1) -; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 84(s1) -; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 80(s1) -; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 76(s1) -; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 72(s1) -; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 68(s1) -; QCI-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 64(s1) -; QCI-PUSH-POP-NEXT: lw a0, 36(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 60(s1) -; QCI-PUSH-POP-NEXT: lw a0, 40(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 36(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 56(s1) -; QCI-PUSH-POP-NEXT: lw a0, 44(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 40(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 52(s1) -; QCI-PUSH-POP-NEXT: lw a0, 48(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 44(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 48(s1) -; QCI-PUSH-POP-NEXT: lw a0, 52(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 48(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 44(s1) -; QCI-PUSH-POP-NEXT: lw a0, 56(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 52(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 40(s1) -; QCI-PUSH-POP-NEXT: lw a0, 60(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 56(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 36(s1) -; QCI-PUSH-POP-NEXT: lw a0, 64(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 60(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 32(s1) -; QCI-PUSH-POP-NEXT: lw a0, 68(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 64(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 28(s1) -; QCI-PUSH-POP-NEXT: lw a0, 72(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 68(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 24(s1) -; QCI-PUSH-POP-NEXT: lw a0, 76(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 72(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 20(s1) -; QCI-PUSH-POP-NEXT: lw a0, 80(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 76(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, 16(s1) -; QCI-PUSH-POP-NEXT: lw a0, 84(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 80(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+12)(s0) -; QCI-PUSH-POP-NEXT: lw a0, 88(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 84(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+8)(s0) -; QCI-PUSH-POP-NEXT: lw a0, 92(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 88(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var+4)(s0) -; QCI-PUSH-POP-NEXT: lw a0, 96(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: lw a0, 92(sp) # 4-byte Folded Reload ; QCI-PUSH-POP-NEXT: sw a0, %lo(var)(s0) -; QCI-PUSH-POP-NEXT: lw s1, 140(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s2, 136(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s3, 132(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s4, 128(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s5, 124(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s6, 120(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s7, 116(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s8, 112(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s9, 108(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s10, 104(sp) # 4-byte Folded Reload -; QCI-PUSH-POP-NEXT: lw s11, 100(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: addi sp, sp, 48 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s11}, 112 ; QCI-PUSH-POP-NEXT: .cfi_restore s1 ; QCI-PUSH-POP-NEXT: .cfi_restore s2 ; QCI-PUSH-POP-NEXT: .cfi_restore s3 @@ -2688,9 +3860,362 @@ define void @test_spill_call_nonest() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: .cfi_restore s9 ; QCI-PUSH-POP-NEXT: .cfi_restore s10 ; QCI-PUSH-POP-NEXT: .cfi_restore s11 -; QCI-PUSH-POP-NEXT: addi sp, sp, 144 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_spill_call_nonest: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s11}, -112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 256 +; QCI-QCCMP-PUSH-POP-NEXT: lui s0, %hi(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 92(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+4)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 88(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+8)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 84(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, %lo(var+12)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 80(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: addi s1, s0, %lo(var) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 76(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 72(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 68(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 64(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 60(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 56(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 52(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 48(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 44(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 40(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 36(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 32(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 28(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 24(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 12(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 8(sp) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-NEXT: lw s4, 88(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s5, 92(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s6, 96(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s7, 100(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s8, 104(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s9, 108(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s10, 112(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s11, 116(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s2, 120(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw s3, 124(s1) +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-NEXT: sw s3, 124(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s2, 120(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s11, 116(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s10, 112(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s9, 108(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s8, 104(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s7, 100(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s6, 96(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s5, 92(s1) +; QCI-QCCMP-PUSH-POP-NEXT: sw s4, 88(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 8(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 12(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 16(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 20(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 24(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 32(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 36(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 40(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 44(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 48(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 52(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 56(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 60(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 64(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 68(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 72(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 76(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 80(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+12)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 84(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+8)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 88(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var+4)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: lw a0, 92(sp) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-NEXT: sw a0, %lo(var)(s0) +; QCI-QCCMP-PUSH-POP-NEXT: addi sp, sp, 48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s11}, 112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_spill_call_nonest: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s11}, -112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s2, -112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s3, -116 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s4, -120 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s5, -124 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s6, -128 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s7, -132 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s8, -136 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s9, -140 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s10, -144 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 256 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: lui s6, %hi(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -164(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+4)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -168(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+8)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -172(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, %lo(var+12)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -176(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi s1, s6, %lo(var) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -180(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -184(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -188(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -192(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -196(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -200(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -204(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -208(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -212(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -216(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -220(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -224(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -228(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -232(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -236(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -240(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -244(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -248(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, 88(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, -252(s0) # 4-byte Folded Spill +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s8, 92(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s9, 96(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s10, 100(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s11, 104(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s2, 108(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s3, 112(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s4, 116(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s5, 120(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw s7, 124(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a2, 1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a4, 2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a6, 3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 0(sp) +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a1, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a3, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a5, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: li a7, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: call function_with_one_stack_arg +; QCI-QCCMP-PUSH-POP-FP-NEXT: call use_i64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s7, 124(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s5, 120(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s4, 116(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s3, 112(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s2, 108(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s11, 104(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s10, 100(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s9, 96(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw s8, 92(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -252(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 88(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -248(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 84(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -244(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 80(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -240(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 76(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -236(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 72(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -232(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 68(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -228(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 64(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -224(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 60(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -220(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 56(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -216(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 52(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -212(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 48(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -208(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 44(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -204(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 40(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -200(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 36(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -196(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 32(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -192(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 28(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -188(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 24(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -184(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 20(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -180(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, 16(s1) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -176(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+12)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -172(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+8)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -168(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var+4)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: lw a0, -164(s0) # 4-byte Folded Reload +; QCI-QCCMP-PUSH-POP-FP-NEXT: sw a0, %lo(var)(s6) +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 256 +; QCI-QCCMP-PUSH-POP-FP-NEXT: addi sp, sp, 48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 208 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s11}, 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s2 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s3 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s4 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s5 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s6 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s7 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s9 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s10 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret %1 = load [32 x i32], ptr @var %2 = call i64 @function_with_one_stack_arg(i64 0, i64 1, i64 2, i64 3, i32 4) call void @use_i64(i64 %2) @@ -2790,18 +4315,82 @@ define void @test_nest_explicit_s11() "interrupt"="qci-nest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 -; QCI-PUSH-POP-NEXT: addi sp, sp, -16 -; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 -; QCI-PUSH-POP-NEXT: sw s11, 12(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s11}, -64 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 160 ; QCI-PUSH-POP-NEXT: .cfi_offset s11, -100 ; QCI-PUSH-POP-NEXT: #APP ; QCI-PUSH-POP-NEXT: li s4, 0 ; QCI-PUSH-POP-NEXT: #NO_APP -; QCI-PUSH-POP-NEXT: lw s11, 12(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s11}, 64 ; QCI-PUSH-POP-NEXT: .cfi_restore s11 -; QCI-PUSH-POP-NEXT: addi sp, sp, 16 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nest_explicit_s11: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s11}, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 160 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: li s4, 0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s11}, 64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nest_explicit_s11: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s11}, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 160 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: li s4, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 160 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s11}, 64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret tail call void asm sideeffect "li s4, 0", "~{s11}"() ret void } @@ -2898,18 +4487,703 @@ define void @test_nonest_explicit_s11() "interrupt"="qci-nonest" { ; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 ; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 ; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 -; QCI-PUSH-POP-NEXT: addi sp, sp, -16 -; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 -; QCI-PUSH-POP-NEXT: sw s11, 12(sp) # 4-byte Folded Spill +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s11}, -64 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 160 ; QCI-PUSH-POP-NEXT: .cfi_offset s11, -100 ; QCI-PUSH-POP-NEXT: #APP ; QCI-PUSH-POP-NEXT: li s11, 0 ; QCI-PUSH-POP-NEXT: #NO_APP -; QCI-PUSH-POP-NEXT: lw s11, 12(sp) # 4-byte Folded Reload +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s11}, 64 ; QCI-PUSH-POP-NEXT: .cfi_restore s11 -; QCI-PUSH-POP-NEXT: addi sp, sp, 16 ; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 ; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nonest_explicit_s11: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s11}, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 160 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: li s11, 0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s11}, 64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nonest_explicit_s11: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s11}, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 160 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s11, -148 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: li s11, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 160 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s11}, 64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s11 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret tail call void asm sideeffect "li s11, 0", "~{s11}"() ret void } + +define void @test_nest_explicit_ra_s0() "interrupt"="qci-nest" { +; QCI-LABEL: test_nest_explicit_ra_s0: +; QCI: # %bb.0: +; QCI-NEXT: qc.c.mienter.nest +; QCI-NEXT: .cfi_def_cfa_offset 96 +; QCI-NEXT: .cfi_offset ra, -16 +; QCI-NEXT: .cfi_offset t0, -24 +; QCI-NEXT: .cfi_offset t1, -28 +; QCI-NEXT: .cfi_offset t2, -32 +; QCI-NEXT: .cfi_offset s0, -8 +; QCI-NEXT: .cfi_offset a0, -36 +; QCI-NEXT: .cfi_offset a1, -40 +; QCI-NEXT: .cfi_offset a2, -44 +; QCI-NEXT: .cfi_offset a3, -48 +; QCI-NEXT: .cfi_offset a4, -52 +; QCI-NEXT: .cfi_offset a5, -56 +; QCI-NEXT: .cfi_offset a6, -60 +; QCI-NEXT: .cfi_offset a7, -64 +; QCI-NEXT: .cfi_offset t3, -68 +; QCI-NEXT: .cfi_offset t4, -72 +; QCI-NEXT: .cfi_offset t5, -76 +; QCI-NEXT: .cfi_offset t6, -80 +; QCI-NEXT: #APP +; QCI-NEXT: li s4, 0 +; QCI-NEXT: #NO_APP +; QCI-NEXT: qc.c.mileaveret +; +; QCI-FP-LABEL: test_nest_explicit_ra_s0: +; QCI-FP: # %bb.0: +; QCI-FP-NEXT: qc.c.mienter.nest +; QCI-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-FP-NEXT: .cfi_offset ra, -16 +; QCI-FP-NEXT: .cfi_offset t0, -24 +; QCI-FP-NEXT: .cfi_offset t1, -28 +; QCI-FP-NEXT: .cfi_offset t2, -32 +; QCI-FP-NEXT: .cfi_offset s0, -8 +; QCI-FP-NEXT: .cfi_offset a0, -36 +; QCI-FP-NEXT: .cfi_offset a1, -40 +; QCI-FP-NEXT: .cfi_offset a2, -44 +; QCI-FP-NEXT: .cfi_offset a3, -48 +; QCI-FP-NEXT: .cfi_offset a4, -52 +; QCI-FP-NEXT: .cfi_offset a5, -56 +; QCI-FP-NEXT: .cfi_offset a6, -60 +; QCI-FP-NEXT: .cfi_offset a7, -64 +; QCI-FP-NEXT: .cfi_offset t3, -68 +; QCI-FP-NEXT: .cfi_offset t4, -72 +; QCI-FP-NEXT: .cfi_offset t5, -76 +; QCI-FP-NEXT: .cfi_offset t6, -80 +; QCI-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-FP-NEXT: #APP +; QCI-FP-NEXT: li s4, 0 +; QCI-FP-NEXT: #NO_APP +; QCI-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-FP-NEXT: qc.c.mileaveret +; +; QCI-PUSH-POP-LABEL: test_nest_explicit_ra_s0: +; QCI-PUSH-POP: # %bb.0: +; QCI-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-PUSH-POP-NEXT: #APP +; QCI-PUSH-POP-NEXT: li s4, 0 +; QCI-PUSH-POP-NEXT: #NO_APP +; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nest_explicit_ra_s0: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: li s4, 0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nest_explicit_ra_s0: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: li s4, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret + tail call void asm sideeffect "li s4, 0", "~{ra},~{s0}"() + ret void +} + +define void @test_nonest_explicit_ra_s0() "interrupt"="qci-nonest" { +; QCI-LABEL: test_nonest_explicit_ra_s0: +; QCI: # %bb.0: +; QCI-NEXT: qc.c.mienter +; QCI-NEXT: .cfi_def_cfa_offset 96 +; QCI-NEXT: .cfi_offset ra, -16 +; QCI-NEXT: .cfi_offset t0, -24 +; QCI-NEXT: .cfi_offset t1, -28 +; QCI-NEXT: .cfi_offset t2, -32 +; QCI-NEXT: .cfi_offset s0, -8 +; QCI-NEXT: .cfi_offset a0, -36 +; QCI-NEXT: .cfi_offset a1, -40 +; QCI-NEXT: .cfi_offset a2, -44 +; QCI-NEXT: .cfi_offset a3, -48 +; QCI-NEXT: .cfi_offset a4, -52 +; QCI-NEXT: .cfi_offset a5, -56 +; QCI-NEXT: .cfi_offset a6, -60 +; QCI-NEXT: .cfi_offset a7, -64 +; QCI-NEXT: .cfi_offset t3, -68 +; QCI-NEXT: .cfi_offset t4, -72 +; QCI-NEXT: .cfi_offset t5, -76 +; QCI-NEXT: .cfi_offset t6, -80 +; QCI-NEXT: #APP +; QCI-NEXT: li s11, 0 +; QCI-NEXT: #NO_APP +; QCI-NEXT: qc.c.mileaveret +; +; QCI-FP-LABEL: test_nonest_explicit_ra_s0: +; QCI-FP: # %bb.0: +; QCI-FP-NEXT: qc.c.mienter +; QCI-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-FP-NEXT: .cfi_offset ra, -16 +; QCI-FP-NEXT: .cfi_offset t0, -24 +; QCI-FP-NEXT: .cfi_offset t1, -28 +; QCI-FP-NEXT: .cfi_offset t2, -32 +; QCI-FP-NEXT: .cfi_offset s0, -8 +; QCI-FP-NEXT: .cfi_offset a0, -36 +; QCI-FP-NEXT: .cfi_offset a1, -40 +; QCI-FP-NEXT: .cfi_offset a2, -44 +; QCI-FP-NEXT: .cfi_offset a3, -48 +; QCI-FP-NEXT: .cfi_offset a4, -52 +; QCI-FP-NEXT: .cfi_offset a5, -56 +; QCI-FP-NEXT: .cfi_offset a6, -60 +; QCI-FP-NEXT: .cfi_offset a7, -64 +; QCI-FP-NEXT: .cfi_offset t3, -68 +; QCI-FP-NEXT: .cfi_offset t4, -72 +; QCI-FP-NEXT: .cfi_offset t5, -76 +; QCI-FP-NEXT: .cfi_offset t6, -80 +; QCI-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-FP-NEXT: #APP +; QCI-FP-NEXT: li s11, 0 +; QCI-FP-NEXT: #NO_APP +; QCI-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-FP-NEXT: qc.c.mileaveret +; +; QCI-PUSH-POP-LABEL: test_nonest_explicit_ra_s0: +; QCI-PUSH-POP: # %bb.0: +; QCI-PUSH-POP-NEXT: qc.c.mienter +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-PUSH-POP-NEXT: #APP +; QCI-PUSH-POP-NEXT: li s11, 0 +; QCI-PUSH-POP-NEXT: #NO_APP +; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nonest_explicit_ra_s0: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: li s11, 0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nonest_explicit_ra_s0: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: li s11, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret + tail call void asm sideeffect "li s11, 0", "~{ra},~{s0}"() + ret void +} + + +define void @test_nest_explicit_s1() "interrupt"="qci-nest" { +; QCI-LABEL: test_nest_explicit_s1: +; QCI: # %bb.0: +; QCI-NEXT: qc.c.mienter.nest +; QCI-NEXT: .cfi_def_cfa_offset 96 +; QCI-NEXT: .cfi_offset ra, -16 +; QCI-NEXT: .cfi_offset t0, -24 +; QCI-NEXT: .cfi_offset t1, -28 +; QCI-NEXT: .cfi_offset t2, -32 +; QCI-NEXT: .cfi_offset s0, -8 +; QCI-NEXT: .cfi_offset a0, -36 +; QCI-NEXT: .cfi_offset a1, -40 +; QCI-NEXT: .cfi_offset a2, -44 +; QCI-NEXT: .cfi_offset a3, -48 +; QCI-NEXT: .cfi_offset a4, -52 +; QCI-NEXT: .cfi_offset a5, -56 +; QCI-NEXT: .cfi_offset a6, -60 +; QCI-NEXT: .cfi_offset a7, -64 +; QCI-NEXT: .cfi_offset t3, -68 +; QCI-NEXT: .cfi_offset t4, -72 +; QCI-NEXT: .cfi_offset t5, -76 +; QCI-NEXT: .cfi_offset t6, -80 +; QCI-NEXT: addi sp, sp, -16 +; QCI-NEXT: .cfi_def_cfa_offset 112 +; QCI-NEXT: sw s1, 12(sp) # 4-byte Folded Spill +; QCI-NEXT: .cfi_offset s1, -100 +; QCI-NEXT: #APP +; QCI-NEXT: li s4, 0 +; QCI-NEXT: #NO_APP +; QCI-NEXT: lw s1, 12(sp) # 4-byte Folded Reload +; QCI-NEXT: .cfi_restore s1 +; QCI-NEXT: addi sp, sp, 16 +; QCI-NEXT: .cfi_def_cfa_offset 96 +; QCI-NEXT: qc.c.mileaveret +; +; QCI-FP-LABEL: test_nest_explicit_s1: +; QCI-FP: # %bb.0: +; QCI-FP-NEXT: qc.c.mienter.nest +; QCI-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-FP-NEXT: .cfi_offset ra, -16 +; QCI-FP-NEXT: .cfi_offset t0, -24 +; QCI-FP-NEXT: .cfi_offset t1, -28 +; QCI-FP-NEXT: .cfi_offset t2, -32 +; QCI-FP-NEXT: .cfi_offset s0, -8 +; QCI-FP-NEXT: .cfi_offset a0, -36 +; QCI-FP-NEXT: .cfi_offset a1, -40 +; QCI-FP-NEXT: .cfi_offset a2, -44 +; QCI-FP-NEXT: .cfi_offset a3, -48 +; QCI-FP-NEXT: .cfi_offset a4, -52 +; QCI-FP-NEXT: .cfi_offset a5, -56 +; QCI-FP-NEXT: .cfi_offset a6, -60 +; QCI-FP-NEXT: .cfi_offset a7, -64 +; QCI-FP-NEXT: .cfi_offset t3, -68 +; QCI-FP-NEXT: .cfi_offset t4, -72 +; QCI-FP-NEXT: .cfi_offset t5, -76 +; QCI-FP-NEXT: .cfi_offset t6, -80 +; QCI-FP-NEXT: addi sp, sp, -16 +; QCI-FP-NEXT: .cfi_def_cfa_offset 112 +; QCI-FP-NEXT: sw s1, 12(sp) # 4-byte Folded Spill +; QCI-FP-NEXT: .cfi_offset s1, -100 +; QCI-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-FP-NEXT: #APP +; QCI-FP-NEXT: li s4, 0 +; QCI-FP-NEXT: #NO_APP +; QCI-FP-NEXT: .cfi_def_cfa sp, 112 +; QCI-FP-NEXT: lw s1, 12(sp) # 4-byte Folded Reload +; QCI-FP-NEXT: .cfi_restore s1 +; QCI-FP-NEXT: addi sp, sp, 16 +; QCI-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-FP-NEXT: qc.c.mileaveret +; +; QCI-PUSH-POP-LABEL: test_nest_explicit_s1: +; QCI-PUSH-POP: # %bb.0: +; QCI-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s1}, -16 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 +; QCI-PUSH-POP-NEXT: .cfi_offset s1, -100 +; QCI-PUSH-POP-NEXT: #APP +; QCI-PUSH-POP-NEXT: li s4, 0 +; QCI-PUSH-POP-NEXT: #NO_APP +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s1}, 16 +; QCI-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nest_explicit_s1: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s1}, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: li s4, 0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s1}, 16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nest_explicit_s1: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter.nest +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s1}, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: li s4, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s1}, 16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret + tail call void asm sideeffect "li s4, 0", "~{s1}"() + ret void +} + +define void @test_nonest_explicit_s1() "interrupt"="qci-nonest" { +; QCI-LABEL: test_nonest_explicit_s1: +; QCI: # %bb.0: +; QCI-NEXT: qc.c.mienter +; QCI-NEXT: .cfi_def_cfa_offset 96 +; QCI-NEXT: .cfi_offset ra, -16 +; QCI-NEXT: .cfi_offset t0, -24 +; QCI-NEXT: .cfi_offset t1, -28 +; QCI-NEXT: .cfi_offset t2, -32 +; QCI-NEXT: .cfi_offset s0, -8 +; QCI-NEXT: .cfi_offset a0, -36 +; QCI-NEXT: .cfi_offset a1, -40 +; QCI-NEXT: .cfi_offset a2, -44 +; QCI-NEXT: .cfi_offset a3, -48 +; QCI-NEXT: .cfi_offset a4, -52 +; QCI-NEXT: .cfi_offset a5, -56 +; QCI-NEXT: .cfi_offset a6, -60 +; QCI-NEXT: .cfi_offset a7, -64 +; QCI-NEXT: .cfi_offset t3, -68 +; QCI-NEXT: .cfi_offset t4, -72 +; QCI-NEXT: .cfi_offset t5, -76 +; QCI-NEXT: .cfi_offset t6, -80 +; QCI-NEXT: addi sp, sp, -16 +; QCI-NEXT: .cfi_def_cfa_offset 112 +; QCI-NEXT: sw s1, 12(sp) # 4-byte Folded Spill +; QCI-NEXT: .cfi_offset s1, -100 +; QCI-NEXT: #APP +; QCI-NEXT: li s11, 0 +; QCI-NEXT: #NO_APP +; QCI-NEXT: lw s1, 12(sp) # 4-byte Folded Reload +; QCI-NEXT: .cfi_restore s1 +; QCI-NEXT: addi sp, sp, 16 +; QCI-NEXT: .cfi_def_cfa_offset 96 +; QCI-NEXT: qc.c.mileaveret +; +; QCI-FP-LABEL: test_nonest_explicit_s1: +; QCI-FP: # %bb.0: +; QCI-FP-NEXT: qc.c.mienter +; QCI-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-FP-NEXT: .cfi_offset ra, -16 +; QCI-FP-NEXT: .cfi_offset t0, -24 +; QCI-FP-NEXT: .cfi_offset t1, -28 +; QCI-FP-NEXT: .cfi_offset t2, -32 +; QCI-FP-NEXT: .cfi_offset s0, -8 +; QCI-FP-NEXT: .cfi_offset a0, -36 +; QCI-FP-NEXT: .cfi_offset a1, -40 +; QCI-FP-NEXT: .cfi_offset a2, -44 +; QCI-FP-NEXT: .cfi_offset a3, -48 +; QCI-FP-NEXT: .cfi_offset a4, -52 +; QCI-FP-NEXT: .cfi_offset a5, -56 +; QCI-FP-NEXT: .cfi_offset a6, -60 +; QCI-FP-NEXT: .cfi_offset a7, -64 +; QCI-FP-NEXT: .cfi_offset t3, -68 +; QCI-FP-NEXT: .cfi_offset t4, -72 +; QCI-FP-NEXT: .cfi_offset t5, -76 +; QCI-FP-NEXT: .cfi_offset t6, -80 +; QCI-FP-NEXT: addi sp, sp, -16 +; QCI-FP-NEXT: .cfi_def_cfa_offset 112 +; QCI-FP-NEXT: sw s1, 12(sp) # 4-byte Folded Spill +; QCI-FP-NEXT: .cfi_offset s1, -100 +; QCI-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-FP-NEXT: #APP +; QCI-FP-NEXT: li s11, 0 +; QCI-FP-NEXT: #NO_APP +; QCI-FP-NEXT: .cfi_def_cfa sp, 112 +; QCI-FP-NEXT: lw s1, 12(sp) # 4-byte Folded Reload +; QCI-FP-NEXT: .cfi_restore s1 +; QCI-FP-NEXT: addi sp, sp, 16 +; QCI-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-FP-NEXT: qc.c.mileaveret +; +; QCI-PUSH-POP-LABEL: test_nonest_explicit_s1: +; QCI-PUSH-POP: # %bb.0: +; QCI-PUSH-POP-NEXT: qc.c.mienter +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-PUSH-POP-NEXT: cm.push {ra, s0-s1}, -16 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 +; QCI-PUSH-POP-NEXT: .cfi_offset s1, -100 +; QCI-PUSH-POP-NEXT: #APP +; QCI-PUSH-POP-NEXT: li s11, 0 +; QCI-PUSH-POP-NEXT: #NO_APP +; QCI-PUSH-POP-NEXT: cm.pop {ra, s0-s1}, 16 +; QCI-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-LABEL: test_nonest_explicit_s1: +; QCI-QCCMP-PUSH-POP: # %bb.0: +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.push {ra, s0-s1}, -16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-NEXT: li s11, 0 +; QCI-QCCMP-PUSH-POP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-NEXT: qc.cm.pop {ra, s0-s1}, 16 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-NEXT: qc.c.mileaveret +; +; QCI-QCCMP-PUSH-POP-FP-LABEL: test_nonest_explicit_s1: +; QCI-QCCMP-PUSH-POP-FP: # %bb.0: +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mienter +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset ra, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t0, -24 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t1, -28 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t2, -32 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s0, -8 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a0, -36 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a1, -40 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a2, -44 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a3, -48 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a4, -52 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a5, -56 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a6, -60 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset a7, -64 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t3, -68 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t4, -72 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t5, -76 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset t6, -80 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.push {ra, s0-s1}, -16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_offset s1, -108 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa s0, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: li s11, 0 +; QCI-QCCMP-PUSH-POP-FP-NEXT: #NO_APP +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa sp, 112 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.cm.pop {ra, s0-s1}, 16 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_restore s1 +; QCI-QCCMP-PUSH-POP-FP-NEXT: .cfi_def_cfa_offset 96 +; QCI-QCCMP-PUSH-POP-FP-NEXT: qc.c.mileaveret + tail call void asm sideeffect "li s11, 0", "~{s1}"() + ret void +}