Support vm syscalls with up to 15 args using 64 bit compiled vm (like interprated vms).

This commit is contained in:
Zack Middleton 2011-09-09 21:54:14 +00:00
parent b7fa3e7073
commit f7a20068ee
2 changed files with 4 additions and 4 deletions

View file

@ -442,7 +442,7 @@ static void DoSyscall(void)
int *data;
#if idx64
int index;
intptr_t args[11];
intptr_t args[16];
#endif
data = (int *) (savedVM->dataBase + programStack + 4);

View file

@ -86,8 +86,8 @@ static intptr_t CROSSCALL callAsmCall(intptr_t callProgramStack, int64_t callSys
{
vm_t *savedVM;
intptr_t ret = 0x77;
intptr_t args[11];
// int iargs[11];
intptr_t args[16];
// int iargs[16];
int i;
// Dfprintf(stderr, "callAsmCall(%ld, %ld)\n", callProgramStack, callSyscallNum);
@ -100,7 +100,7 @@ static intptr_t CROSSCALL callAsmCall(intptr_t callProgramStack, int64_t callSys
args[0] = callSyscallNum;
// iargs[0] = callSyscallNum;
for(i = 0; i < 10; ++i)
for(i = 0; i < ARRAY_LEN(args)-1; ++i)
{
// iargs[i+1] = *(int *)((byte *)currentVM->dataBase + callProgramStack + 8 + 4*i);
args[i+1] = *(int *)((byte *)currentVM->dataBase + callProgramStack + 8 + 4*i);