diff options
Diffstat (limited to 'src/vm/arm64/asmhelpers.asm')
-rw-r--r-- | src/vm/arm64/asmhelpers.asm | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/vm/arm64/asmhelpers.asm b/src/vm/arm64/asmhelpers.asm index c1f8429489..27e284c0cd 100644 --- a/src/vm/arm64/asmhelpers.asm +++ b/src/vm/arm64/asmhelpers.asm @@ -210,7 +210,7 @@ Done ; ------------------------------------------------------------------ ; 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 ; x12 = FixupPrecode * @@ -218,8 +218,8 @@ Done ; 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 @@ -229,6 +229,30 @@ Done b ThePreStub NESTED_END + +; ------------------------------------------------------------------ +; 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 + + ; 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 ; ------------------------------------------------------------------ NESTED_ENTRY ThePreStub |