summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2011-09-09 21:54:14 +0000
committerTim Angus <tim@ngus.net>2013-01-10 23:37:51 +0000
commit7369a652ea5efb00b7a67d3764493a45204de0f8 (patch)
tree14d8b7950c15ea9a564f19b683cadb91bc71bfeb /src
parentb60b043cdbda1bbdf8451f76bc9f1d0d34d14799 (diff)
Support vm syscalls with up to 15 args using 64 bit compiled vm (like interprated vms).
Diffstat (limited to 'src')
-rw-r--r--src/qcommon/vm_x86.c2
-rw-r--r--src/qcommon/vm_x86_64.c6
2 files changed, 4 insertions, 4 deletions
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);