r471 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jan 13 15:54:08 EST 2006


Author: tma
Date: 2006-01-13 15:54:07 -0500 (Fri, 13 Jan 2006)
New Revision: 471

Modified:
   trunk/code/qcommon/vm_ppc_new.c
Log:
* Patch from https://bugzilla.icculus.org/show_bug.cgi?id=2540


Modified: trunk/code/qcommon/vm_ppc_new.c
===================================================================
--- trunk/code/qcommon/vm_ppc_new.c	2006-01-11 08:06:30 UTC (rev 470)
+++ trunk/code/qcommon/vm_ppc_new.c	2006-01-13 20:54:07 UTC (rev 471)
@@ -24,6 +24,10 @@
 
 #include "vm_local.h"
 
+#ifdef MACOS_X
+#include <CoreServices/CoreServices.h>
+#endif
+
 #define DEBUG_VM 0
 
 #if DEBUG_VM
@@ -1714,7 +1718,14 @@
 
 	    // go back over it in place now to fixup reletive jump targets
 	    buf = (unsigned *)vm->codeBase;
-	}
+	} else if ( pass == 1 ) {
+           #ifdef MACOS_X
+           // On Mac OS X, the following library routine clears the instruction cache for generated code
+           MakeDataExecutable(vm->codeBase, vm->codeLength);
+           #else
+           #warning Need to clear the instruction cache for generated code
+           #endif
+       }
     }
     if(0)
     {




More information about the quake3-commits mailing list