Changes:
- $Id: patcher.c 3108 2005-07-24 23:04:48Z twisti $
+ $Id: patcher.c 3119 2005-07-27 22:19:05Z twisti $
*/
*((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;
*((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;
*((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;
*((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;
*((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 - SIZEOF_VOID_P))) =
(ptrint) BUILTIN_arraycheckcast;
- /* synchronize instruction cache */
-
- asm_sync_instruction_cache();
-
PATCHER_MARK_PATCHED_MONITOREXIT;
return true;
*((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;
*((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;
*((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;
*((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;
*((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;