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

[LoongArch64] The REG_SCRATCH is not conflict with REG_PINVOKE_FRAME. #88029

Merged
merged 2 commits into from
Jun 27, 2023
Merged
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
12 changes: 4 additions & 8 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5774,17 +5774,13 @@ void CodeGen::genFnProlog()
{
initReg = REG_IP1;
}
#elif defined(TARGET_LOONGARCH64)
// For loongarch64 OSR root frames, we may need a scratch register for large
// offset addresses. Use a register that won't be allocated.
//
if (isRoot && compiler->opts.IsOSR())
{
initReg = REG_SCRATCH;
}
#endif

#ifndef TARGET_LOONGARCH64
// For LoongArch64's OSR root frames, we may need a scratch register for large
// offset addresses. But this does not conflict with the REG_PINVOKE_FRAME.
noway_assert(!compiler->compMethodRequiresPInvokeFrame() || (initReg != REG_PINVOKE_FRAME));
#endif

#if defined(TARGET_AMD64)
// If we are a varargs call, in order to set up the arguments correctly this
Expand Down