Skip to content

Commit f5a07a7

Browse files
committed
Revert "Alternative approach to fixing the EH issue that may fix OSX as well. If it does... I'll likely do this logic for all architectures"
This reverts commit a882fbf.
1 parent a882fbf commit f5a07a7

File tree

5 files changed

+10
-41
lines changed

5 files changed

+10
-41
lines changed

src/coreclr/runtime/arm/WriteBarriers.S

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@ GLOBAL_LABEL RhpCheckedAssignRefAVLocation
179179
LEAF_END RhpCheckedAssignRef\EXPORT_REG_NAME, _TEXT
180180
.endm
181181

182-
LEAF_ENTRY RhpWriteBarriers, _TEXT
183-
bx lr
184-
LEAF_END RhpWriteBarriers, _TEXT
185-
186182
// One day we might have write barriers for all the possible argument registers but for now we have
187183
// just one write barrier that assumes the input register is RSI.
188184
DEFINE_CHECKED_WRITE_BARRIER r1, r1
@@ -306,7 +302,3 @@ LOCAL_LABEL(RhpByRefAssignRef_NotInHeap):
306302
add r1, #4
307303
bx lr
308304
LEAF_END RhpByRefAssignRef, _TEXT
309-
310-
LEAF_ENTRY RhpWriteBarriers_End, _TEXT
311-
bx lr
312-
LEAF_END RhpWriteBarriers_End, _TEXT

src/coreclr/runtime/arm64/WriteBarriers.S

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@
179179
// Exit label
180180
.endm
181181

182-
LEAF_ENTRY RhpWriteBarriers, _TEXT
183-
ret
184-
LEAF_END RhpWriteBarriers, _TEXT
185-
186182
// void JIT_ByRefWriteBarrier
187183
// On entry:
188184
// x13 : the source address (points to object reference to write)
@@ -401,8 +397,3 @@ LOCAL_LABEL(NoBarrierXchg):
401397
.arch_extension nolse
402398
#endif
403399
#endif // FEATURE_NATIVEAOT
404-
405-
LEAF_ENTRY RhpWriteBarriers_End, _TEXT
406-
ret
407-
LEAF_END RhpWriteBarriers_End, _TEXT
408-

src/coreclr/runtime/arm64/WriteBarriers.asm

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,6 @@ INVALIDGCVALUE EQU 0xCCCCCCCD
189189
;; Exit label
190190
MEND
191191

192-
LEAF_ENTRY RhpWriteBarriers
193-
ret
194-
LEAF_END RhpWriteBarriers
195-
196192
;; void JIT_ByRefWriteBarrier
197193
;; On entry:
198194
;; x13 : the source address (points to object reference to write)
@@ -395,8 +391,4 @@ NoBarrierXchg
395391
LEAF_END RhpCheckedXchg
396392
#endif // FEATURE_NATIVEAOT
397393

398-
LEAF_ENTRY RhpWriteBarriers_End
399-
ret
400-
LEAF_END RhpWriteBarriers_End
401-
402394
end
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
#include "AsmMacros_Shared.h"
5-
4+
// TODO: Implement

src/coreclr/vm/excep.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5895,14 +5895,9 @@ 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-
59035898
typedef uint8_t CODE_LOCATION;
59045899
EXTERN_C CODE_LOCATION RhpAssignRefAVLocation;
5905-
#if defined(TARGET_X86)
5900+
#if defined(HOST_X86)
59065901
EXTERN_C CODE_LOCATION RhpAssignRefEAXAVLocation;
59075902
EXTERN_C CODE_LOCATION RhpAssignRefECXAVLocation;
59085903
EXTERN_C CODE_LOCATION RhpAssignRefEBXAVLocation;
@@ -5911,7 +5906,7 @@ EXTERN_C CODE_LOCATION RhpAssignRefEDIAVLocation;
59115906
EXTERN_C CODE_LOCATION RhpAssignRefEBPAVLocation;
59125907
#endif
59135908
EXTERN_C CODE_LOCATION RhpCheckedAssignRefAVLocation;
5914-
#if defined(TARGET_X86)
5909+
#if defined(HOST_X86)
59155910
EXTERN_C CODE_LOCATION RhpCheckedAssignRefEAXAVLocation;
59165911
EXTERN_C CODE_LOCATION RhpCheckedAssignRefECXAVLocation;
59175912
EXTERN_C CODE_LOCATION RhpCheckedAssignRefEBXAVLocation;
@@ -5921,14 +5916,14 @@ EXTERN_C CODE_LOCATION RhpCheckedAssignRefEBPAVLocation;
59215916
#endif
59225917
EXTERN_C CODE_LOCATION RhpByRefAssignRefAVLocation1;
59235918

5924-
#if !defined(TARGET_ARM64) && !defined(TARGET_LOONGARCH64) && !defined(TARGET_RISCV64)
5919+
#if !defined(HOST_ARM64) && !defined(HOST_LOONGARCH64) && !defined(HOST_RISCV64)
59255920
EXTERN_C CODE_LOCATION RhpByRefAssignRefAVLocation2;
59265921
#endif
59275922

59285923
static uintptr_t writeBarrierAVLocations[] =
59295924
{
59305925
(uintptr_t)&RhpAssignRefAVLocation,
5931-
#if defined(TARGET_X86)
5926+
#if defined(HOST_X86)
59325927
(uintptr_t)&RhpAssignRefEAXAVLocation,
59335928
(uintptr_t)&RhpAssignRefECXAVLocation,
59345929
(uintptr_t)&RhpAssignRefEBXAVLocation,
@@ -5946,7 +5941,7 @@ static uintptr_t writeBarrierAVLocations[] =
59465941
(uintptr_t)&RhpCheckedAssignRefEBPAVLocation,
59475942
#endif
59485943
(uintptr_t)&RhpByRefAssignRefAVLocation1,
5949-
#if !defined(TARGET_ARM64) && !defined(TARGET_LOONGARCH64) && !defined(TARGET_RISCV64)
5944+
#if !defined(HOST_ARM64) && !defined(HOST_LOONGARCH64) && !defined(HOST_RISCV64)
59505945
(uintptr_t)&RhpByRefAssignRefAVLocation2,
59515946
#endif
59525947
};
@@ -5966,17 +5961,17 @@ bool IsIPInMarkedJitHelper(UINT_PTR uControlPc)
59665961
ASSERT(*(uint8_t*)writeBarrierAVLocations[i] != 0xE9); // jmp XXXXXXXX
59675962
#endif
59685963

5964+
#ifdef TARGET_ARM
5965+
if ((writeBarrierAVLocations[i] | THUMB_CODE) == (uControlPc | THUMB_CODE))
5966+
#else
59695967
if (writeBarrierAVLocations[i] == uControlPc)
5968+
#endif
59705969
return true;
59715970
}
59725971

59735972
#define CHECK_RANGE(name) \
59745973
if (GetEEFuncEntryPoint(name) <= uControlPc && uControlPc < GetEEFuncEntryPoint(name##_End)) return true;
59755974

5976-
#if defined(TARGET_ARM64) || defined(TARGET_ARM)
5977-
CHECK_RANGE(RhpWriteBarriers)
5978-
#endif
5979-
59805975
#ifndef TARGET_X86
59815976
CHECK_RANGE(JIT_WriteBarrier)
59825977
CHECK_RANGE(JIT_CheckedWriteBarrier)

0 commit comments

Comments
 (0)