File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -461,6 +461,17 @@ AArch64RegisterInfo::getStrictlyReservedRegs(const MachineFunction &MF) const {
461461 markSuperRegs (Reserved, i);
462462 }
463463
464+ if (MF.getSubtarget <AArch64Subtarget>().isLFI ()) {
465+ markSuperRegs (Reserved, AArch64::W28);
466+ markSuperRegs (Reserved, AArch64::W27);
467+ markSuperRegs (Reserved, AArch64::W26);
468+ markSuperRegs (Reserved, AArch64::W25);
469+ if (!MF.getProperties ().hasNoVRegs ()) {
470+ markSuperRegs (Reserved, AArch64::LR);
471+ markSuperRegs (Reserved, AArch64::W30);
472+ }
473+ }
474+
464475 for (size_t i = 0 ; i < AArch64::GPR32commonRegClass.getNumRegs (); ++i) {
465476 if (MF.getSubtarget <AArch64Subtarget>().isXRegisterReserved (i))
466477 markSuperRegs (Reserved, AArch64::GPR32commonRegClass.getRegister (i));
Original file line number Diff line number Diff line change @@ -293,6 +293,7 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
293293 bool isTargetAndroid () const { return TargetTriple.isAndroid (); }
294294 bool isTargetFuchsia () const { return TargetTriple.isOSFuchsia (); }
295295 bool isWindowsArm64EC () const { return TargetTriple.isWindowsArm64EC (); }
296+ bool isLFI () const { return TargetTriple.isLFI (); }
296297
297298 bool isTargetCOFF () const { return TargetTriple.isOSBinFormatCOFF (); }
298299 bool isTargetELF () const { return TargetTriple.isOSBinFormatELF (); }
You can’t perform that action at this time.
0 commit comments