summaryrefslogtreecommitdiff
path: root/src/vm/arm64/asmhelpers.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/arm64/asmhelpers.asm')
-rw-r--r--src/vm/arm64/asmhelpers.asm60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/vm/arm64/asmhelpers.asm b/src/vm/arm64/asmhelpers.asm
index e8b16ded6a..24b26eb1c9 100644
--- a/src/vm/arm64/asmhelpers.asm
+++ b/src/vm/arm64/asmhelpers.asm
@@ -52,6 +52,9 @@
IMPORT $g_GCShadowEnd
#endif // WRITE_BARRIER_CHECK
+ IMPORT JIT_GetSharedNonGCStaticBase_Helper
+ IMPORT JIT_GetSharedGCStaticBase_Helper
+
TEXTAREA
;; LPVOID __stdcall GetCurrentIP(void);
@@ -1326,5 +1329,62 @@ Fail
LEAF_END
#endif
+;
+; JIT Static access helpers when coreclr host specifies single appdomain flag
+;
+
+; ------------------------------------------------------------------
+; void* JIT_GetSharedNonGCStaticBase(SIZE_T moduleDomainID, DWORD dwClassDomainID)
+
+ LEAF_ENTRY JIT_GetSharedNonGCStaticBase_SingleAppDomain
+ ; If class is not initialized, bail to C++ helper
+ add x2, x0, #DomainLocalModule__m_pDataBlob
+ ldrb w2, [x2, w1]
+ tst w2, #1
+ beq CallHelper1
+
+ ret lr
+
+CallHelper1
+ ; Tail call JIT_GetSharedNonGCStaticBase_Helper
+ b JIT_GetSharedNonGCStaticBase_Helper
+ LEAF_END
+
+
+; ------------------------------------------------------------------
+; void* JIT_GetSharedNonGCStaticBaseNoCtor(SIZE_T moduleDomainID, DWORD dwClassDomainID)
+
+ LEAF_ENTRY JIT_GetSharedNonGCStaticBaseNoCtor_SingleAppDomain
+ ret lr
+ LEAF_END
+
+
+; ------------------------------------------------------------------
+; void* JIT_GetSharedGCStaticBase(SIZE_T moduleDomainID, DWORD dwClassDomainID)
+
+ LEAF_ENTRY JIT_GetSharedGCStaticBase_SingleAppDomain
+ ; If class is not initialized, bail to C++ helper
+ add x2, x0, #DomainLocalModule__m_pDataBlob
+ ldrb w2, [x2, w1]
+ tst w2, #1
+ beq CallHelper2
+
+ ldr x0, [x0, #DomainLocalModule__m_pGCStatics]
+ ret lr
+
+CallHelper2
+ ; Tail call Jit_GetSharedGCStaticBase_Helper
+ b JIT_GetSharedGCStaticBase_Helper
+ LEAF_END
+
+
+; ------------------------------------------------------------------
+; void* JIT_GetSharedGCStaticBaseNoCtor(SIZE_T moduleDomainID, DWORD dwClassDomainID)
+
+ LEAF_ENTRY JIT_GetSharedGCStaticBaseNoCtor_SingleAppDomain
+ ldr x0, [x0, #DomainLocalModule__m_pGCStatics]
+ ret lr
+ LEAF_END
+
; Must be at very end of file
END