summaryrefslogtreecommitdiff
path: root/src/vm/arm64/asmhelpers.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/arm64/asmhelpers.S')
-rw-r--r--src/vm/arm64/asmhelpers.S29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/vm/arm64/asmhelpers.S b/src/vm/arm64/asmhelpers.S
index 91aaa5b054..15ec19219b 100644
--- a/src/vm/arm64/asmhelpers.S
+++ b/src/vm/arm64/asmhelpers.S
@@ -142,15 +142,15 @@ NESTED_END NDirectImportThunk, _TEXT
// ------------------------------------------------------------------
// The call in fixup precode initally points to this function.
-// The pupose of this function is to load the MethodDesc and forward the call to prestub.
+// The purpose of this function is to load the MethodDesc and forward the call to prestub.
NESTED_ENTRY PrecodeFixupThunk, _TEXT, NoHandler
// x12 = FixupPrecode *
// On Exit
// x12 = MethodDesc*
// x13, x14 Trashed
// Inline computation done by FixupPrecode::GetMethodDesc()
- ldrb w13, [x12, #Offset_PrecodeChunkIndex] //m_PrecodeChunkIndex
- ldrb w14, [x12, #Offset_MethodDescChunkIndex] // m_MethodDescChunkIndex
+ ldrb w13, [x12, #Offset_FixupPrecodeChunkIndex] //m_PrecodeChunkIndex
+ ldrb w14, [x12, #Offset_FixupPrecodeMethodDescChunkIndex] // m_MethodDescChunkIndex
add x12, x12, w13, uxtw #FixupPrecode_ALIGNMENT_SHIFT_1
add x13, x12, w13, uxtw #FixupPrecode_ALIGNMENT_SHIFT_2
@@ -161,6 +161,29 @@ NESTED_ENTRY PrecodeFixupThunk, _TEXT, NoHandler
NESTED_END PrecodeFixupThunk, _TEXT
// ------------------------------------------------------------------
+// ------------------------------------------------------------------
+// The call in fixup precode initally points to this function.
+// The purpose of this function is to load the MethodDesc and forward the call to prestub.
+NESTED_ENTRY PrecodeRelativeFixupThunk, _TEXT, NoHandler
+ // x11 = RelativeFixupPrecode *
+ // On Exit
+ // x12 = MethodDesc*
+ // x11, x13 Trashed
+ // Inline computation done by RelativeFixupPrecode::GetMethodDesc()
+ ldrb w12, [x11, #Offset_RelativeFixupPrecodeChunkIndex] //m_PrecodeChunkIndex
+ ldrb w13, [x11, #Offset_RelativeFixupPrecodeMethodDescChunkIndex] // m_MethodDescChunkIndex
+
+ add x11, x11, w12, uxtw #RelativeFixupPrecode_ALIGNMENT_SHIFT
+ add x11, x11, w12, uxtw #RelativeFixupPrecode_ALIGNMENT_SHIFT
+ add x12, x11, #SIZEOF__RelativeFixupPrecode // GetBase()
+ ldr x11, [x12] // base
+ add x12, x12, x11
+ add x12, x12, w13, uxtw #MethodDesc_ALIGNMENT_SHIFT
+
+ b ThePreStub
+NESTED_END PrecodeRelativeFixupThunk, _TEXT
+// ------------------------------------------------------------------
+
NESTED_ENTRY ThePreStub, _TEXT, NoHandler
PROLOG_WITH_TRANSITION_BLOCK