================ @@ -80,13 +80,47 @@ ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { ? CSR_ATPCS_SplitPush_SwiftTail_SaveList : CSR_AAPCS_SwiftTail_SaveList); } else if (F.hasFnAttribute("interrupt")) { + + // Don't bother saving the floating point registers if target is not hard + // float. This will prevent the Thumb1FrameLowering (cortex-m0) from + // crashing due to an llvm_unreachable being triggered when a D-class + // register is in the calling convention. + if (STI.isTargetHardFloat() && F.hasFnAttribute("save-fp")) { ---------------- efriedma-quic wrote:
It's a little weird to check isTargetHardFloat here... that just refers to whether the calling convention passes arguments in integer registers or FP registers. It doesn't have anything to do with whether floating-point registers are used. https://github.com/llvm/llvm-project/pull/89654 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits