[quake3-commits] r1970 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue May 10 06:07:34 EDT 2011


Author: thilo
Date: 2011-05-10 06:07:34 -0400 (Tue, 10 May 2011)
New Revision: 1970

Modified:
   trunk/code/qcommon/vm_x86_64.c
Log:
- Remove newlines in Com_Error()
- Update register description


Modified: trunk/code/qcommon/vm_x86_64.c
===================================================================
--- trunk/code/qcommon/vm_x86_64.c	2011-05-10 09:14:49 UTC (rev 1969)
+++ trunk/code/qcommon/vm_x86_64.c	2011-05-10 10:07:34 UTC (rev 1970)
@@ -74,10 +74,10 @@
   ebx	scratch
   ecx	scratch (required for shifts)
   edx	scratch (required for divisions)
-  rsi	stack pointer (opStack)
+  rsi	opStack offset
   rdi	program frame pointer (programStack)
   r8    pointer data (vm->dataBase)
-  r9    opStack data
+  r9    opStack data base (opStack)
   r10   start of generated code
 */
 
@@ -384,10 +384,10 @@
 
 #ifdef DEBUG_VM
 #define NOTIMPL(x) \
-	do { Com_Error(ERR_DROP, "instruction not implemented: %s\n", opnames[x]); } while(0)
+	do { Com_Error(ERR_DROP, "instruction not implemented: %s", opnames[x]); } while(0)
 #else
 #define NOTIMPL(x) \
-	do { Com_Printf(S_COLOR_RED "instruction not implemented: %x\n", x); vm->compiled = qfalse; return; } while(0)
+	do { Com_Printf(S_COLOR_RED "instruction not implemented: %x", x); vm->compiled = qfalse; return; } while(0)
 #endif
 
 static void* getentrypoint(vm_t* vm)
@@ -404,7 +404,7 @@
 	|| ((dest+count) & dataMask) != dest + count
 	|| ((src+count) & dataMask) != src + count)
 	{
-		Com_Error(ERR_DROP, "OP_BLOCK_COPY out of range!\n");
+		Com_Error(ERR_DROP, "OP_BLOCK_COPY out of range!");
 	}
 
 	memcpy(currentVM->dataBase+dest, currentVM->dataBase+src, count);
@@ -412,26 +412,26 @@
 
 static void CROSSCALL eop(void)
 {
-	Com_Error(ERR_DROP, "End of program reached without return!\n");
+	Com_Error(ERR_DROP, "End of program reached without return!");
 	exit(1);
 }
 
 static void CROSSCALL jmpviolation(void)
 {
-	Com_Error(ERR_DROP, "Program tried to execute code outside VM\n");
+	Com_Error(ERR_DROP, "Program tried to execute code outside VM");
 	exit(1);
 }
 
 #ifdef DEBUG_VM
 static void CROSSCALL memviolation(void)
 {
-	Com_Error(ERR_DROP, "Program tried to access memory outside VM, or unaligned memory access\n");
+	Com_Error(ERR_DROP, "Program tried to access memory outside VM, or unaligned memory access");
 	exit(1);
 }
 
 static void CROSSCALL opstackviolation(void)
 {
-	Com_Error(ERR_DROP, "Program corrupted the VM opStack\n");
+	Com_Error(ERR_DROP, "Program corrupted the VM opStack");
 	exit(1);
 }
 #endif
@@ -968,7 +968,7 @@
 	if(got_const)
 	{
 		VM_FREEBUFFERS(vm);
-		Com_Error(ERR_DROP, "leftover const\n");
+		Com_Error(ERR_DROP, "leftover const");
 	}
 
 	emit("movq $%"PRIu64", %%rax", (uint64_t)eop);
@@ -1115,10 +1115,10 @@
 	);
 
 	if(opStackRet != 4)
-		Com_Error(ERR_DROP, "opStack corrupted in compiled code (offset %d)\n", opStackRet);
+		Com_Error(ERR_DROP, "opStack corrupted in compiled code (offset %d)", opStackRet);
 
 	if ( programStack != stackOnEntry - 48 ) {
-		Com_Error( ERR_DROP, "programStack corrupted in compiled code\n" );
+		Com_Error( ERR_DROP, "programStack corrupted in compiled code" );
 	}
 
 //	Com_Printf("exiting %s level %d\n", vm->name, vm->callLevel);



More information about the quake3-commits mailing list