Skip to content

LoongArch is a NEW ISA which is different from MIPS #113564

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

Merged
merged 5 commits into from
Mar 17, 2025
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
7 changes: 5 additions & 2 deletions src/coreclr/jit/codegenlinear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2484,8 +2484,11 @@ CodeGen::GenIntCastDesc::GenIntCastDesc(GenTreeCast* cast)
}

#if defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
// For LoongArch64's ISA which is same with the MIPS64 ISA, even the instructions of 32bits operation need
// the upper 32bits be sign-extended to 64 bits.
// TODO-LOONGARCH64:
// TODO-RISCV64:
// LoongArch64 and RiscV64 ABIs require 32-bit values to be sign-extended to 64-bits.
// We apply the sign-extension unconditionally here to avoid corner case bugs, even
// though it may not be strictly necessary in all cases.
m_extendKind = SIGN_EXTEND_INT;
#else
m_extendKind = COPY;
Expand Down