diff --git a/src/coreclr/clrfeatures.cmake b/src/coreclr/clrfeatures.cmake index 85c9516ee4ec7a..0327aefce005d6 100644 --- a/src/coreclr/clrfeatures.cmake +++ b/src/coreclr/clrfeatures.cmake @@ -1,9 +1,6 @@ -if (NOT CLR_CMAKE_TARGET_ARCH_WASM) +if (NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_MACCATALYST) set(FEATURE_TIERED_COMPILATION 1) set(FEATURE_REJIT 1) -endif() - -if (NOT CLR_CMAKE_TARGET_ARCH_WASM AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_MACCATALYST) set(FEATURE_JIT 1) endif() diff --git a/src/coreclr/debug/daccess/dacdbiimpl.cpp b/src/coreclr/debug/daccess/dacdbiimpl.cpp index 8465c0ec4a1790..64b92a5022e140 100644 --- a/src/coreclr/debug/daccess/dacdbiimpl.cpp +++ b/src/coreclr/debug/daccess/dacdbiimpl.cpp @@ -914,7 +914,7 @@ void DacDbiInterfaceImpl::GetSequencePoints(MethodDesc * pMethodDesc, ULONG32 entryCount; BOOL success = DebugInfoManager::GetBoundariesAndVars(request, - InfoStoreNew, + InfoStoreNew, NULL, // allocator BoundsType::Uninstrumented, &entryCount, &mapCopy, @@ -5515,7 +5515,7 @@ void DacDbiInterfaceImpl::GetContext(VMPTR_Thread vmThread, DT_CONTEXT * pContex { UpdateContextFromRegDisp(&tmpRd, &tmpContext); CopyMemory(pContextBuffer, &tmpContext, sizeof(*pContextBuffer)); - pContextBuffer->ContextFlags = DT_CONTEXT_CONTROL + pContextBuffer->ContextFlags = DT_CONTEXT_CONTROL #if defined(TARGET_AMD64) || defined(TARGET_ARM) | DT_CONTEXT_INTEGER // DT_CONTEXT_INTEGER is needed to include the frame register on ARM32 and AMD64 architectures // DT_CONTEXT_CONTROL already includes the frame register for X86 and ARM64 architectures @@ -7196,7 +7196,7 @@ HRESULT DacDbiInterfaceImpl::AreOptimizationsDisabled(VMPTR_Module vmModule, mdM *pOptimizationsDisabled = activeILVersion.IsDeoptimized(); } #else - pOptimizationsDisabled->SetDacTargetPtr(0); + *pOptimizationsDisabled = FALSE; #endif return S_OK; @@ -7339,7 +7339,7 @@ HRESULT DacDbiInterfaceImpl::GetDomainAssemblyFromModule(VMPTR_Module vmModule, pVmDomainAssembly->SetHostPtr(pModule->GetDomainAssembly()); return S_OK; -} +} DacRefWalker::DacRefWalker(ClrDataAccess *dac, BOOL walkStacks, BOOL walkFQ, UINT32 handleMask, BOOL resolvePointers) : mDac(dac), mWalkStacks(walkStacks), mWalkFQ(walkFQ), mHandleMask(handleMask), mStackWalker(NULL), diff --git a/src/coreclr/inc/dacvars.h b/src/coreclr/inc/dacvars.h index 31a618b33d0369..3bfc8e5aa5da81 100644 --- a/src/coreclr/inc/dacvars.h +++ b/src/coreclr/inc/dacvars.h @@ -98,7 +98,9 @@ DEFINE_DACVAR(PTR_StubLinkStubManager, StubLinkStubManager__g_pManager, StubLink DEFINE_DACVAR(PTR_JumpStubStubManager, JumpStubStubManager__g_pManager, JumpStubStubManager::g_pManager) DEFINE_DACVAR(PTR_RangeSectionStubManager, RangeSectionStubManager__g_pManager, RangeSectionStubManager::g_pManager) DEFINE_DACVAR(PTR_VirtualCallStubManagerManager, VirtualCallStubManagerManager__g_pManager, VirtualCallStubManagerManager::g_pManager) +#ifdef FEATURE_TIERED_COMPILATION DEFINE_DACVAR(PTR_CallCountingStubManager, CallCountingStubManager__g_pManager, CallCountingStubManager::g_pManager) +#endif // FEATURE_TIERED_COMPILATION DEFINE_DACVAR(PTR_ThreadStore, ThreadStore__s_pThreadStore, ThreadStore::s_pThreadStore) diff --git a/src/coreclr/inc/switches.h b/src/coreclr/inc/switches.h index 7915e0944f4175..ad9421bb3949ab 100644 --- a/src/coreclr/inc/switches.h +++ b/src/coreclr/inc/switches.h @@ -48,7 +48,10 @@ #elif defined(TARGET_64BIT) -#define FEATURE_ON_STACK_REPLACEMENT +#ifdef FEATURE_TIERED_COMPILATION + // FEATURE_ON_STACK_REPLACEMENT is only needed for tiered compilation. + #define FEATURE_ON_STACK_REPLACEMENT +#endif // FEATURE_TIERED_COMPILATION #if defined(HOST_UNIX) // In PAL we have a mechanism that reserves memory on start up that is diff --git a/src/coreclr/inc/vptr_list.h b/src/coreclr/inc/vptr_list.h index 8fade7caa332bf..317c71582ab89e 100644 --- a/src/coreclr/inc/vptr_list.h +++ b/src/coreclr/inc/vptr_list.h @@ -37,7 +37,9 @@ VPTR_CLASS(InteropDispatchStubManager) #if defined(TARGET_X86) && !defined(UNIX_X86_ABI) VPTR_CLASS(TailCallStubManager) #endif +#ifdef FEATURE_TIERED_COMPILATION VPTR_CLASS(CallCountingStubManager) +#endif // FEATURE_TIERED_COMPILATION VPTR_CLASS(PEImageLayout) VPTR_CLASS(ConvertedImageLayout) diff --git a/src/coreclr/vm/amd64/asmconstants.h b/src/coreclr/vm/amd64/asmconstants.h index 1880ecbafdd340..b37f0285bbeb06 100644 --- a/src/coreclr/vm/amd64/asmconstants.h +++ b/src/coreclr/vm/amd64/asmconstants.h @@ -538,6 +538,7 @@ ASMCONSTANTS_C_ASSERT(StubPrecodeData__Target == offsetof(StubPrecode #define StubPrecodeData__SecretParam 0x00 ASMCONSTANTS_C_ASSERT(StubPrecodeData__SecretParam == offsetof(StubPrecodeData, SecretParam)) +#ifdef FEATURE_TIERED_COMPILATION #define CallCountingStubData__RemainingCallCountCell 0x00 ASMCONSTANTS_C_ASSERT(CallCountingStubData__RemainingCallCountCell == offsetof(CallCountingStubData, RemainingCallCountCell)) @@ -546,6 +547,7 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#endif // FEATURE_TIERED_COMPILATION #ifdef FEATURE_CACHED_INTERFACE_DISPATCH #define OFFSETOF__InterfaceDispatchCache__m_rgEntries 0x20 diff --git a/src/coreclr/vm/amd64/thunktemplates.S b/src/coreclr/vm/amd64/thunktemplates.S index 611556da202bb9..cb18e081985a6b 100644 --- a/src/coreclr/vm/amd64/thunktemplates.S +++ b/src/coreclr/vm/amd64/thunktemplates.S @@ -57,7 +57,7 @@ LEAF_END_MARKED StubPrecodeCodeTemplate, _TEXT // FixupPrecode // ---------- -#define FIXUP_PRECODE_CODESIZE 0x18 +#define FIXUP_PRECODE_CODESIZE 0x18 #define FIXUP_PRECODE_DATASIZE 0x18 // 3 qwords .set FIXUP_PRECODE_NUM_THUNKS_PER_MAPPING,(THUNKS_MAP_SIZE / FIXUP_PRECODE_CODESIZE) @@ -101,6 +101,7 @@ LEAF_ENTRY FixupPrecodeCodeTemplate int 3 LEAF_END_MARKED FixupPrecodeCodeTemplate, _TEXT +#ifdef FEATURE_TIERED_COMPILATION // ---------- // CallCountingStub // ---------- @@ -144,6 +145,7 @@ LEAF_ENTRY CallCountingStubCodeTemplate int 3 int 3 LEAF_END_MARKED CallCountingStubCodeTemplate, _TEXT +#endif // FEATURE_TIERED_COMPILATION #endif @@ -168,6 +170,7 @@ PATCH_LABEL FixupPrecodeCode_Fixup jmp [rip + DATA_SLOT(FixupPrecode, PrecodeFixupThunk)] LEAF_END_MARKED FixupPrecodeCode, _TEXT +#ifdef FEATURE_TIERED_COMPILATION LEAF_ENTRY CallCountingStubCode, _TEXT mov rax,QWORD PTR [rip + DATA_SLOT(CallCountingStub, RemainingCallCountCell)] dec WORD PTR [rax] @@ -176,3 +179,4 @@ LEAF_ENTRY CallCountingStubCode, _TEXT LOCAL_LABEL(CountReachedZero): jmp QWORD PTR [rip + DATA_SLOT(CallCountingStub, TargetForThresholdReached)] LEAF_END_MARKED CallCountingStubCode, _TEXT +#endif // FEATURE_TIERED_COMPILATION diff --git a/src/coreclr/vm/arm/asmconstants.h b/src/coreclr/vm/arm/asmconstants.h index 0f4840be10697a..e2e52c399fde27 100644 --- a/src/coreclr/vm/arm/asmconstants.h +++ b/src/coreclr/vm/arm/asmconstants.h @@ -187,6 +187,7 @@ ASMCONSTANTS_C_ASSERT(StubPrecodeData__SecretParam == offsetof(StubPrecodeData, #define StubPrecodeData__Target 0x04 ASMCONSTANTS_C_ASSERT(StubPrecodeData__Target == offsetof(StubPrecodeData, Target)) +#ifdef FEATURE_TIERED_COMPILATION #define CallCountingStubData__RemainingCallCountCell 0x00 ASMCONSTANTS_C_ASSERT(CallCountingStubData__RemainingCallCountCell == offsetof(CallCountingStubData, RemainingCallCountCell)) @@ -195,6 +196,7 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x08 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#endif // FEATURE_TIERED_COMPILATION #ifdef PROFILING_SUPPORTED #define PROFILE_ENTER 0x1 diff --git a/src/coreclr/vm/arm64/asmconstants.h b/src/coreclr/vm/arm64/asmconstants.h index b5b9de92ff4847..083a32d31ba0e6 100644 --- a/src/coreclr/vm/arm64/asmconstants.h +++ b/src/coreclr/vm/arm64/asmconstants.h @@ -274,6 +274,7 @@ ASMCONSTANTS_C_ASSERT(StubPrecodeData__Target == offsetof(StubPrecode #define StubPrecodeData__SecretParam 0x00 ASMCONSTANTS_C_ASSERT(StubPrecodeData__SecretParam == offsetof(StubPrecodeData, SecretParam)) +#ifdef FEATURE_TIERED_COMPILATION #define CallCountingStubData__RemainingCallCountCell 0x00 ASMCONSTANTS_C_ASSERT(CallCountingStubData__RemainingCallCountCell == offsetof(CallCountingStubData, RemainingCallCountCell)) @@ -282,6 +283,7 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#endif // FEATURE_TIERED_COMPILATION #ifdef FEATURE_CACHED_INTERFACE_DISPATCH #define OFFSETOF__InterfaceDispatchCache__m_rgEntries 0x20 diff --git a/src/coreclr/vm/arm64/asmhelpers.S b/src/coreclr/vm/arm64/asmhelpers.S index 3cae429dfb7be8..b9576f72ff7f2c 100644 --- a/src/coreclr/vm/arm64/asmhelpers.S +++ b/src/coreclr/vm/arm64/asmhelpers.S @@ -579,6 +579,10 @@ NESTED_ENTRY OnCallCountThresholdReachedStub, _TEXT, NoHandler EPILOG_BRANCH_REG x9 NESTED_END OnCallCountThresholdReachedStub, _TEXT +#endif // FEATURE_TIERED_COMPILATION + +#ifdef FEATURE_ON_STACK_REPLACEMENT + NESTED_ENTRY JIT_Patchpoint, _TEXT, NoHandler PROLOG_WITH_TRANSITION_BLOCK @@ -595,7 +599,7 @@ LEAF_ENTRY JIT_PatchpointForced, _TEXT b C_FUNC(JIT_Patchpoint) LEAF_END JIT_PatchpointForced, _TEXT -#endif // FEATURE_TIERED_COMPILATION +#endif // FEATURE_ON_STACK_REPLACEMENT LEAF_ENTRY JIT_ValidateIndirectCall, _TEXT ret lr diff --git a/src/coreclr/vm/arm64/thunktemplates.S b/src/coreclr/vm/arm64/thunktemplates.S index 6320513b73e4c3..e8e9e9ba020d46 100644 --- a/src/coreclr/vm/arm64/thunktemplates.S +++ b/src/coreclr/vm/arm64/thunktemplates.S @@ -65,7 +65,7 @@ LEAF_END_MARKED StubPrecodeCodeTemplate, _TEXT dmb ishld ldr x12, DATA_SLOT(FixupPrecode, MethodDesc, FIXUP_PRECODE_CODESIZE, FixupPrecodeCodeTemplate) ldr x11, DATA_SLOT(FixupPrecode, PrecodeFixupThunk, FIXUP_PRECODE_CODESIZE, FixupPrecodeCodeTemplate) - br x11 + br x11 IN_PAGE_INDEX = IN_PAGE_INDEX + 1 .endr @@ -77,6 +77,7 @@ LEAF_ENTRY FixupPrecodeCodeTemplate THUNKS_BLOCK_FIXUP_PRECODE LEAF_END_MARKED FixupPrecodeCodeTemplate, _TEXT +#ifdef FEATURE_TIERED_COMPILATION // ---------- // CallCountingStub // ---------- @@ -110,6 +111,7 @@ LEAF_END_MARKED FixupPrecodeCodeTemplate, _TEXT LEAF_ENTRY CallCountingStubCodeTemplate THUNKS_BLOCK_CALLCOUNTING LEAF_END_MARKED CallCountingStubCodeTemplate, _TEXT +#endif // FEATURE_TIERED_COMPILATION #endif #ifdef DATA_SLOT @@ -134,9 +136,10 @@ LEAF_END_MARKED CallCountingStubCodeTemplate, _TEXT dmb ishld ldr x12, DATA_SLOT(FixupPrecode, MethodDesc) ldr x11, DATA_SLOT(FixupPrecode, PrecodeFixupThunk) - br x11 + br x11 LEAF_END_MARKED FixupPrecodeCode\STUB_PAGE_SIZE +#ifdef FEATURE_TIERED_COMPILATION LEAF_ENTRY CallCountingStubCode\STUB_PAGE_SIZE LOCAL_LABEL(StubStart\STUB_PAGE_SIZE): ldr x9, DATA_SLOT(CallCountingStub, RemainingCallCountCell) @@ -151,5 +154,6 @@ LOCAL_LABEL(CountReachedZero\STUB_PAGE_SIZE): br x10 brk 0xf000 // Stubs need to be aligned in total size LEAF_END_MARKED CallCountingStubCode\STUB_PAGE_SIZE +#endif // FEATURE_TIERED_COMPILATION .endr diff --git a/src/coreclr/vm/eventtrace.cpp b/src/coreclr/vm/eventtrace.cpp index e1553b5d348611..882141ec274582 100644 --- a/src/coreclr/vm/eventtrace.cpp +++ b/src/coreclr/vm/eventtrace.cpp @@ -1925,10 +1925,12 @@ VOID ETW::EnumerationLog::SendOneTimeRundownEvents() // Fire the runtime information event ETW::InfoLog::RuntimeInformation(ETW::InfoLog::InfoStructs::Callback); +#if defined(FEATURE_TIERED_COMPILATION) if (ETW::CompilationLog::TieredCompilation::Rundown::IsEnabled() && g_pConfig->TieredCompilation()) { ETW::CompilationLog::TieredCompilation::Rundown::SendSettings(); } +#endif // FEATURE_TIERED_COMPILATION } @@ -5443,6 +5445,7 @@ VOID ETW::EnumerationLog::EnumerationHelper(Module *moduleFilter, DWORD enumerat } } +#if defined(FEATURE_TIERED_COMPILATION) void ETW::CompilationLog::TieredCompilation::GetSettings(UINT32 *flagsRef) { CONTRACTL { @@ -5484,7 +5487,6 @@ void ETW::CompilationLog::TieredCompilation::GetSettings(UINT32 *flagsRef) #endif *flagsRef = flags; } - void ETW::CompilationLog::TieredCompilation::Runtime::SendSettings() { CONTRACTL { @@ -5556,6 +5558,7 @@ void ETW::CompilationLog::TieredCompilation::Runtime::SendBackgroundJitStop(UINT FireEtwTieredCompilationBackgroundJitStop(GetClrInstanceId(), pendingMethodCount, jittedMethodCount); } +#endif // FEATURE_TIERED_COMPILATION #endif // !FEATURE_NATIVEAOT diff --git a/src/coreclr/vm/i386/asmconstants.h b/src/coreclr/vm/i386/asmconstants.h index 6f5321582c84dd..209a1e731050b6 100644 --- a/src/coreclr/vm/i386/asmconstants.h +++ b/src/coreclr/vm/i386/asmconstants.h @@ -301,6 +301,7 @@ ASMCONSTANTS_C_ASSERT(StubPrecodeData__Target == offsetof(StubPrecode #define StubPrecodeData__SecretParam 0x00 ASMCONSTANTS_C_ASSERT(StubPrecodeData__SecretParam == offsetof(StubPrecodeData, SecretParam)) +#ifdef FEATURE_TIERED_COMPILATION #define CallCountingStubData__RemainingCallCountCell 0x00 ASMCONSTANTS_C_ASSERT(CallCountingStubData__RemainingCallCountCell == offsetof(CallCountingStubData, RemainingCallCountCell)) @@ -309,6 +310,7 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x08 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#endif // FEATURE_TIERED_COMPILATION #undef ASMCONSTANTS_C_ASSERT #undef ASMCONSTANTS_RUNTIME_ASSERT diff --git a/src/coreclr/vm/i386/thunktemplates.S b/src/coreclr/vm/i386/thunktemplates.S index d0b8257e32f50e..a9a2c34c157732 100644 --- a/src/coreclr/vm/i386/thunktemplates.S +++ b/src/coreclr/vm/i386/thunktemplates.S @@ -44,6 +44,7 @@ SLOT_ADDRESS_PATCH_LABEL FixupPrecode, MethodDesc SLOT_ADDRESS_PATCH_LABEL FixupPrecode, PrecodeFixupThunk LEAF_END_MARKED FixupPrecodeCode +#ifdef FEATURE_TIERED_COMPILATION LEAF_ENTRY CallCountingStubCode mov eax, dword ptr [DATA_SLOT(CallCountingStub, RemainingCallCountCell)] SLOT_ADDRESS_PATCH_LABEL CallCountingStub, RemainingCallCountCell @@ -55,3 +56,4 @@ LOCAL_LABEL(CountReachedZero): INDJMP DATA_SLOT(CallCountingStub, TargetForThresholdReached) SLOT_ADDRESS_PATCH_LABEL CallCountingStub, TargetForThresholdReached LEAF_END_MARKED CallCountingStubCode +#endif // FEATURE_TIERED_COMPILATION diff --git a/src/coreclr/vm/loongarch64/asmconstants.h b/src/coreclr/vm/loongarch64/asmconstants.h index 41589253cb9752..77404df969160f 100644 --- a/src/coreclr/vm/loongarch64/asmconstants.h +++ b/src/coreclr/vm/loongarch64/asmconstants.h @@ -219,6 +219,7 @@ ASMCONSTANTS_C_ASSERT(StubPrecodeData__Target == offsetof(StubPrecode #define StubPrecodeData__SecretParam 0x00 ASMCONSTANTS_C_ASSERT(StubPrecodeData__SecretParam == offsetof(StubPrecodeData, SecretParam)) +#ifdef FEATURE_TIERED_COMPILATION #define CallCountingStubData__RemainingCallCountCell 0x00 ASMCONSTANTS_C_ASSERT(CallCountingStubData__RemainingCallCountCell == offsetof(CallCountingStubData, RemainingCallCountCell)) @@ -227,6 +228,7 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#endif // FEATURE_TIERED_COMPILATION #ifdef PROFILING_SUPPORTED #define PROFILE_ENTER 1 diff --git a/src/coreclr/vm/loongarch64/asmhelpers.S b/src/coreclr/vm/loongarch64/asmhelpers.S index ce5a90fe2d5f8d..cdcaf96184cb27 100644 --- a/src/coreclr/vm/loongarch64/asmhelpers.S +++ b/src/coreclr/vm/loongarch64/asmhelpers.S @@ -949,6 +949,10 @@ NESTED_ENTRY OnCallCountThresholdReachedStub, _TEXT, NoHandler EPILOG_BRANCH_REG $t4 NESTED_END OnCallCountThresholdReachedStub, _TEXT +#endif // FEATURE_TIERED_COMPILATION + +#ifdef FEATURE_ON_STACK_REPLACEMENT + NESTED_ENTRY JIT_Patchpoint, _TEXT, NoHandler PROLOG_WITH_TRANSITION_BLOCK @@ -965,7 +969,7 @@ LEAF_ENTRY JIT_PatchpointForced, _TEXT b C_FUNC(JIT_Patchpoint) LEAF_END JIT_PatchpointForced, _TEXT -#endif // FEATURE_TIERED_COMPILATION +#endif // FEATURE_ON_STACK_REPLACEMENT // ------------------------------------------------------------------ // size_t GetThreadStaticsVariableOffset() diff --git a/src/coreclr/vm/loongarch64/thunktemplates.S b/src/coreclr/vm/loongarch64/thunktemplates.S index 52be9666d29582..cfdae816bc570c 100644 --- a/src/coreclr/vm/loongarch64/thunktemplates.S +++ b/src/coreclr/vm/loongarch64/thunktemplates.S @@ -24,6 +24,7 @@ LEAF_ENTRY FixupPrecodeCode jirl $r0,$r21,0 LEAF_END_MARKED FixupPrecodeCode +#ifdef FEATURE_TIERED_COMPILATION // NOTE: For LoongArch64 `CallCountingStubData__RemainingCallCountCell` must be zero !!! // Because the stub-identifying token is $t1 within the `OnCallCountThresholdReachedStub`. LEAF_ENTRY CallCountingStubCode @@ -39,3 +40,4 @@ LOCAL_LABEL(CountReachedZero): ld.d $r21, $t2, CallCountingStubData__TargetForThresholdReached jirl $r0,$r21,0 LEAF_END_MARKED CallCountingStubCode +#endif // FEATURE_TIERED_COMPILATION diff --git a/src/coreclr/vm/riscv64/asmconstants.h b/src/coreclr/vm/riscv64/asmconstants.h index b2260e8a30f26d..8db47c768a2f9a 100644 --- a/src/coreclr/vm/riscv64/asmconstants.h +++ b/src/coreclr/vm/riscv64/asmconstants.h @@ -220,6 +220,7 @@ ASMCONSTANTS_C_ASSERT(StubPrecodeData__Target == offsetof(StubPrecode #define StubPrecodeData__SecretParam 0x00 ASMCONSTANTS_C_ASSERT(StubPrecodeData__SecretParam == offsetof(StubPrecodeData, SecretParam)) +#ifdef FEATURE_TIERED_COMPILATION #define CallCountingStubData__RemainingCallCountCell 0x00 ASMCONSTANTS_C_ASSERT(CallCountingStubData__RemainingCallCountCell == offsetof(CallCountingStubData, RemainingCallCountCell)) @@ -228,6 +229,7 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#endif // FEATURE_TIERED_COMPILATION #ifdef PROFILING_SUPPORTED #define PROFILE_ENTER 1 diff --git a/src/coreclr/vm/riscv64/asmhelpers.S b/src/coreclr/vm/riscv64/asmhelpers.S index 1c03436880c0cc..7e2db0a99a69f9 100644 --- a/src/coreclr/vm/riscv64/asmhelpers.S +++ b/src/coreclr/vm/riscv64/asmhelpers.S @@ -822,6 +822,10 @@ NESTED_ENTRY OnCallCountThresholdReachedStub, _TEXT, NoHandler EPILOG_BRANCH_REG t4 NESTED_END OnCallCountThresholdReachedStub, _TEXT +#endif // FEATURE_TIERED_COMPILATION + +#ifdef FEATURE_ON_STACK_REPLACEMENT + NESTED_ENTRY JIT_Patchpoint, _TEXT, NoHandler PROLOG_WITH_TRANSITION_BLOCK @@ -838,7 +842,7 @@ LEAF_ENTRY JIT_PatchpointForced, _TEXT j C_FUNC(JIT_Patchpoint) LEAF_END JIT_PatchpointForced, _TEXT -#endif // FEATURE_TIERED_COMPILATION +#endif // FEATURE_ON_STACK_REPLACEMENT // ------------------------------------------------------------------ // size_t GetThreadStaticsVariableOffset()