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.
This commit is contained in:
parent
b943d506bf
commit
c5af65fe5f
7 changed files with 43 additions and 53 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue