From: twisti Date: Fri, 21 Oct 2005 13:16:52 +0000 (+0000) Subject: * patcher_athrow_areturn: Added. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=69809dee94eb058313cb33490a61b7864512b218;p=cacao.git * patcher_athrow_areturn: Added. --- diff --git a/src/vm/jit/alpha/patcher.c b/src/vm/jit/alpha/patcher.c index 17b1b7663..523007fdf 100644 --- a/src/vm/jit/alpha/patcher.c +++ b/src/vm/jit/alpha/patcher.c @@ -28,7 +28,7 @@ Changes: - $Id: patcher.c 3464 2005-10-20 10:16:29Z edwin $ + $Id: patcher.c 3481 2005-10-21 13:16:52Z twisti $ */ @@ -969,6 +969,58 @@ bool patcher_clinit(u1 *sp) } +/* patcher_athrow_areturn ****************************************************** + + Machine code: + + + +*******************************************************************************/ + +bool patcher_athrow_areturn(u1 *sp) +{ + u1 *ra; + java_objectheader *o; + u4 mcode; + unresolved_class *uc; + classinfo *c; + + /* get stuff from the stack */ + + ra = (u1 *) *((ptrint *) (sp + 5 * 8)); + o = (java_objectheader *) *((ptrint *) (sp + 4 * 8)); + mcode = *((u4 *) (sp + 3 * 8)); + uc = (unresolved_class *) *((ptrint *) (sp + 2 * 8)); + + /* calculate and set the new return address */ + + ra = ra - 1 * 4; + *((ptrint *) (sp + 5 * 8)) = (ptrint) ra; + + PATCHER_MONITORENTER; + + /* resolve the class */ + + if (!resolve_class(uc, resolveEager, false, &c)) { + PATCHER_MONITOREXIT; + + return false; + } + + /* patch back original code */ + + *((u4 *) ra) = mcode; + + /* synchronize instruction cache */ + + asm_sync_instruction_cache(); + + PATCHER_MARK_PATCHED_MONITOREXIT; + + return true; +} + + /* patcher_resolve_native ****************************************************** XXX