summaryrefslogtreecommitdiff
path: root/src/qcommon/vm_ppc_new.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-01-15 22:32:38 +0000
committerTim Angus <tim@ngus.net>2006-01-15 22:32:38 +0000
commit149d72d3e18d379b7640e0cc4e7e81377622a232 (patch)
treeefd1f51fa6d78f375900dc0dbdddac67f32d3fa1 /src/qcommon/vm_ppc_new.c
parentaf64f1b52b1a28adbf771ef644c76454d148d5ec (diff)
* Merged ioq3-r492
Diffstat (limited to 'src/qcommon/vm_ppc_new.c')
-rw-r--r--src/qcommon/vm_ppc_new.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/qcommon/vm_ppc_new.c b/src/qcommon/vm_ppc_new.c
index 6d71d2c4..42a03a50 100644
--- a/src/qcommon/vm_ppc_new.c
+++ b/src/qcommon/vm_ppc_new.c
@@ -25,6 +25,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "vm_local.h"
+#ifdef MACOS_X
+#include <CoreServices/CoreServices.h>
+#endif
+
#define DEBUG_VM 0
#if DEBUG_VM
@@ -1715,7 +1719,14 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) {
// 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)
{