r118 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Sep 26 18:23:46 EDT 2005


Author: ludwig
Date: 2005-09-26 18:23:46 -0400 (Mon, 26 Sep 2005)
New Revision: 118

Modified:
   trunk/code/qcommon/vm.c
   trunk/code/qcommon/vm_interpreted.c
   trunk/code/qcommon/vm_local.h
   trunk/code/qcommon/vm_none.c
   trunk/code/qcommon/vm_ppc.c
   trunk/code/qcommon/vm_x86.c
Log:
revert int->long change as it breaks on 64bit. Actually only
VM_CallInterpreted hurts as VM_CallCompiled is only used on 32bit. Use
same arg types for consistency nevertheless.


Modified: trunk/code/qcommon/vm.c
===================================================================
--- trunk/code/qcommon/vm.c	2005-09-26 20:39:57 UTC (rev 117)
+++ trunk/code/qcommon/vm.c	2005-09-26 22:23:46 UTC (rev 118)
@@ -718,11 +718,12 @@
                             args[12], args[13], args[14], args[15]);
 #if defined(HAVE_VM_COMPILED)
 	} else if ( vm->compiled ) {
-		r = VM_CallCompiled( vm, &callnum );
+		// only used on 32bit machines so this cast is fine
+		r = VM_CallCompiled( vm, (int*)&callnum );
 #endif
 	} else {
 		struct {
-			long callnum;
+			int callnum;
 			int args[16];
 		} a;
 		va_list ap;
@@ -852,7 +853,7 @@
 		f = fopen("syscalls.log", "w" );
 	}
 	callnum++;
-	fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, (long)( args - (int *)currentVM->dataBase ),
+	fprintf(f, "%i: %li (%i) = %i %i %i %i\n", callnum, (long)(args - (int *)currentVM->dataBase),
 		args[0], args[1], args[2], args[3], args[4] );
 }
 

Modified: trunk/code/qcommon/vm_interpreted.c
===================================================================
--- trunk/code/qcommon/vm_interpreted.c	2005-09-26 20:39:57 UTC (rev 117)
+++ trunk/code/qcommon/vm_interpreted.c	2005-09-26 22:23:46 UTC (rev 118)
@@ -310,7 +310,7 @@
 
 #define	DEBUGSTR va("%s%i", VM_Indent(vm), opStack-stack )
 
-int	VM_CallInterpreted( vm_t *vm, long *args ) {
+int	VM_CallInterpreted( vm_t *vm, int *args ) {
 	int		stack[MAX_STACK];
 	int		*opStack;
 	int		programCounter;

Modified: trunk/code/qcommon/vm_local.h
===================================================================
--- trunk/code/qcommon/vm_local.h	2005-09-26 20:39:57 UTC (rev 117)
+++ trunk/code/qcommon/vm_local.h	2005-09-26 22:23:46 UTC (rev 118)
@@ -168,10 +168,10 @@
 extern	int		vm_debugLevel;
 
 void VM_Compile( vm_t *vm, vmHeader_t *header );
-int	VM_CallCompiled( vm_t *vm, long *args );
+int	VM_CallCompiled( vm_t *vm, int *args );
 
 void VM_PrepareInterpreter( vm_t *vm, vmHeader_t *header );
-int	VM_CallInterpreted( vm_t *vm, long *args );
+int	VM_CallInterpreted( vm_t *vm, int *args );
 
 vmSymbol_t *VM_ValueToFunctionSymbol( vm_t *vm, int value );
 int VM_SymbolToValue( vm_t *vm, const char *symbol );

Modified: trunk/code/qcommon/vm_none.c
===================================================================
--- trunk/code/qcommon/vm_none.c	2005-09-26 20:39:57 UTC (rev 117)
+++ trunk/code/qcommon/vm_none.c	2005-09-26 22:23:46 UTC (rev 118)
@@ -1,6 +1,6 @@
 #include "vm_local.h"
 
-int VM_CallCompiled( vm_t *vm, long *args ) {
+int VM_CallCompiled( vm_t *vm, int *args ) {
 	exit(99);
 	return 0;
 }

Modified: trunk/code/qcommon/vm_ppc.c
===================================================================
--- trunk/code/qcommon/vm_ppc.c	2005-09-26 20:39:57 UTC (rev 117)
+++ trunk/code/qcommon/vm_ppc.c	2005-09-26 22:23:46 UTC (rev 118)
@@ -1161,7 +1161,7 @@
 This function is called directly by the generated code
 ==============
 */
-int	VM_CallCompiled( vm_t *vm, long *args ) {
+int	VM_CallCompiled( vm_t *vm, int *args ) {
 	int		stack[1024];
 	int		programStack;
 	int		stackOnEntry;

Modified: trunk/code/qcommon/vm_x86.c
===================================================================
--- trunk/code/qcommon/vm_x86.c	2005-09-26 20:39:57 UTC (rev 117)
+++ trunk/code/qcommon/vm_x86.c	2005-09-26 22:23:46 UTC (rev 118)
@@ -1101,7 +1101,7 @@
 ==============
 */
 #ifndef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
-int	VM_CallCompiled( vm_t *vm, long *args ) {
+int	VM_CallCompiled( vm_t *vm, int *args ) {
 	int		stack[1024];
 	int		programCounter;
 	int		programStack;




More information about the quake3-commits mailing list