diff options
author | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-30 21:25:54 +0000 |
---|---|---|
committer | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-30 21:25:54 +0000 |
commit | 9703e96acb91d3ca178d3591ef67f1546a8f19c0 (patch) | |
tree | 24b2c7e288ffb86912c0332411e76832c81370aa /code/qcommon/vm_interpreted.c | |
parent | 10c7f18162fafd3833221fbe5a139126d07034ca (diff) | |
download | ioquake3-aero-9703e96acb91d3ca178d3591ef67f1546a8f19c0.tar.gz ioquake3-aero-9703e96acb91d3ca178d3591ef67f1546a8f19c0.zip |
- load qvm file by default again to avoid 'unpure' error
- fix loading qvms in 64bit q3
git-svn-id: svn://svn.icculus.org/quake3/trunk@36 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/vm_interpreted.c')
-rw-r--r-- | code/qcommon/vm_interpreted.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/code/qcommon/vm_interpreted.c b/code/qcommon/vm_interpreted.c index e2d69a7..1989a5d 100644 --- a/code/qcommon/vm_interpreted.c +++ b/code/qcommon/vm_interpreted.c @@ -518,7 +518,20 @@ nextInstruction2: *(int *)&image[ programStack + 4 ] = -1 - programCounter; //VM_LogSyscalls( (int *)&image[ programStack + 4 ] ); - r = vm->systemCall( (int *)&image[ programStack + 4 ] ); + { + long* argptr = (long *)&image[ programStack + 4 ]; + #if __WORDSIZE == 64 + // the vm has ints on the stack, we expect + // longs so we have to convert it + long argarr[16]; + int i; + for (i = 0; i < 16; ++i) { + argarr[i] = *(int*)&image[ programStack + 4 + 4*i ]; + argptr = argarr; + } + #endif + r = vm->systemCall( argptr ); + } #ifdef DEBUG_VM // this is just our stack frame pointer, only needed |