Skip to content

Commit

Permalink
[VM] Update
Browse files Browse the repository at this point in the history
Updated by review in dotnet#82380
  • Loading branch information
clamp03 committed Mar 8, 2023
1 parent ab2e6cd commit 39b96f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/coreclr/vm/riscv64/asmhelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ LOCAL_LABEL(NoRestore_\reg):

NESTED_ENTRY ThePreStub, _TEXT, NoHandler
PROLOG_WITH_TRANSITION_BLOCK
.cfi_adjust_cfa_offset __PWTB_StackAlloc

addi a1, METHODDESC_REGISTER, 0 // pMethodDesc

Expand All @@ -374,6 +375,7 @@ NESTED_ENTRY ThePreStub, _TEXT, NoHandler
addi t4, a0, 0

EPILOG_WITH_TRANSITION_BLOCK_TAILCALL
.cfi_adjust_cfa_offset -__PWTB_StackAlloc
EPILOG_BRANCH_REG t4
NESTED_END ThePreStub, _TEXT

Expand Down Expand Up @@ -608,6 +610,7 @@ NESTED_END ResolveWorkerChainLookupAsmStub, _TEXT
// The stub dispatch thunk which transfers control to VSD_ResolveWorker.
NESTED_ENTRY ResolveWorkerAsmStub, _TEXT, NoHandler
PROLOG_WITH_TRANSITION_BLOCK
.cfi_adjust_cfa_offset __PWTB_StackAlloc

addi a2, t2, 0 // DispatchToken
addi a0, sp, __PWTB_TransitionBlock // pTransitionBlock
Expand All @@ -618,6 +621,7 @@ NESTED_ENTRY ResolveWorkerAsmStub, _TEXT, NoHandler
addi t4, a0, 0

EPILOG_WITH_TRANSITION_BLOCK_TAILCALL
.cfi_adjust_cfa_offset -__PWTB_StackAlloc

EPILOG_BRANCH_REG t4
NESTED_END ResolveWorkerAsmStub, _TEXT
Expand Down Expand Up @@ -831,6 +835,7 @@ NESTED_ENTRY DelayLoad_MethodCall_FakeProlog, _TEXT, NoHandler
C_FUNC(DelayLoad_MethodCall):
.global C_FUNC(DelayLoad_MethodCall)
PROLOG_WITH_TRANSITION_BLOCK
.cfi_adjust_cfa_offset __PWTB_StackAlloc

addi a1, t5, 0 // Indirection cell
addi a2, t0, 0 // sectionIndex
Expand All @@ -841,6 +846,7 @@ C_FUNC(DelayLoad_MethodCall):
addi t4, a0, 0

EPILOG_WITH_TRANSITION_BLOCK_TAILCALL
.cfi_adjust_cfa_offset -__PWTB_StackAlloc
PATCH_LABEL ExternalMethodFixupPatchLabel
EPILOG_BRANCH_REG t4
NESTED_END DelayLoad_MethodCall_FakeProlog, _TEXT
Expand All @@ -852,6 +858,7 @@ DelayLoad_Helper\suffix:
.global DelayLoad_Helper\suffix

PROLOG_WITH_TRANSITION_BLOCK
.cfi_adjust_cfa_offset __PWTB_StackAlloc

//DynamicHelperWorker(TransitionBlock * pTransitionBlock, TADDR * pCell,
// DWORD sectionIndex, Module * pModule, INT frameFlags)
Expand All @@ -867,9 +874,12 @@ DelayLoad_Helper\suffix:

ld a0, __PWTB_ArgumentRegisters(sp)
EPILOG_WITH_TRANSITION_BLOCK_RETURN
.cfi_adjust_cfa_offset -__PWTB_StackAlloc

LOCAL_LABEL(FakeProlog\suffix\()_0):
addi t4, a0, 0
EPILOG_WITH_TRANSITION_BLOCK_TAILCALL
.cfi_adjust_cfa_offset -__PWTB_StackAlloc
EPILOG_BRANCH_REG t4

NESTED_END DelayLoad_Helper\suffix\()_FakeProlog, _TEXT
Expand Down Expand Up @@ -942,13 +952,15 @@ GenerateProfileHelper ProfileTailcall, PROFILE_TAILCALL

NESTED_ENTRY OnCallCountThresholdReachedStub, _TEXT, NoHandler
PROLOG_WITH_TRANSITION_BLOCK
.cfi_adjust_cfa_offset __PWTB_StackAlloc

addi a0, sp, __PWTB_TransitionBlock // TransitionBlock *
addi a1, t3, 0 // stub-identifying token
call C_FUNC(OnCallCountThresholdReached)
addi t4, a0, 0

EPILOG_WITH_TRANSITION_BLOCK_TAILCALL
.cfi_adjust_cfa_offset -__PWTB_StackAlloc
EPILOG_BRANCH_REG t4
NESTED_END OnCallCountThresholdReachedStub, _TEXT

Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/vm/riscv64/pinvokestubs.S
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
NESTED_ENTRY \__PInvokeGenStubFuncName, _TEXT, NoHandler

PROLOG_WITH_TRANSITION_BLOCK 0, 0, \SaveFPArgs
.cfi_adjust_cfa_offset __PWTB_StackAlloc

// a2 = Umanaged Target\MethodDesc
addi a2, \HiddenArg, 0
Expand All @@ -67,6 +68,7 @@
addi \HiddenArg, s1, 0

EPILOG_WITH_TRANSITION_BLOCK_TAILCALL
.cfi_adjust_cfa_offset -__PWTB_StackAlloc

EPILOG_BRANCH C_FUNC(\__PInvokeStubFuncName)
NESTED_END \__PInvokeGenStubFuncName, _TEXT
Expand Down

0 comments on commit 39b96f8

Please sign in to comment.