Author: rafl
Date: Tue Nov 15 17:52:17 2005
New Revision: 10009

Modified:
   trunk/jit/hppa/jit_emit.h
Log:
* Fixed jit_emit.h on hppa. The hppa port works again now, yay!


Modified: trunk/jit/hppa/jit_emit.h
==============================================================================
--- trunk/jit/hppa/jit_emit.h   (original)
+++ trunk/jit/hppa/jit_emit.h   Tue Nov 15 17:52:17 2005
@@ -686,6 +686,7 @@ Parrot_jit_emit_mov_rm_n(Interp * interp
 
 #  define REQUIRES_CONSTANT_POOL 0
 #  define INT_REGISTERS_TO_MAP 14
+#  define CACHELINESIZE 32
 
 #  ifndef JIT_IMCC
 
@@ -695,9 +696,14 @@ char intval_map[INT_REGISTERS_TO_MAP] =
 static void
 hppa_sync_cache (void *_start, void *_end)
 {
-    long size = (((long)_end) - ((long)_start));
-    __asm__ __volatile__ ("fdc %0, %1":: "r" ((long)_start),
-        "r" (size));
+    char *start = (char*)(((int)_start) &~(CACHELINESIZE));
+    char *end = (char *)((((int)_end)+CACHELINESIZE) &~(CACHELINESIZE));
+    char *_sync;
+
+    for (_sync = start; _sync < end; _sync += CACHELINESIZE) {
+        __asm__ __volatile__ ("fdc %r0(%0)":: "r" ((long)_sync));
+    }
+
     __asm__ __volatile__ ("sync");
 }
 

Reply via email to