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
|
@ -338,7 +338,7 @@ Dlls will call this directly
|
|||
intptr_t QDECL VM_DllSyscall( intptr_t arg, ... ) {
|
||||
#if !id386 || defined __clang__
|
||||
// rcg010206 - see commentary above
|
||||
intptr_t args[16];
|
||||
intptr_t args[MAX_VMSYSCALL_ARGS];
|
||||
int i;
|
||||
va_list ap;
|
||||
|
||||
|
@ -823,7 +823,7 @@ intptr_t QDECL VM_Call( vm_t *vm, int callnum, ... )
|
|||
// if we have a dll loaded, call it directly
|
||||
if ( vm->entryPoint ) {
|
||||
//rcg010207 - see dissertation at top of VM_DllSyscall() in this file.
|
||||
int args[10];
|
||||
int args[MAX_VMMAIN_ARGS-1];
|
||||
va_list ap;
|
||||
va_start(ap, callnum);
|
||||
for (i = 0; i < ARRAY_LEN(args); i++) {
|
||||
|
@ -833,7 +833,7 @@ intptr_t QDECL VM_Call( vm_t *vm, int callnum, ... )
|
|||
|
||||
r = vm->entryPoint( callnum, args[0], args[1], args[2], args[3],
|
||||
args[4], args[5], args[6], args[7],
|
||||
args[8], args[9]);
|
||||
args[8], args[9], args[10], args[11]);
|
||||
} else {
|
||||
#if ( id386 || idsparc ) && !defined __clang__ // calling convention doesn't need conversion in some cases
|
||||
#ifndef NO_VM_COMPILED
|
||||
|
@ -845,7 +845,7 @@ intptr_t QDECL VM_Call( vm_t *vm, int callnum, ... )
|
|||
#else
|
||||
struct {
|
||||
int callnum;
|
||||
int args[10];
|
||||
int args[MAX_VMMAIN_ARGS-1];
|
||||
} a;
|
||||
va_list ap;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue