@@ -5895,9 +5895,14 @@ BOOL IsIPinVirtualStub(PCODE f_IP)
58955895#endif // FEATURE_VIRTUAL_STUB_DISPATCH
58965896}
58975897
5898+ #if defined(TARGET_ARM64) || defined(TARGET_ARM)
5899+ EXTERN_C void RhpWriteBarriers ();
5900+ EXTERN_C void RhpWriteBarriers_End ();
5901+ #endif
5902+
58985903typedef uint8_t CODE_LOCATION;
58995904EXTERN_C CODE_LOCATION RhpAssignRefAVLocation;
5900- #if defined(HOST_X86 )
5905+ #if defined(TARGET_X86 )
59015906EXTERN_C CODE_LOCATION RhpAssignRefEAXAVLocation;
59025907EXTERN_C CODE_LOCATION RhpAssignRefECXAVLocation;
59035908EXTERN_C CODE_LOCATION RhpAssignRefEBXAVLocation;
@@ -5906,7 +5911,7 @@ EXTERN_C CODE_LOCATION RhpAssignRefEDIAVLocation;
59065911EXTERN_C CODE_LOCATION RhpAssignRefEBPAVLocation;
59075912#endif
59085913EXTERN_C CODE_LOCATION RhpCheckedAssignRefAVLocation;
5909- #if defined(HOST_X86 )
5914+ #if defined(TARGET_X86 )
59105915EXTERN_C CODE_LOCATION RhpCheckedAssignRefEAXAVLocation;
59115916EXTERN_C CODE_LOCATION RhpCheckedAssignRefECXAVLocation;
59125917EXTERN_C CODE_LOCATION RhpCheckedAssignRefEBXAVLocation;
@@ -5916,14 +5921,14 @@ EXTERN_C CODE_LOCATION RhpCheckedAssignRefEBPAVLocation;
59165921#endif
59175922EXTERN_C CODE_LOCATION RhpByRefAssignRefAVLocation1;
59185923
5919- #if !defined(HOST_ARM64 ) && !defined(HOST_LOONGARCH64 ) && !defined(HOST_RISCV64 )
5924+ #if !defined(TARGET_ARM64 ) && !defined(TARGET_LOONGARCH64 ) && !defined(TARGET_RISCV64 )
59205925EXTERN_C CODE_LOCATION RhpByRefAssignRefAVLocation2;
59215926#endif
59225927
59235928static uintptr_t writeBarrierAVLocations[] =
59245929{
59255930 (uintptr_t )&RhpAssignRefAVLocation,
5926- #if defined(HOST_X86 )
5931+ #if defined(TARGET_X86 )
59275932 (uintptr_t )&RhpAssignRefEAXAVLocation,
59285933 (uintptr_t )&RhpAssignRefECXAVLocation,
59295934 (uintptr_t )&RhpAssignRefEBXAVLocation,
@@ -5941,7 +5946,7 @@ static uintptr_t writeBarrierAVLocations[] =
59415946 (uintptr_t )&RhpCheckedAssignRefEBPAVLocation,
59425947#endif
59435948 (uintptr_t )&RhpByRefAssignRefAVLocation1,
5944- #if !defined(HOST_ARM64 ) && !defined(HOST_LOONGARCH64 ) && !defined(HOST_RISCV64 )
5949+ #if !defined(TARGET_ARM64 ) && !defined(TARGET_LOONGARCH64 ) && !defined(TARGET_RISCV64 )
59455950 (uintptr_t )&RhpByRefAssignRefAVLocation2,
59465951#endif
59475952};
@@ -5961,17 +5966,17 @@ bool IsIPInMarkedJitHelper(UINT_PTR uControlPc)
59615966 ASSERT (*(uint8_t *)writeBarrierAVLocations[i] != 0xE9 ); // jmp XXXXXXXX
59625967#endif
59635968
5964- #ifdef TARGET_ARM
5965- if ((writeBarrierAVLocations[i] | THUMB_CODE) == (uControlPc | THUMB_CODE))
5966- #else
59675969 if (writeBarrierAVLocations[i] == uControlPc)
5968- #endif
59695970 return true ;
59705971 }
59715972
59725973#define CHECK_RANGE (name ) \
59735974 if (GetEEFuncEntryPoint (name) <= uControlPc && uControlPc < GetEEFuncEntryPoint (name##_End)) return true ;
59745975
5976+ #if defined(TARGET_ARM64) || defined(TARGET_ARM)
5977+ CHECK_RANGE (RhpWriteBarriers)
5978+ #endif
5979+
59755980#ifndef TARGET_X86
59765981 CHECK_RANGE (JIT_WriteBarrier)
59775982 CHECK_RANGE (JIT_CheckedWriteBarrier)
0 commit comments