mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-14 00:21:16 +00:00
__WORDSIZE is not available on non-GNU systems (Dominic Fandrey)
This commit is contained in:
parent
9018fedd16
commit
4876413217
1 changed files with 13 additions and 11 deletions
|
@ -516,19 +516,21 @@ nextInstruction2:
|
||||||
|
|
||||||
//VM_LogSyscalls( (int *)&image[ programStack + 4 ] );
|
//VM_LogSyscalls( (int *)&image[ programStack + 4 ] );
|
||||||
{
|
{
|
||||||
intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ];
|
|
||||||
#if __WORDSIZE == 64
|
|
||||||
// the vm has ints on the stack, we expect
|
// the vm has ints on the stack, we expect
|
||||||
// longs so we have to convert it
|
// pointers so we might have to convert it
|
||||||
|
if (sizeof(intptr_t) != sizeof(int)) {
|
||||||
intptr_t argarr[16];
|
intptr_t argarr[16];
|
||||||
|
int *imagePtr = (int *)&image[programStack];
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 16; ++i) {
|
for (i = 0; i < 16; ++i) {
|
||||||
argarr[i] = *(int*)&image[ programStack + 4 + 4*i ];
|
argarr[i] = *(++imagePtr);
|
||||||
}
|
}
|
||||||
argptr = argarr;
|
r = vm->systemCall( argarr );
|
||||||
#endif
|
} else {
|
||||||
|
intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ];
|
||||||
r = vm->systemCall( argptr );
|
r = vm->systemCall( argptr );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_VM
|
#ifdef DEBUG_VM
|
||||||
// this is just our stack frame pointer, only needed
|
// this is just our stack frame pointer, only needed
|
||||||
|
|
Loading…
Reference in a new issue