Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Generalize hasFixedRetBuffReg for ARM64 #100277

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1806,11 +1806,7 @@ regNumber CallArgs::GetCustomRegister(Compiler* comp, CorInfoCallConvExtension c
case WellKnownArg::RetBuffer:
if (hasFixedRetBuffReg(cc))
{
// Windows does not use fixed ret buff arg for instance calls, but does otherwise.
if (!TargetOS::IsWindows || !callConvIsInstanceMethodCallConv(cc))
{
return theFixedRetBuffReg(cc);
}
return theFixedRetBuffReg(cc);
}

break;
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/jit/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ inline bool genIsValidDoubleReg(regNumber reg)
inline bool hasFixedRetBuffReg(CorInfoCallConvExtension callConv)
{
#if defined(TARGET_ARM64)
return true;
// Windows does not use fixed ret buff arg for instance calls, but does otherwise.
return !TargetOS::IsWindows || !callConvIsInstanceMethodCallConv(callConv);
#elif defined(TARGET_AMD64) && defined(SWIFT_SUPPORT)
return callConv == CorInfoCallConvExtension::Swift;
#else
Expand Down
Loading