diff options
author | Zack Middleton <zturtleman@gmail.com> | 2012-12-15 21:55:07 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-12 21:26:42 +0000 |
commit | 91ae99ca4e1de95b54d9d3756f1c85a0abad4576 (patch) | |
tree | 820e37bf8e5ab37dffb48288aad96c77b11cb90a /src/qcommon/vm_powerpc.c | |
parent | af4982fd82a5de4ae80557460ea7e2f17e7cbda9 (diff) |
Fix passing arg9 (qvm only), arg10, and arg11 to vmMain for native libs and non-i386 compiled or interpated qvms. (Currently they aren't use in vmMain in game, cgame, or ui.) Fix passing args[11] to args[15] from vm to engine on ppc64 and sparc64. Some of the args are used by game bot prediction syscalls. May have been causing bugs. Note: This was fixed for x86_64 in r2163.
Diffstat (limited to 'src/qcommon/vm_powerpc.c')
-rw-r--r-- | src/qcommon/vm_powerpc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qcommon/vm_powerpc.c b/src/qcommon/vm_powerpc.c index 604d844e..4bc3354e 100644 --- a/src/qcommon/vm_powerpc.c +++ b/src/qcommon/vm_powerpc.c @@ -367,13 +367,13 @@ VM_AsmCall( int callSyscallInvNum, int callProgramStack ) ret = currentVM->systemCall( argPosition ); } else { - intptr_t args[11]; + intptr_t args[MAX_VMSYSCALL_ARGS]; // generated code does not invert syscall number args[0] = -1 - callSyscallInvNum; int *argPosition = (int *)((byte *)currentVM->dataBase + callProgramStack + 4); - for( i = 1; i < 11; i++ ) + for( i = 1; i < ARRAY_LEN(args); i++ ) args[ i ] = argPosition[ i ]; ret = currentVM->systemCall( args ); @@ -2105,9 +2105,9 @@ VM_CallCompiled( vm_t *vm, int *args ) vm->currentlyInterpreting = qtrue; - programStack -= 48; + programStack -= ( 8 + 4 * MAX_VMMAIN_ARGS ); argPointer = (int *)&image[ programStack + 8 ]; - memcpy( argPointer, args, 4 * 9 ); + memcpy( argPointer, args, 4 * MAX_VMMAIN_ARGS ); argPointer[ -1 ] = 0; argPointer[ -2 ] = -1; |