Skip to content

Commit ec77954

Browse files
4Darmygeometryjkotasam11
authored
LoongArch is a NEW ISA which is different from MIPS (#113564)
* LoongArch is a NEW ISA which is different from MIPS reference:https://docs.kernel.org/arch/loongarch/introduction.html Introduction to LoongArch * Update src/coreclr/jit/codegenlinear.cpp --------- Co-authored-by: Jan Kotas <[email protected]> Co-authored-by: Adeel Mujahid <[email protected]>
1 parent 97db32f commit ec77954

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/coreclr/jit/codegenlinear.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2484,8 +2484,11 @@ CodeGen::GenIntCastDesc::GenIntCastDesc(GenTreeCast* cast)
24842484
}
24852485

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

0 commit comments

Comments
 (0)