Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/coreclr/vm/loongarch64/thunktemplates.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
#include "unixasmmacros.inc"
#include "asmconstants.h"

; Note that the offsets specified in pcaddi must match the behavior of GetStubCodePageSize() on this architecture/os.
// Note that the offsets specified in pcaddi must match the behavior of GetStubCodePageSize() on this architecture/os.

LEAF_ENTRY StubPrecodeCode
pcaddi $r21, 0x4004 //4, for Type encoding.
pcaddi $r21, 0x1004 //4, for Type encoding.
ld.d $t2,$r21, (StubPrecodeData__MethodDesc - 4*4)
ld.d $r21,$r21, (StubPrecodeData__Target - 4*4)
jirl $r0,$r21,0
LEAF_END_MARKED StubPrecodeCode

LEAF_ENTRY FixupPrecodeCode
pcaddi $r21, 0x4003 //3, for Type encoding.
pcaddi $r21, 0x1003 //3, for Type encoding.
ld.d $r21,$r21, (FixupPrecodeData__Target - 4*3)
jirl $r0,$r21,0
pcaddi $r21, 0x4003
pcaddi $r21, 0x1003
ld.d $t2,$r21, (FixupPrecodeData__MethodDesc - 4*3 -4*3)
ld.d $r21,$r21, (FixupPrecodeData__PrecodeFixupThunk - 4*3 - 4*3)
jirl $r0,$r21,0
Expand All @@ -26,7 +26,7 @@ LEAF_END_MARKED FixupPrecodeCode
// NOTE: For LoongArch64 `CallCountingStubData__RemainingCallCountCell` must be zero !!!
// Because the stub-identifying token is $t1 within the `OnCallCountThresholdReachedStub`.
LEAF_ENTRY CallCountingStubCode
pcaddi $t2, 0x4000
pcaddi $t2, 0x1000
ld.d $t1, $t2, CallCountingStubData__RemainingCallCountCell
ld.h $r21, $t1, 0
addi.w $r21, $r21, -1
Expand Down