aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/vm.c
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-10-27 21:13:47 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-10-27 21:13:47 +0000
commit163e8dc4db61a3daf608edf693849f99e8f2f7ba (patch)
tree59470e599d87ae1b3e2e02ee1c7b01a4f4dfbc39 /code/qcommon/vm.c
parent712aeab5985ae52245a1b749dfc5f69899ddcd0b (diff)
downloadioquake3-aero-163e8dc4db61a3daf608edf693849f99e8f2f7ba.tar.gz
ioquake3-aero-163e8dc4db61a3daf608edf693849f99e8f2f7ba.zip
add x86_64 vm. experimental, not enabled by default. you need as for it
to work. git-svn-id: svn://svn.icculus.org/quake3/trunk@188 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/vm.c')
-rw-r--r--code/qcommon/vm.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c
index 8ebe73d..a20e69f 100644
--- a/code/qcommon/vm.c
+++ b/code/qcommon/vm.c
@@ -745,12 +745,15 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) {
args[4], args[5], args[6], args[7],
args[8], args[9], args[10], args[11],
args[12], args[13], args[14], args[15]);
+ } else {
+#ifdef __i386__ // i386 calling convention doesn't need conversion
#if defined(HAVE_VM_COMPILED)
- } else if ( vm->compiled ) {
- // only used on 32bit machines so this cast is fine
- r = VM_CallCompiled( vm, (int*)&callnum );
+ if ( vm->compiled )
+ r = VM_CallCompiled( vm, (int*)callnum );
+ else
#endif
- } else {
+ r = VM_CallInterpreted( vm, (int*)callnum );
+#else
struct {
int callnum;
int args[16];
@@ -763,7 +766,13 @@ long QDECL VM_Call( vm_t *vm, long callnum, ... ) {
a.args[i] = va_arg(ap, long);
}
va_end(ap);
- r = VM_CallInterpreted( vm, &a.callnum );
+#if defined(HAVE_VM_COMPILED)
+ if ( vm->compiled )
+ r = VM_CallCompiled( vm, &a.callnum );
+ else
+#endif
+ r = VM_CallInterpreted( vm, &a.callnum );
+#endif
}
if ( oldVM != NULL ) // bk001220 - assert(currentVM!=NULL) for oldVM==NULL