From a5b263add8c08e5b523a29aabe00c0e918a82358 Mon Sep 17 00:00:00 2001 From: Steven He Date: Sat, 30 Nov 2024 19:52:41 +0900 Subject: [PATCH 1/9] Build LoongArch64 and RiscV64 AltJit --- eng/native/functions.cmake | 4 +-- src/coreclr/build-runtime.cmd | 34 +++++++++++++++++--------- src/coreclr/gcinfo/CMakeLists.txt | 2 ++ src/coreclr/inc/corinfo.h | 11 +++++++++ src/coreclr/inc/gcinfotypes.h | 8 +++--- src/coreclr/inc/palclr.h | 4 +++ src/coreclr/jit/CMakeLists.txt | 2 ++ src/coreclr/jit/codegenloongarch64.cpp | 7 +++--- src/coreclr/jit/codegenriscv64.cpp | 2 -- src/coreclr/jit/emitriscv64.cpp | 2 +- src/coreclr/jit/lclvars.cpp | 2 +- src/coreclr/jit/targetloongarch64.cpp | 2 +- src/coreclr/jit/targetriscv64.cpp | 2 +- src/coreclr/pal/inc/rt/ntimage.h | 11 --------- 14 files changed, 54 insertions(+), 39 deletions(-) diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 337538a6ba163e..f3312a9f805c06 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -1,8 +1,8 @@ function(clr_unknown_arch) if (WIN32) - message(FATAL_ERROR "Only AMD64, ARM64, ARM and I386 hosts are supported. Found: ${CMAKE_SYSTEM_PROCESSOR}") + message(FATAL_ERROR "Only AMD64, ARM64, ARM, I386, LOONGARCH64 and RISCV64 hosts are supported. Found: ${CMAKE_SYSTEM_PROCESSOR}") elseif(CLR_CROSS_COMPONENTS_BUILD) - message(FATAL_ERROR "Only AMD64, ARM64 and I386 hosts are supported for linux cross-architecture component. Found: ${CMAKE_SYSTEM_PROCESSOR}") + message(FATAL_ERROR "Only AMD64, ARM64, I386, LOONGARCH64 and RISCV64 hosts are supported for linux cross-architecture component. Found: ${CMAKE_SYSTEM_PROCESSOR}") else() message(FATAL_ERROR "'${CMAKE_SYSTEM_PROCESSOR}' is an unsupported architecture.") endif() diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index 89dafc49715881..14f13556a167be 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -44,6 +44,8 @@ set __TargetArchX64=0 set __TargetArchX86=0 set __TargetArchArm=0 set __TargetArchArm64=0 +set __TargetArchLoongArch64=0 +set __TargetArchRiscV64=0 set __BuildTypeDebug=0 set __BuildTypeChecked=0 @@ -90,6 +92,8 @@ if /i "%1" == "-x64" (set __TargetArchX64=1&shift&goto Arg_Loop) if /i "%1" == "-x86" (set __TargetArchX86=1&shift&goto Arg_Loop) if /i "%1" == "-arm" (set __TargetArchArm=1&shift&goto Arg_Loop) if /i "%1" == "-arm64" (set __TargetArchArm64=1&shift&goto Arg_Loop) +if /i "%1" == "-loongarch64" (set __TargetArchLoongArch64=1&shift&goto Arg_Loop) +if /i "%1" == "-riscv64" (set __TargetArchRiscV64=1&shift&goto Arg_Loop) if /i "%1" == "-debug" (set __BuildTypeDebug=1&shift&goto Arg_Loop) if /i "%1" == "-checked" (set __BuildTypeChecked=1&shift&goto Arg_Loop) @@ -104,6 +108,8 @@ if /i "%1" == "x64" (set __TargetArchX64=1&shift&goto Arg_Loop) if /i "%1" == "x86" (set __TargetArchX86=1&shift&goto Arg_Loop) if /i "%1" == "arm" (set __TargetArchArm=1&shift&goto Arg_Loop) if /i "%1" == "arm64" (set __TargetArchArm64=1&shift&goto Arg_Loop) +if /i "%1" == "loongarch64" (set __TargetArchLoongArch64=1&shift&goto Arg_Loop) +if /i "%1" == "riscv64" (set __TargetArchRiscV64=1&shift&goto Arg_Loop) if /i "%1" == "debug" (set __BuildTypeDebug=1&shift&goto Arg_Loop) if /i "%1" == "checked" (set __BuildTypeChecked=1&shift&goto Arg_Loop) @@ -168,16 +174,18 @@ if defined VCINSTALLDIR ( if defined __BuildAll goto BuildAll -set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 +set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64 if %__TotalSpecifiedTargetArch% GTR 1 ( echo Error: more than one build architecture specified, but "all" not specified. goto Usage ) -if %__TargetArchX64%==1 set __TargetArch=x64 -if %__TargetArchX86%==1 set __TargetArch=x86 -if %__TargetArchArm%==1 set __TargetArch=arm -if %__TargetArchArm64%==1 set __TargetArch=arm64 +if %__TargetArchX64%==1 set __TargetArch=x64 +if %__TargetArchX86%==1 set __TargetArch=x86 +if %__TargetArchArm%==1 set __TargetArch=arm +if %__TargetArchArm64%==1 set __TargetArch=arm64 +if %__TargetArchLoongArch64%==1 set __TargetArch=loongarch64 +if %__TargetArchRiscV64%==1 set __TargetArch=riscv64 if "%__HostArch%" == "" set __HostArch=%__TargetArch% set /A __TotalSpecifiedBuildType=__BuildTypeDebug + __BuildTypeChecked + __BuildTypeRelease @@ -468,18 +476,20 @@ REM ============================================================================ set __TargetArchList= -set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 +set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64 if %__TotalSpecifiedTargetArch% EQU 0 ( REM Nothing specified means we want to build all architectures. - set __TargetArchList=x64 x86 arm arm64 + set __TargetArchList=x64 x86 arm arm64 loongarch64 riscv64 ) REM Otherwise, add all the specified architectures to the list. -if %__TargetArchX64%==1 set __TargetArchList=%__TargetArchList% x64 -if %__TargetArchX86%==1 set __TargetArchList=%__TargetArchList% x86 -if %__TargetArchArm%==1 set __TargetArchList=%__TargetArchList% arm -if %__TargetArchArm64%==1 set __TargetArchList=%__TargetArchList% arm64 +if %__TargetArchX64%==1 set __TargetArchList=%__TargetArchList% x64 +if %__TargetArchX86%==1 set __TargetArchList=%__TargetArchList% x86 +if %__TargetArchArm%==1 set __TargetArchList=%__TargetArchList% arm +if %__TargetArchArm64%==1 set __TargetArchList=%__TargetArchList% arm64 +if %__TargetArchLoongArch64%==1 set __TargetArchList=%__TargetArchList% loongarch64 +if %__TargetArchRiscV64%==1 set __TargetArchList=%__TargetArchList% riscv64 set __BuildTypeList= @@ -562,7 +572,7 @@ echo All arguments are optional. The options are: echo. echo.-? -h -help --help: view this message. echo -all: Builds all configurations and platforms. -echo Build architecture: one of -x64, -x86, -arm, -arm64 ^(default: -x64^). +echo Build architecture: one of -x64, -x86, -arm, -arm64, -loongarch64, -riscv64 ^(default: -x64^). echo Build type: one of -Debug, -Checked, -Release ^(default: -Debug^). echo -component ^ : specify this option one or more times to limit components built to those specified. echo Allowed ^: hosts jit alljits runtime paltests iltools nativeaot spmi diff --git a/src/coreclr/gcinfo/CMakeLists.txt b/src/coreclr/gcinfo/CMakeLists.txt index cdc4ae794c8e85..25ce2215bc17be 100644 --- a/src/coreclr/gcinfo/CMakeLists.txt +++ b/src/coreclr/gcinfo/CMakeLists.txt @@ -66,6 +66,8 @@ endif() if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) create_gcinfo_lib(TARGET gcinfo_universal_arm64 OS universal ARCH arm64) create_gcinfo_lib(TARGET gcinfo_unix_x64 OS unix ARCH x64) + create_gcinfo_lib(TARGET gcinfo_unix_loongarch64 OS unix ARCH loongarch64) + create_gcinfo_lib(TARGET gcinfo_unix_riscv64 OS unix ARCH riscv64) create_gcinfo_lib(TARGET gcinfo_win_x64 OS win ARCH x64) endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index aabc86d3cd65a4..9a3880256ed510 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -3352,6 +3352,17 @@ class ICorDynamicInfo : public ICorStaticInfo // #define IMAGE_REL_BASED_REL_THUMB_MOV32_PCREL 0x14 +// +// LOONGARCH64 relocation types +// +#define IMAGE_REL_LOONGARCH64_PC 0x0003 +#define IMAGE_REL_LOONGARCH64_JIR 0x0004 + +// +// RISCV64 relocation types +// +#define IMAGE_REL_RISCV64_PC 0x0003 + /**********************************************************************************/ #ifdef TARGET_64BIT #define USE_PER_FRAME_PINVOKE_INIT diff --git a/src/coreclr/inc/gcinfotypes.h b/src/coreclr/inc/gcinfotypes.h index b770bb1bbcff9b..46a978711196d8 100644 --- a/src/coreclr/inc/gcinfotypes.h +++ b/src/coreclr/inc/gcinfotypes.h @@ -786,8 +786,8 @@ void FASTCALL decodeCallPattern(int pattern, #define DENORMALIZE_STACK_SLOT(x) ((x)<<3) #define NORMALIZE_CODE_LENGTH(x) ((x)>>2) // All Instructions are 4 bytes long #define DENORMALIZE_CODE_LENGTH(x) ((x)<<2) -#define NORMALIZE_STACK_BASE_REGISTER(x) ((x) == 22 ? 0 : 1) // Encode Frame pointer fp=$22 as zero -#define DENORMALIZE_STACK_BASE_REGISTER(x) ((x) == 0 ? 22 : 3) +#define NORMALIZE_STACK_BASE_REGISTER(x) ((x) == 22 ? 0u : 1u) // Encode Frame pointer fp=$22 as zero +#define DENORMALIZE_STACK_BASE_REGISTER(x) ((x) == 0 ? 22u : 3u) #define NORMALIZE_SIZE_OF_STACK_AREA(x) ((x)>>3) #define DENORMALIZE_SIZE_OF_STACK_AREA(x) ((x)<<3) #define CODE_OFFSETS_NEED_NORMALIZATION 0 @@ -841,8 +841,8 @@ void FASTCALL decodeCallPattern(int pattern, #define DENORMALIZE_STACK_SLOT(x) ((x)<<3) #define NORMALIZE_CODE_LENGTH(x) ((x)>>2) // All Instructions are 4 bytes long #define DENORMALIZE_CODE_LENGTH(x) ((x)<<2) -#define NORMALIZE_STACK_BASE_REGISTER(x) ((x) == 8 ? 0 : 1) // Encode Frame pointer X8 as zero, sp/x2 as 1 -#define DENORMALIZE_STACK_BASE_REGISTER(x) ((x) == 0 ? 8 : 2) +#define NORMALIZE_STACK_BASE_REGISTER(x) ((x) == 8 ? 0u : 1u) // Encode Frame pointer X8 as zero, sp/x2 as 1 +#define DENORMALIZE_STACK_BASE_REGISTER(x) ((x) == 0 ? 8u : 2u) #define NORMALIZE_SIZE_OF_STACK_AREA(x) ((x)>>3) #define DENORMALIZE_SIZE_OF_STACK_AREA(x) ((x)<<3) #define CODE_OFFSETS_NEED_NORMALIZATION 0 diff --git a/src/coreclr/inc/palclr.h b/src/coreclr/inc/palclr.h index 98321ba87f8383..c5628a1b9eee6e 100644 --- a/src/coreclr/inc/palclr.h +++ b/src/coreclr/inc/palclr.h @@ -612,4 +612,8 @@ #define IMAGE_FILE_MACHINE_LOONGARCH64 0x6264 // LOONGARCH64. #endif +#ifndef IMAGE_FILE_MACHINE_RISCV64 +#define IMAGE_FILE_MACHINE_RISCV64 0x5064 // RISCV64. +#endif + #endif // defined(HOST_WINDOWS) diff --git a/src/coreclr/jit/CMakeLists.txt b/src/coreclr/jit/CMakeLists.txt index 104a7be7f18202..71b9214dc9ebde 100644 --- a/src/coreclr/jit/CMakeLists.txt +++ b/src/coreclr/jit/CMakeLists.txt @@ -642,6 +642,8 @@ if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) create_standalone_jit(TARGET clrjit_universal_arm64_${ARCH_HOST_NAME} OS universal ARCH arm64 DESTINATIONS .) create_standalone_jit(TARGET clrjit_unix_x64_${ARCH_HOST_NAME} OS unix_anyos ARCH x64 DESTINATIONS .) create_standalone_jit(TARGET clrjit_win_x64_${ARCH_HOST_NAME} OS win ARCH x64 DESTINATIONS .) + create_standalone_jit(TARGET clrjit_unix_loongarch64_${ARCH_HOST_NAME} OS unix ARCH loongarch64 DESTINATIONS .) + create_standalone_jit(TARGET clrjit_unix_riscv64_${ARCH_HOST_NAME} OS unix ARCH riscv64 DESTINATIONS .) endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) if (CLR_CMAKE_TARGET_ARCH_LOONGARCH64) diff --git a/src/coreclr/jit/codegenloongarch64.cpp b/src/coreclr/jit/codegenloongarch64.cpp index c7fa8df00c4bc0..058c091fe45ae5 100644 --- a/src/coreclr/jit/codegenloongarch64.cpp +++ b/src/coreclr/jit/codegenloongarch64.cpp @@ -2461,10 +2461,9 @@ static inline bool isImmed(GenTree* treeNode) instruction CodeGen::genGetInsForOper(GenTree* treeNode) { - var_types type = treeNode->TypeGet(); - genTreeOps oper = treeNode->OperGet(); - GenTree* op1 = treeNode->gtGetOp1(); - GenTree* op2; + var_types type = treeNode->TypeGet(); + genTreeOps oper = treeNode->OperGet(); + GenTree* op1 = treeNode->gtGetOp1(); emitAttr attr = emitActualTypeSize(treeNode); bool isImm = false; diff --git a/src/coreclr/jit/codegenriscv64.cpp b/src/coreclr/jit/codegenriscv64.cpp index 6c93a636e0062c..7d2a18c345de14 100644 --- a/src/coreclr/jit/codegenriscv64.cpp +++ b/src/coreclr/jit/codegenriscv64.cpp @@ -6333,8 +6333,6 @@ void CodeGen::genIntToIntCast(GenTreeCast* cast) if ((desc.ExtendKind() != GenIntCastDesc::COPY) || (srcReg != dstReg)) { - instruction ins; - switch (desc.ExtendKind()) { case GenIntCastDesc::ZERO_EXTEND_SMALL_INT: diff --git a/src/coreclr/jit/emitriscv64.cpp b/src/coreclr/jit/emitriscv64.cpp index 562e000ea1f1b0..46e23afc2b72a3 100644 --- a/src/coreclr/jit/emitriscv64.cpp +++ b/src/coreclr/jit/emitriscv64.cpp @@ -4543,7 +4543,7 @@ void emitter::emitDispIns( emitDispInsInstrNum(id); const BYTE* instr = pCode + writeableOffset; - size_t instrSize; + unsigned instrSize; for (size_t i = 0; i < sz; instr += instrSize, i += instrSize, offset += instrSize) { // TODO-RISCV64: support different size instructions diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index 2e212085da8a92..161f87ecb0135e 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -861,7 +861,7 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo, unsigned skipArgs, un if (lowering->numLoweredElements == 1) assert(varDsc->lvExactSize() <= argSize); - cSlotsToEnregister = lowering->numLoweredElements; + cSlotsToEnregister = static_cast(lowering->numLoweredElements); argRegTypeInStruct1 = JITtype2varType(lowering->loweredElements[0]); if (lowering->numLoweredElements == 2) argRegTypeInStruct2 = JITtype2varType(lowering->loweredElements[1]); diff --git a/src/coreclr/jit/targetloongarch64.cpp b/src/coreclr/jit/targetloongarch64.cpp index fe98ab56d5d462..1e876d7eb5f65e 100644 --- a/src/coreclr/jit/targetloongarch64.cpp +++ b/src/coreclr/jit/targetloongarch64.cpp @@ -85,7 +85,7 @@ ABIPassingInformation LoongArch64Classifier::Classify(Compiler* comp, if (!lowering->byIntegerCallConv) { - slots = lowering->numLoweredElements; + slots = static_cast(lowering->numLoweredElements); if (lowering->numLoweredElements == 1) { canPassArgInRegisters = m_floatRegs.Count() > 0; diff --git a/src/coreclr/jit/targetriscv64.cpp b/src/coreclr/jit/targetriscv64.cpp index 3f39c9516812f2..b91420136fb754 100644 --- a/src/coreclr/jit/targetriscv64.cpp +++ b/src/coreclr/jit/targetriscv64.cpp @@ -83,7 +83,7 @@ ABIPassingInformation RiscV64Classifier::Classify(Compiler* comp, floatFields += (unsigned)varTypeIsFloating(type); INDEBUG(debugIntFields += (unsigned)varTypeIsIntegralOrI(type);) } - intFields = lowering->numLoweredElements - floatFields; + intFields = static_cast(lowering->numLoweredElements) - floatFields; assert(debugIntFields == intFields); } } diff --git a/src/coreclr/pal/inc/rt/ntimage.h b/src/coreclr/pal/inc/rt/ntimage.h index 3c7de052340495..8f88791ef51cf6 100644 --- a/src/coreclr/pal/inc/rt/ntimage.h +++ b/src/coreclr/pal/inc/rt/ntimage.h @@ -1015,17 +1015,6 @@ typedef IMAGE_RELOCATION UNALIGNED *PIMAGE_RELOCATION; #define IMAGE_REL_IA64_GPREL32 0x001C #define IMAGE_REL_IA64_ADDEND 0x001F -// -// LOONGARCH64 relocation types -// -#define IMAGE_REL_LOONGARCH64_PC 0x0003 -#define IMAGE_REL_LOONGARCH64_JIR 0x0004 - -// -// RISCV64 relocation types -// -#define IMAGE_REL_RISCV64_PC 0x0003 - // // CEF relocation types. // From 9a7ec94cc6cc6a58951a976ed6648b7a47c30996 Mon Sep 17 00:00:00 2001 From: Steven He Date: Sat, 30 Nov 2024 20:20:43 +0900 Subject: [PATCH 2/9] Make the compiler happy --- src/coreclr/jit/codegenloongarch64.cpp | 2 +- src/coreclr/jit/codegenriscv64.cpp | 2 +- src/coreclr/jit/emitloongarch64.cpp | 2 +- src/coreclr/jit/emitriscv64.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreclr/jit/codegenloongarch64.cpp b/src/coreclr/jit/codegenloongarch64.cpp index 058c091fe45ae5..4ed0bfbdee6f46 100644 --- a/src/coreclr/jit/codegenloongarch64.cpp +++ b/src/coreclr/jit/codegenloongarch64.cpp @@ -174,7 +174,7 @@ void CodeGen::genStackPointerAdjustment(ssize_t spDelta, regNumber tmpReg, bool* { // spDelta is negative in the prolog, positive in the epilog, // but we always tell the unwind codes the positive value. - ssize_t spDeltaAbs = abs(spDelta); + ssize_t spDeltaAbs = std::abs(spDelta); unsigned unwindSpDelta = (unsigned)spDeltaAbs; assert((ssize_t)unwindSpDelta == spDeltaAbs); // make sure that it fits in a unsigned diff --git a/src/coreclr/jit/codegenriscv64.cpp b/src/coreclr/jit/codegenriscv64.cpp index 7d2a18c345de14..8cdd1b61532aac 100644 --- a/src/coreclr/jit/codegenriscv64.cpp +++ b/src/coreclr/jit/codegenriscv64.cpp @@ -163,7 +163,7 @@ void CodeGen::genStackPointerAdjustment(ssize_t spDelta, regNumber tmpReg, bool* { // spDelta is negative in the prolog, positive in the epilog, // but we always tell the unwind codes the positive value. - ssize_t spDeltaAbs = abs(spDelta); + ssize_t spDeltaAbs = std::abs(spDelta); unsigned unwindSpDelta = (unsigned)spDeltaAbs; assert((ssize_t)unwindSpDelta == spDeltaAbs); // make sure that it fits in a unsigned diff --git a/src/coreclr/jit/emitloongarch64.cpp b/src/coreclr/jit/emitloongarch64.cpp index f732b353bea039..c744a91fb6ec27 100644 --- a/src/coreclr/jit/emitloongarch64.cpp +++ b/src/coreclr/jit/emitloongarch64.cpp @@ -2404,7 +2404,7 @@ void emitter::emitIns_Call(EmitCallType callType, // Our stack level should be always greater than the bytes of arguments we push. Just // a sanity test. - assert((unsigned)abs(argSize) <= codeGen->genStackLevel); + assert((unsigned)std::abs(argSize) <= codeGen->genStackLevel); // Trim out any callee-trashed registers from the live set. regMaskTP savedSet = emitGetGCRegsSavedOrModified(methHnd); diff --git a/src/coreclr/jit/emitriscv64.cpp b/src/coreclr/jit/emitriscv64.cpp index 46e23afc2b72a3..9fcb9265d93761 100644 --- a/src/coreclr/jit/emitriscv64.cpp +++ b/src/coreclr/jit/emitriscv64.cpp @@ -1335,7 +1335,7 @@ void emitter::emitIns_Call(EmitCallType callType, // Our stack level should be always greater than the bytes of arguments we push. Just // a sanity test. - assert((unsigned)abs(argSize) <= codeGen->genStackLevel); + assert((unsigned)std::abs(argSize) <= codeGen->genStackLevel); // Trim out any callee-trashed registers from the live set. regMaskTP savedSet = emitGetGCRegsSavedOrModified(methHnd); From 29e0a70b21c69373af3aa00172239eefd91b4527 Mon Sep 17 00:00:00 2001 From: Steven He Date: Sat, 30 Nov 2024 20:52:37 +0900 Subject: [PATCH 3/9] Meh --- src/coreclr/jit/lclvars.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index 161f87ecb0135e..47e83b29fdc405 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -870,7 +870,7 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo, unsigned skipArgs, un assert(floatNum > 0); canPassArgInRegisters = varDscInfo->canEnreg(TYP_DOUBLE, floatNum); - if (canPassArgInRegisters && (floatNum < lowering->numLoweredElements)) + if (canPassArgInRegisters && ((unsigned)floatNum < lowering->numLoweredElements)) { assert(floatNum == 1); assert(lowering->numLoweredElements == 2); From 67965a51440d29e58a674c6664f08b851d2abcbe Mon Sep 17 00:00:00 2001 From: Steven He Date: Sat, 30 Nov 2024 21:26:22 +0900 Subject: [PATCH 4/9] Fix --- src/coreclr/jit/emitloongarch64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/emitloongarch64.cpp b/src/coreclr/jit/emitloongarch64.cpp index c744a91fb6ec27..d7b3603f4d5f3e 100644 --- a/src/coreclr/jit/emitloongarch64.cpp +++ b/src/coreclr/jit/emitloongarch64.cpp @@ -4002,7 +4002,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) int tmp; instruction ins = INS_invalid; - for (int i = 1; i < INS_count; i++) + for (int i = 1; i < static_cast(INS_count); i++) { if ((code & emitGetInsMask(i)) == emitInsCode((instruction)i)) { From 721f53a420482864c7b57368a93612e69895864b Mon Sep 17 00:00:00 2001 From: Steven He Date: Thu, 5 Dec 2024 18:53:10 +0900 Subject: [PATCH 5/9] Add a new target for alljitscommunity --- Directory.Build.props | 2 +- eng/Subsets.props | 5 +++++ eng/native/functions.cmake | 2 +- src/coreclr/build-runtime.cmd | 11 ++++++++++- src/coreclr/build-runtime.sh | 2 +- src/coreclr/components.cmake | 2 ++ src/coreclr/jit/CMakeLists.txt | 16 ++++++++++++---- src/coreclr/runtime.proj | 1 + .../tools/aot/jitinterface/CMakeLists.txt | 1 + 9 files changed, 34 insertions(+), 8 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index f30877332027d0..86368689bcdb0b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -333,7 +333,7 @@ true - ClrFullNativeBuild;ClrRuntimeSubset;ClrJitSubset;ClrPalTestsSubset;ClrAllJitsSubset;ClrILToolsSubset;ClrNativeAotSubset;ClrSpmiSubset;ClrCrossComponentsSubset;ClrDebugSubset;HostArchitecture;PgoInstrument;NativeOptimizationDataSupported;CMakeArgs;CxxStandardLibrary;CxxStandardLibraryStatic;CxxAbiLibrary + ClrFullNativeBuild;ClrRuntimeSubset;ClrJitSubset;ClrPalTestsSubset;ClrAllJitsSubset;ClrAllJitsCommunitySubset;ClrILToolsSubset;ClrNativeAotSubset;ClrSpmiSubset;ClrCrossComponentsSubset;ClrDebugSubset;HostArchitecture;PgoInstrument;NativeOptimizationDataSupported;CMakeArgs;CxxStandardLibrary;CxxStandardLibraryStatic;CxxAbiLibrary true diff --git a/eng/Subsets.props b/eng/Subsets.props index a50fd3e80025eb..5762db43ea68bf 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -153,6 +153,7 @@ + @@ -254,6 +255,10 @@ $(ClrRuntimeBuildSubsets);ClrAllJitsSubset=true + + $(ClrRuntimeBuildSubsets);ClrAllJitsCommunitySubset=true + + $(ClrRuntimeBuildSubsets);ClrILToolsSubset=true diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index f3312a9f805c06..ba0447b6fdc918 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -319,7 +319,7 @@ function(add_component componentName) else() set(componentTargetName "${componentName}") endif() - if (${ARGC} EQUAL 3 AND "${ARG2}" STREQUAL "EXCLUDE_FROM_ALL") + if (${ARGC} EQUAL 3 AND "${ARGV2}" STREQUAL "EXCLUDE_FROM_ALL") set(exclude_from_all_flag "EXCLUDE_FROM_ALL") endif() get_property(definedComponents GLOBAL PROPERTY CLR_CMAKE_COMPONENTS) diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index 14f13556a167be..fd85a5eb2039c0 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -308,6 +308,7 @@ if NOT DEFINED PYTHON ( ) set __CMakeTarget= +set __BuildAllJitsCommunity=0 for /f "delims=" %%a in ("-%__RequestedBuildComponents%-") do ( set "string=%%a" if not "!string:-hosts-=!"=="!string!" ( @@ -319,6 +320,10 @@ for /f "delims=" %%a in ("-%__RequestedBuildComponents%-") do ( if not "!string:-alljits-=!"=="!string!" ( set __CMakeTarget=!__CMakeTarget! alljits ) + if not "!string:-alljitscommunity-=!"=="!string!" ( + set __CMakeTarget=!__CMakeTarget! alljitscommunity + set __BuildAllJitsCommunity=1 + ) if not "!string:-runtime-=!"=="!string!" ( set __CMakeTarget=!__CMakeTarget! runtime ) @@ -479,7 +484,11 @@ set __TargetArchList= set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64 if %__TotalSpecifiedTargetArch% EQU 0 ( REM Nothing specified means we want to build all architectures. - set __TargetArchList=x64 x86 arm arm64 loongarch64 riscv64 + set __TargetArchList=x64 x86 arm arm64 +) + +if %__BuildAllJitsCommunity%==1 ( + set __TargetArchList=%__TargetArchList% loongarch64 riscv64 ) REM Otherwise, add all the specified architectures to the list. diff --git a/src/coreclr/build-runtime.sh b/src/coreclr/build-runtime.sh index 58d1d2eb00ab0b..cb1b44b800893f 100755 --- a/src/coreclr/build-runtime.sh +++ b/src/coreclr/build-runtime.sh @@ -21,7 +21,7 @@ export PYTHON usage_list+=("-pgodatapath: path to profile guided optimization data.") usage_list+=("-pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.") usage_list+=("-staticanalyzer: use scan_build static analyzer.") -usage_list+=("-component: Build individual components instead of the full project. Available options are 'hosts', 'jit', 'runtime', 'paltests', 'alljits', 'iltools', 'nativeaot', and 'spmi'. Can be specified multiple times.") +usage_list+=("-component: Build individual components instead of the full project. Available options are 'hosts', 'jit', 'runtime', 'paltests', 'alljits', 'alljitscommunity', 'iltools', 'nativeaot', and 'spmi'. Can be specified multiple times.") usage_list+=("-subdir: Append a directory with the provided name to the obj and bin paths.") setup_dirs_local() diff --git a/src/coreclr/components.cmake b/src/coreclr/components.cmake index 70dd081376f674..d63fbcdcf32b3a 100644 --- a/src/coreclr/components.cmake +++ b/src/coreclr/components.cmake @@ -1,6 +1,7 @@ # Define all the individually buildable components of the CoreCLR build and their respective targets add_component(jit) add_component(alljits) +add_component(alljitscommunity) add_component(hosts) add_component(runtime) add_component(paltests paltests_install) @@ -15,6 +16,7 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME coreclr_misc) add_component(coreclr_misc) add_dependencies(jit coreclr_misc) add_dependencies(alljits coreclr_misc) +add_dependencies(alljitscommunity coreclr_misc) add_dependencies(runtime coreclr_misc) # The runtime build requires the clrjit and iltools builds diff --git a/src/coreclr/jit/CMakeLists.txt b/src/coreclr/jit/CMakeLists.txt index 71b9214dc9ebde..140ab98bdc963d 100644 --- a/src/coreclr/jit/CMakeLists.txt +++ b/src/coreclr/jit/CMakeLists.txt @@ -19,6 +19,7 @@ function(create_standalone_jit) set(oneValueArgs TARGET OS ARCH) set(multiValueArgs DESTINATIONS) + set(JIT_COMMUNITY false) cmake_parse_arguments(TARGETDETAILS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(TARGETDETAILS_OS STREQUAL "unix_osx" OR TARGETDETAILS_OS STREQUAL "unix_anyos") @@ -51,17 +52,19 @@ function(create_standalone_jit) elseif(TARGETDETAILS_ARCH STREQUAL "loongarch64") set(JIT_ARCH_SOURCES ${JIT_LOONGARCH64_SOURCES}) set(JIT_ARCH_HEADERS ${JIT_LOONGARCH64_HEADERS}) + set(JIT_COMMUNITY true) elseif(TARGETDETAILS_ARCH STREQUAL "riscv64") set(JIT_ARCH_SOURCES ${JIT_RISCV64_SOURCES}) set(JIT_ARCH_HEADERS ${JIT_RISCV64_HEADERS}) + set(JIT_COMMUNITY true) else() clr_unknown_arch() endif() if (TARGETDETAILS_DESTINATIONS STREQUAL "") - add_jit(${TARGETDETAILS_TARGET}) + add_jit(${TARGETDETAILS_TARGET} ${JIT_COMMUNITY}) else() - add_jit(${TARGETDETAILS_TARGET} DESTINATIONS "${TARGETDETAILS_DESTINATIONS}") + add_jit(${TARGETDETAILS_TARGET} ${JIT_COMMUNITY} DESTINATIONS "${TARGETDETAILS_DESTINATIONS}") endif() set_target_definitions_to_custom_os_and_arch(${ARGN}) @@ -565,7 +568,7 @@ endif(CLR_CMAKE_HOST_UNIX) # Shared function for generating JIT # optional arguments: DESTINATIONS path -function(add_jit jitName) +function(add_jit jitName jitCommunity) set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE) @@ -616,7 +619,12 @@ function(add_jit jitName) endif() # add the install targets - install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljits) + if (jitCommunity) + install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljitscommunity) + else() + install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljits) + install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljitscommunity) + endif() endfunction() set(JIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/coreclr/runtime.proj b/src/coreclr/runtime.proj index f200877c5be747..25a16a0f102d8e 100644 --- a/src/coreclr/runtime.proj +++ b/src/coreclr/runtime.proj @@ -66,6 +66,7 @@ <_CoreClrBuildArg Condition="'$(ClrJitSubset)' == 'true'" Include="-component jit" /> <_CoreClrBuildArg Condition="'$(ClrPalTestsSubset)' == 'true'" Include="-component paltests" /> <_CoreClrBuildArg Condition="'$(ClrAllJitsSubset)' == 'true'" Include="-component alljits" /> + <_CoreClrBuildArg Condition="'$(ClrAllJitsCommunitySubset)' == 'true'" Include="-component alljitscommunity" /> <_CoreClrBuildArg Condition="'$(ClrILToolsSubset)' == 'true'" Include="-component iltools" /> <_CoreClrBuildArg Condition="'$(ClrNativeAotSubset)' == 'true'" Include="-component nativeaot" /> <_CoreClrBuildArg Condition="'$(ClrSpmiSubset)' == 'true'" Include="-component spmi" /> diff --git a/src/coreclr/tools/aot/jitinterface/CMakeLists.txt b/src/coreclr/tools/aot/jitinterface/CMakeLists.txt index 6c2512a0ca848c..9952fc2d688843 100644 --- a/src/coreclr/tools/aot/jitinterface/CMakeLists.txt +++ b/src/coreclr/tools/aot/jitinterface/CMakeLists.txt @@ -21,3 +21,4 @@ target_link_libraries(jitinterface_${ARCH_HOST_NAME} PRIVATE minipal) install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT jit) install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT alljits) +install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT alljitscommunity) From 7f486894c98df90fc146857b4fa0a4c80f5eb92b Mon Sep 17 00:00:00 2001 From: Steven He Date: Thu, 5 Dec 2024 19:20:48 +0900 Subject: [PATCH 6/9] More fixes --- src/coreclr/build-runtime.cmd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index fd85a5eb2039c0..271b13ff48e66e 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -485,10 +485,10 @@ set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetAr if %__TotalSpecifiedTargetArch% EQU 0 ( REM Nothing specified means we want to build all architectures. set __TargetArchList=x64 x86 arm arm64 -) - -if %__BuildAllJitsCommunity%==1 ( - set __TargetArchList=%__TargetArchList% loongarch64 riscv64 + + if %__BuildAllJitsCommunity%==1 ( + set __TargetArchList=%__TargetArchList% loongarch64 riscv64 + ) ) REM Otherwise, add all the specified architectures to the list. From fdb894446d1a452f40a7823bbd217aaecd880e8c Mon Sep 17 00:00:00 2001 From: Steven He Date: Thu, 5 Dec 2024 20:04:49 +0900 Subject: [PATCH 7/9] EXCLUDE_FROM_ALL --- src/coreclr/components.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/components.cmake b/src/coreclr/components.cmake index d63fbcdcf32b3a..1a765beffcc0eb 100644 --- a/src/coreclr/components.cmake +++ b/src/coreclr/components.cmake @@ -1,7 +1,7 @@ # Define all the individually buildable components of the CoreCLR build and their respective targets add_component(jit) add_component(alljits) -add_component(alljitscommunity) +add_component(alljitscommunity alljitscommunity EXCLUDE_FROM_ALL) add_component(hosts) add_component(runtime) add_component(paltests paltests_install) From 157052796f040bf3590e3710557d543e23cb1e57 Mon Sep 17 00:00:00 2001 From: Steven He Date: Thu, 5 Dec 2024 20:42:24 +0900 Subject: [PATCH 8/9] Use a cmake argument instead --- src/coreclr/components.cmake | 2 -- src/coreclr/gcinfo/CMakeLists.txt | 6 +++-- src/coreclr/jit/CMakeLists.txt | 22 +++++++------------ src/coreclr/runtime.proj | 2 +- .../tools/aot/jitinterface/CMakeLists.txt | 1 - 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/coreclr/components.cmake b/src/coreclr/components.cmake index 1a765beffcc0eb..70dd081376f674 100644 --- a/src/coreclr/components.cmake +++ b/src/coreclr/components.cmake @@ -1,7 +1,6 @@ # Define all the individually buildable components of the CoreCLR build and their respective targets add_component(jit) add_component(alljits) -add_component(alljitscommunity alljitscommunity EXCLUDE_FROM_ALL) add_component(hosts) add_component(runtime) add_component(paltests paltests_install) @@ -16,7 +15,6 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME coreclr_misc) add_component(coreclr_misc) add_dependencies(jit coreclr_misc) add_dependencies(alljits coreclr_misc) -add_dependencies(alljitscommunity coreclr_misc) add_dependencies(runtime coreclr_misc) # The runtime build requires the clrjit and iltools builds diff --git a/src/coreclr/gcinfo/CMakeLists.txt b/src/coreclr/gcinfo/CMakeLists.txt index 25ce2215bc17be..9ec2ae84eb0784 100644 --- a/src/coreclr/gcinfo/CMakeLists.txt +++ b/src/coreclr/gcinfo/CMakeLists.txt @@ -66,8 +66,10 @@ endif() if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) create_gcinfo_lib(TARGET gcinfo_universal_arm64 OS universal ARCH arm64) create_gcinfo_lib(TARGET gcinfo_unix_x64 OS unix ARCH x64) - create_gcinfo_lib(TARGET gcinfo_unix_loongarch64 OS unix ARCH loongarch64) - create_gcinfo_lib(TARGET gcinfo_unix_riscv64 OS unix ARCH riscv64) + if (CLR_CMAKE_BUILD_COMMUNITY_ALTJITS EQUAL 1) + create_gcinfo_lib(TARGET gcinfo_unix_loongarch64 OS unix ARCH loongarch64) + create_gcinfo_lib(TARGET gcinfo_unix_riscv64 OS unix ARCH riscv64) + endif(CLR_CMAKE_BUILD_COMMUNITY_ALTJITS EQUAL 1) create_gcinfo_lib(TARGET gcinfo_win_x64 OS win ARCH x64) endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) diff --git a/src/coreclr/jit/CMakeLists.txt b/src/coreclr/jit/CMakeLists.txt index 140ab98bdc963d..739a421b937184 100644 --- a/src/coreclr/jit/CMakeLists.txt +++ b/src/coreclr/jit/CMakeLists.txt @@ -19,7 +19,6 @@ function(create_standalone_jit) set(oneValueArgs TARGET OS ARCH) set(multiValueArgs DESTINATIONS) - set(JIT_COMMUNITY false) cmake_parse_arguments(TARGETDETAILS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(TARGETDETAILS_OS STREQUAL "unix_osx" OR TARGETDETAILS_OS STREQUAL "unix_anyos") @@ -52,19 +51,17 @@ function(create_standalone_jit) elseif(TARGETDETAILS_ARCH STREQUAL "loongarch64") set(JIT_ARCH_SOURCES ${JIT_LOONGARCH64_SOURCES}) set(JIT_ARCH_HEADERS ${JIT_LOONGARCH64_HEADERS}) - set(JIT_COMMUNITY true) elseif(TARGETDETAILS_ARCH STREQUAL "riscv64") set(JIT_ARCH_SOURCES ${JIT_RISCV64_SOURCES}) set(JIT_ARCH_HEADERS ${JIT_RISCV64_HEADERS}) - set(JIT_COMMUNITY true) else() clr_unknown_arch() endif() if (TARGETDETAILS_DESTINATIONS STREQUAL "") - add_jit(${TARGETDETAILS_TARGET} ${JIT_COMMUNITY}) + add_jit(${TARGETDETAILS_TARGET}) else() - add_jit(${TARGETDETAILS_TARGET} ${JIT_COMMUNITY} DESTINATIONS "${TARGETDETAILS_DESTINATIONS}") + add_jit(${TARGETDETAILS_TARGET} DESTINATIONS "${TARGETDETAILS_DESTINATIONS}") endif() set_target_definitions_to_custom_os_and_arch(${ARGN}) @@ -568,7 +565,7 @@ endif(CLR_CMAKE_HOST_UNIX) # Shared function for generating JIT # optional arguments: DESTINATIONS path -function(add_jit jitName jitCommunity) +function(add_jit jitName) set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE) @@ -619,12 +616,7 @@ function(add_jit jitName jitCommunity) endif() # add the install targets - if (jitCommunity) - install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljitscommunity) - else() - install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljits) - install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljitscommunity) - endif() + install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljits) endfunction() set(JIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) @@ -650,8 +642,10 @@ if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) create_standalone_jit(TARGET clrjit_universal_arm64_${ARCH_HOST_NAME} OS universal ARCH arm64 DESTINATIONS .) create_standalone_jit(TARGET clrjit_unix_x64_${ARCH_HOST_NAME} OS unix_anyos ARCH x64 DESTINATIONS .) create_standalone_jit(TARGET clrjit_win_x64_${ARCH_HOST_NAME} OS win ARCH x64 DESTINATIONS .) - create_standalone_jit(TARGET clrjit_unix_loongarch64_${ARCH_HOST_NAME} OS unix ARCH loongarch64 DESTINATIONS .) - create_standalone_jit(TARGET clrjit_unix_riscv64_${ARCH_HOST_NAME} OS unix ARCH riscv64 DESTINATIONS .) + if (CLR_CMAKE_BUILD_COMMUNITY_ALTJITS EQUAL 1) + create_standalone_jit(TARGET clrjit_unix_loongarch64_${ARCH_HOST_NAME} OS unix ARCH loongarch64 DESTINATIONS .) + create_standalone_jit(TARGET clrjit_unix_riscv64_${ARCH_HOST_NAME} OS unix ARCH riscv64 DESTINATIONS .) + endif(CLR_CMAKE_BUILD_COMMUNITY_ALTJITS EQUAL 1) endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64) if (CLR_CMAKE_TARGET_ARCH_LOONGARCH64) diff --git a/src/coreclr/runtime.proj b/src/coreclr/runtime.proj index 25a16a0f102d8e..50cf6048f46a57 100644 --- a/src/coreclr/runtime.proj +++ b/src/coreclr/runtime.proj @@ -66,7 +66,7 @@ <_CoreClrBuildArg Condition="'$(ClrJitSubset)' == 'true'" Include="-component jit" /> <_CoreClrBuildArg Condition="'$(ClrPalTestsSubset)' == 'true'" Include="-component paltests" /> <_CoreClrBuildArg Condition="'$(ClrAllJitsSubset)' == 'true'" Include="-component alljits" /> - <_CoreClrBuildArg Condition="'$(ClrAllJitsCommunitySubset)' == 'true'" Include="-component alljitscommunity" /> + <_CoreClrBuildArg Condition="'$(ClrAllJitsCommunitySubset)' == 'true'" Include="-component alljits;-cmakeargs "-DCLR_CMAKE_BUILD_COMMUNITY_ALTJITS=1"" /> <_CoreClrBuildArg Condition="'$(ClrILToolsSubset)' == 'true'" Include="-component iltools" /> <_CoreClrBuildArg Condition="'$(ClrNativeAotSubset)' == 'true'" Include="-component nativeaot" /> <_CoreClrBuildArg Condition="'$(ClrSpmiSubset)' == 'true'" Include="-component spmi" /> diff --git a/src/coreclr/tools/aot/jitinterface/CMakeLists.txt b/src/coreclr/tools/aot/jitinterface/CMakeLists.txt index 9952fc2d688843..6c2512a0ca848c 100644 --- a/src/coreclr/tools/aot/jitinterface/CMakeLists.txt +++ b/src/coreclr/tools/aot/jitinterface/CMakeLists.txt @@ -21,4 +21,3 @@ target_link_libraries(jitinterface_${ARCH_HOST_NAME} PRIVATE minipal) install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT jit) install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT alljits) -install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT alljitscommunity) From 79f87c9e25a55f6206977f3aed9b8406ec6c8ab3 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 6 Dec 2024 01:52:06 +0900 Subject: [PATCH 9/9] Update src/coreclr/jit/emitloongarch64.cpp Co-authored-by: Jan Kotas --- src/coreclr/jit/emitloongarch64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/emitloongarch64.cpp b/src/coreclr/jit/emitloongarch64.cpp index d7b3603f4d5f3e..cb3292e5878249 100644 --- a/src/coreclr/jit/emitloongarch64.cpp +++ b/src/coreclr/jit/emitloongarch64.cpp @@ -4002,7 +4002,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) int tmp; instruction ins = INS_invalid; - for (int i = 1; i < static_cast(INS_count); i++) + for (uint32_t i = 1; i < INS_count; i++) { if ((code & emitGetInsMask(i)) == emitInsCode((instruction)i)) {