* Removed unnecessary opt_showdisassemble stuff.
authortwisti <none@none>
Wed, 27 Jul 2005 22:19:05 +0000 (22:19 +0000)
committertwisti <none@none>
Wed, 27 Jul 2005 22:19:05 +0000 (22:19 +0000)
src/vm/jit/alpha/patcher.c

index ce1c4662682f56a3dd6e97a756df4c2b1fa248c1..334fab53e97c3c4a318ac6623804f02bfd1d0695 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: patcher.c 3108 2005-07-24 23:04:48Z twisti $
+   $Id: patcher.c 3119 2005-07-27 22:19:05Z twisti $
 
 */
 
@@ -105,19 +105,14 @@ bool patcher_get_putstatic(u1 *sp)
 
        *((u4 *) ra) = mcode;
 
-       /* if we show disassembly, we have to skip the nop */
+       /* synchronize instruction cache */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       asm_sync_instruction_cache();
 
        /* patch the field value's address */
 
        *((ptrint *) (pv + disp)) = (ptrint) &(fi->value);
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -237,23 +232,18 @@ bool patcher_builtin_new(u1 *sp)
 
        *((u4 *) (ra + 4)) = mcode;
 
-       /* patch the classinfo pointer */
+       /* synchronize instruction cache */
 
-       *((ptrint *) (pv + (disp + SIZEOF_VOID_P))) = (ptrint) c;
+       asm_sync_instruction_cache();
 
-       /* if we show disassembly, we have to skip the nop */
+       /* patch the classinfo pointer */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       *((ptrint *) (pv + (disp + SIZEOF_VOID_P))) = (ptrint) c;
 
        /* patch new function address */
 
        *((ptrint *) (pv + disp)) = (ptrint) BUILTIN_new;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -313,23 +303,18 @@ bool patcher_builtin_newarray(u1 *sp)
 
        *((u4 *) (ra + 4)) = mcode;
 
-       /* patch the class' vftbl pointer */
+       /* synchronize instruction cache */
 
-       *((ptrint *) (pv + (disp + SIZEOF_VOID_P))) = (ptrint) c->vftbl;
+       asm_sync_instruction_cache();
 
-       /* if we show disassembly, we have to skip the nop */
+       /* patch the class' vftbl pointer */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       *((ptrint *) (pv + (disp + SIZEOF_VOID_P))) = (ptrint) c->vftbl;
 
        /* patch new function address */
 
        *((ptrint *) (pv + disp)) = (ptrint) BUILTIN_newarray;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -386,19 +371,14 @@ bool patcher_builtin_multianewarray(u1 *sp)
 
        *((u4 *) ra) = mcode;
 
-       /* if we show disassembly, we have to skip the nop */
+       /* synchronize instruction cache */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       asm_sync_instruction_cache();
 
        /* patch the class' vftbl pointer */
 
        *((ptrint *) (pv + disp)) = (ptrint) c->vftbl;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -458,10 +438,9 @@ bool patcher_builtin_arraycheckcast(u1 *sp)
 
        *((u4 *) ra) = mcode;
 
-       /* if we show disassembly, we have to skip the nop */
+       /* synchronize instruction cache */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       asm_sync_instruction_cache();
 
        /* patch the class' vftbl pointer */
 
@@ -472,10 +451,6 @@ bool patcher_builtin_arraycheckcast(u1 *sp)
        *((ptrint *) (pv + (disp - SIZEOF_VOID_P))) =
                (ptrint) BUILTIN_arraycheckcast;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -535,23 +510,18 @@ bool patcher_builtin_arrayinstanceof(u1 *sp)
 
        *((u4 *) (ra + 4)) = mcode;
 
+       /* synchronize instruction cache */
+
+       asm_sync_instruction_cache();
+
        /* patch the class' vftbl pointer */
        
        *((ptrint *) (pv + (disp + SIZEOF_VOID_P))) = (ptrint) c->vftbl;
 
-       /* if we show disassembly, we have to skip the nop */
-
-       if (opt_showdisassemble)
-               ra = ra + 4;
-
        /* patch new function address */
 
        *((ptrint *) (pv + disp)) = (ptrint) BUILTIN_arrayinstanceof;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -606,19 +576,14 @@ bool patcher_invokestatic_special(u1 *sp)
 
        *((u4 *) ra) = mcode;
 
-       /* if we show disassembly, we have to skip the nop */
+       /* synchronize instruction cache */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       asm_sync_instruction_cache();
 
        /* patch stubroutine */
 
        *((ptrint *) (pv + disp)) = (ptrint) m->stubroutine;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -807,19 +772,14 @@ bool patcher_checkcast_instanceof_flags(u1 *sp)
 
        *((u4 *) ra) = mcode;
 
-       /* if we show disassembly, we have to skip the nop */
+       /* synchronize instruction cache */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       asm_sync_instruction_cache();
 
        /* patch class flags */
 
        *((s4 *) (pv + disp)) = (s4) c->flags;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -943,19 +903,14 @@ bool patcher_checkcast_instanceof_class(u1 *sp)
 
        *((u4 *) ra) = mcode;
 
-       /* if we show disassembly, we have to skip the nop */
+       /* synchronize instruction cache */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       asm_sync_instruction_cache();
 
        /* patch super class' vftbl */
 
        *((ptrint *) (pv + disp)) = (ptrint) c->vftbl;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;
@@ -1058,19 +1013,14 @@ bool patcher_resolve_native(u1 *sp)
 
        *((u4 *) ra) = mcode;
 
-       /* if we show disassembly, we have to skip the nop */
+       /* synchronize instruction cache */
 
-       if (opt_showdisassemble)
-               ra = ra + 4;
+       asm_sync_instruction_cache();
 
        /* patch native function pointer */
 
        *((ptrint *) (pv + disp)) = (ptrint) f;
 
-       /* synchronize instruction cache */
-
-       asm_sync_instruction_cache();
-
        PATCHER_MARK_PATCHED_MONITOREXIT;
 
        return true;