Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
[x86/Linux] Port ResolveWorkerAsmStub (#8557)
Browse files Browse the repository at this point in the history
  • Loading branch information
parjong authored and janvorli committed Dec 9, 2016
1 parent 13a829e commit 7d17af2
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
49 changes: 49 additions & 0 deletions src/vm/i386/asmhelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -1066,3 +1066,52 @@ DYNAMICHELPER DynamicHelperFrameFlags_ObjectArg, _Obj
DYNAMICHELPER (DynamicHelperFrameFlags_ObjectArg | DynamicHelperFrameFlags_ObjectArg2), _ObjObj

#endif // FEATURE_READYTORUN

NESTED_ENTRY ResolveWorkerAsmStub, _TEXT, NoHandler
//
// The stub arguments are where we want to setup the TransitionBlock. We will
// setup the TransitionBlock later once we can trash them
//
// push ebp-frame
// push ebp
// mov ebp,esp

// save CalleeSavedRegisters
// push ebx

push esi
push edi

// push ArgumentRegisters
push ecx
push edx

mov esi, esp

push [esi + 4*4] // dispatch token
push [esi + 5*4] // siteAddrForRegisterIndirect
push esi // pTransitionBlock

// Setup up proper EBP frame now that the stub arguments can be trashed
mov [esi + 4*4],ebx
mov [esi + 5*4],ebp
lea ebp, [esi + 5*4]

// Make the call
call C_FUNC(VSD_ResolveWorker)

// From here on, mustn't trash eax

// pop ArgumentRegisters
pop edx
pop ecx

// pop CalleeSavedRegisters
pop edi
pop esi
pop ebx
pop ebp

// Now jump to the target
jmp eax // continue on into the method
NESTED_END ResolveWorkerAsmStub, _TEXT
5 changes: 0 additions & 5 deletions src/vm/i386/unixstubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ EXTERN_C VOID ResolveWorkerChainLookupAsmStub()
PORTABILITY_ASSERT("ResolveWorkerChainLookupAsmStub");
}

EXTERN_C VOID ResolveWorkerAsmStub()
{
PORTABILITY_ASSERT("ResolveWorkerAsmStub");
}

EXTERN_C VOID BackPatchWorkerAsmStub()
{
PORTABILITY_ASSERT("BackPatchWorkerAsmStub");
Expand Down

0 comments on commit 7d17af2

Please sign in to comment.