summaryrefslogtreecommitdiff
path: root/src/vm/arm/patchedcode.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/arm/patchedcode.S')
-rw-r--r--src/vm/arm/patchedcode.S71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/vm/arm/patchedcode.S b/src/vm/arm/patchedcode.S
new file mode 100644
index 0000000000..9335fe65fc
--- /dev/null
+++ b/src/vm/arm/patchedcode.S
@@ -0,0 +1,71 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// ==++==
+//
+
+//
+// ==--==
+#include "unixasmmacros.inc"
+#include "asmconstants.h"
+
+.syntax unified
+.thumb
+
+// ------------------------------------------------------------------
+// Start of the writeable code region
+ LEAF_ENTRY JIT_PatchedCodeStart, _TEXT
+ bx lr
+ LEAF_END JIT_PatchedCodeStart, _TEXT
+
+// ------------------------------------------------------------------
+// Optimized TLS getters
+
+ LEAF_ENTRY GetTLSDummy, _TEXT
+ mov r0, #0
+ bx lr
+ LEAF_END GetTLSDummy, _TEXT
+
+ .align 4
+ LEAF_ENTRY ClrFlsGetBlock, _TEXT
+ // This will be overwritten at runtime with optimized ClrFlsGetBlock implementation
+ b C_FUNC(GetTLSDummy)
+ // Just allocate space that will be filled in at runtime
+ .space (TLS_GETTER_MAX_SIZE_ASM - 2)
+ LEAF_END ClrFlsGetBlock, _TEXT
+
+// ------------------------------------------------------------------
+// GC write barrier support.
+//
+// GC Write barriers are defined in asmhelpers.asm. The following functions are used to define
+// patchable location where the write-barriers are copied over at runtime
+
+ LEAF_ENTRY JIT_PatchedWriteBarrierStart, _TEXT
+ LEAF_END JIT_PatchedWriteBarrierStart, _TEXT
+
+ // These write barriers are overwritten on the fly
+ // See ValidateWriteBarriers on how the sizes of these should be calculated
+ .align 4
+ LEAF_ENTRY JIT_WriteBarrier, _TEXT
+ .space (0x84)
+ LEAF_END_MARKED JIT_WriteBarrier, _TEXT
+
+ .align 4
+ LEAF_ENTRY JIT_CheckedWriteBarrier, _TEXT
+ .space (0x9C)
+ LEAF_END_MARKED JIT_CheckedWriteBarrier, _TEXT
+
+ .align 4
+ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT
+ .space (0xA0)
+ LEAF_END_MARKED JIT_ByRefWriteBarrier , _TEXT
+
+ LEAF_ENTRY JIT_PatchedWriteBarrierLast, _TEXT
+ LEAF_END JIT_PatchedWriteBarrierLast, _TEXT
+
+// ------------------------------------------------------------------
+// End of the writeable code region
+ LEAF_ENTRY JIT_PatchedCodeLast, _TEXT
+ bx lr
+ LEAF_END JIT_PatchedCodeLast, _TEXT