From 7369a652ea5efb00b7a67d3764493a45204de0f8 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 9 Sep 2011 21:54:14 +0000 Subject: Support vm syscalls with up to 15 args using 64 bit compiled vm (like interprated vms). --- src/qcommon/vm_x86.c | 2 +- src/qcommon/vm_x86_64.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/qcommon') diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c index 749115a2..b1b84e40 100644 --- a/src/qcommon/vm_x86.c +++ b/src/qcommon/vm_x86.c @@ -443,7 +443,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); diff --git a/src/qcommon/vm_x86_64.c b/src/qcommon/vm_x86_64.c index 36dd95b5..f2ede423 100644 --- a/src/qcommon/vm_x86_64.c +++ b/src/qcommon/vm_x86_64.c @@ -87,8 +87,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); @@ -101,7 +101,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); -- cgit