summaryrefslogtreecommitdiff
path: root/src/vm/arm64/asmhelpers.S
diff options
context:
space:
mode:
authorGleb Balykov <g.balykov@samsung.com>2020-09-14 13:30:50 +0300
committerAlexander Soldatov/Platform Lab /SRR/Staff Engineer/Samsung Electronics <soldatov.a@samsung.com>2020-09-21 20:04:27 +0300
commit676b3e46459a5138d05ac31bb697a54a8a8f685c (patch)
tree9a5d32deb41da42d98bf125b6a1ec9dee8359ce8 /src/vm/arm64/asmhelpers.S
parent7a0186fe2611e00cd8019adced7af3a269e2e7f4 (diff)
downloadcoreclr-676b3e46459a5138d05ac31bb697a54a8a8f685c.tar.gz
coreclr-676b3e46459a5138d05ac31bb697a54a8a8f685c.tar.bz2
coreclr-676b3e46459a5138d05ac31bb697a54a8a8f685c.zip
[Tizen] Add RelativeFixupPrecode for arm64, which replaces FixupPrecode in FNV imagessubmit/tizen/20200921.230336accepted/tizen/unified/20200922.034817
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