mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 05:31:29 +00:00
Allow recursive VM entry for VM operations as well
This commit is contained in:
parent
d57ba6a57b
commit
19f54e5400
1 changed files with 7 additions and 7 deletions
|
@ -432,6 +432,11 @@ static void DoSyscall(void)
|
|||
);
|
||||
#endif
|
||||
|
||||
// save currentVM so as to allow for recursive VM entry
|
||||
savedVM = currentVM;
|
||||
// modify VM stack pointer for recursive VM entry
|
||||
currentVM->programStack = programStack - 4;
|
||||
|
||||
if(syscallNum < 0)
|
||||
{
|
||||
int *data;
|
||||
|
@ -440,13 +445,8 @@ static void DoSyscall(void)
|
|||
intptr_t args[11];
|
||||
#endif
|
||||
|
||||
// save currentVM so as to allow for recursive VM entry
|
||||
savedVM = currentVM;
|
||||
data = (int *) (savedVM->dataBase + programStack + 4);
|
||||
|
||||
// modify VM stack pointer for recursive VM entry
|
||||
savedVM->programStack = programStack - 4;
|
||||
|
||||
#if idx64
|
||||
args[0] = ~syscallNum;
|
||||
for(index = 1; index < ARRAY_LEN(args); index++)
|
||||
|
@ -457,8 +457,6 @@ static void DoSyscall(void)
|
|||
data[0] = ~syscallNum;
|
||||
opStackBase[opStackOfs + 1] = savedVM->systemCall(data);
|
||||
#endif
|
||||
|
||||
currentVM = savedVM;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -478,6 +476,8 @@ static void DoSyscall(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
currentVM = savedVM;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue