Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions src/coreclr/vm/callstubgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ void CallStubGenerator::ComputeCallStub(MetaSig &sig, PCODE *pRoutines)
m_s1 = NoRange; // indicates that there is no active range of stack arguments
m_s2 = 0;
m_routineIndex = 0;
m_totalStackSize = 0;
m_totalStackSize = argIt.SizeOfArgStack();
#if LOG_COMPUTE_CALL_STUB
printf("ComputeCallStub\n");
#endif
Expand Down Expand Up @@ -1527,7 +1527,6 @@ void CallStubGenerator::ComputeCallStub(MetaSig &sig, PCODE *pRoutines)
}
else if (m_s1 != NoRange)
{
m_totalStackSize += m_s2 - m_s1 + 1;
pRoutines[m_routineIndex++] = GetStackRoutine();
pRoutines[m_routineIndex++] = ((int64_t)(m_s2 - m_s1 + 1) << 32) | m_s1;
}
Expand Down Expand Up @@ -1571,7 +1570,6 @@ void CallStubGenerator::ProcessArgument(ArgIterator *pArgIt, ArgLocDesc& argLocD
{
// No stack argument is used to pass the current argument, but we already have a range of stack arguments,
// store the routine for the range
m_totalStackSize += m_s2 - m_s1 + 1;
pRoutines[m_routineIndex++] = GetStackRoutine();
pRoutines[m_routineIndex++] = ((int64_t)(m_s2 - m_s1 + 1) << 32) | m_s1;
m_s1 = NoRange;
Expand Down Expand Up @@ -1650,7 +1648,6 @@ void CallStubGenerator::ProcessArgument(ArgIterator *pArgIt, ArgLocDesc& argLocD
else
{
// Discontinuous range - store a routine for the current and start a new one
m_totalStackSize += m_s2 - m_s1 + 1;
pRoutines[m_routineIndex++] = GetStackRoutine();
pRoutines[m_routineIndex++] = ((int64_t)(m_s2 - m_s1 + 1) << 32) | m_s1;
m_s1 = argLocDesc.m_byteStackIndex;
Expand Down Expand Up @@ -1699,7 +1696,6 @@ void CallStubGenerator::ProcessArgument(ArgIterator *pArgIt, ArgLocDesc& argLocD
_ASSERTE(argLocDesc.m_byteStackIndex != -1);
pRoutines[m_routineIndex++] = GetStackRefRoutine();
pRoutines[m_routineIndex++] = ((int64_t)pArgIt->GetArgSize() << 32) | argLocDesc.m_byteStackIndex;
m_totalStackSize += argLocDesc.m_byteStackSize;
m_s1 = NoRange;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/interpexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1721,8 +1721,8 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr

case INTOP_CALL_HELPER_P_S:
{
HELPER_FTN_P_P helperFtn = GetPossiblyIndirectHelper<HELPER_FTN_P_P>(pMethod, ip[2]);
void* helperArg = LOCAL_VAR(ip[3], void*);
HELPER_FTN_P_P helperFtn = GetPossiblyIndirectHelper<HELPER_FTN_P_P>(pMethod, ip[3]);
void* helperArg = LOCAL_VAR(ip[2], void*);

LOCAL_VAR(ip[1], void*) = helperFtn(helperArg);
ip += 4;
Expand Down