Skip to content

Commit 277e156

Browse files
authored
[mono] Add mono calling convention to AArch64RegisterInfo::isArgumentRegister (#579)
This is a new case switch added in upstream 6e00a34
1 parent 7f2ffa2 commit 277e156

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,13 @@ bool AArch64RegisterInfo::isArgumentRegister(const MachineFunction &MF,
647647
if (STI.isTargetWindows())
648648
return HasReg(CC_AArch64_Win64PCS_ArgRegs, Reg);
649649
return HasReg(CC_AArch64_AAPCS_ArgRegs, Reg);
650+
case CallingConv::Mono:
651+
if (STI.isTargetDarwin())
652+
return HasReg(CC_AArch64_Mono_DarwinPCS_ArgRegs, Reg);
653+
else if (STI.isTargetWindows())
654+
report_fatal_error("Unsupported calling convention.");
655+
else
656+
return HasReg(CC_AArch64_Mono_AAPCS_ArgRegs, Reg);
650657
}
651658
}
652659

0 commit comments

Comments
 (0)