X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Falpha%2Fpatcher.c;h=253465b71d9e6d22f99f17f97de0b75cde0d2e80;hb=323ce1100da6d6e62cf9bc74a1efa5da401e03ed;hp=e9280929ec11c4bcd4dafd9a98fa628ea08514fa;hpb=58bac0a56dab7d6983a3cfbee7a9b7ffec5a4284;p=cacao.git diff --git a/src/vm/jit/alpha/patcher.c b/src/vm/jit/alpha/patcher.c index e9280929e..253465b71 100644 --- a/src/vm/jit/alpha/patcher.c +++ b/src/vm/jit/alpha/patcher.c @@ -22,8 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $ - */ @@ -33,6 +31,8 @@ #include "vm/types.h" +#include "vm/jit/alpha/md.h" + #include "mm/memory.h" #include "native/native.h" @@ -43,7 +43,6 @@ #include "vm/jit/asmpart.h" #include "vm/jit/patcher-common.h" -#include "vm/jit/md.h" #include "vm/jit/methodheader.h" #include "vm/jit/stacktrace.h" @@ -59,58 +58,16 @@ md_icacheflush(NULL, 0); -/* patcher_initialize_class **************************************************** - - Initalizes a given classinfo pointer. This function does not patch - any data. - -*******************************************************************************/ - -bool patcher_initialize_class(patchref_t *pr) -{ - classinfo *c; - - /* get stuff from the stack */ - - c = (classinfo *) pr->ref; - - /* check if the class is initialized */ - - if (!(c->state & CLASS_INITIALIZED)) - if (!initialize_class(c)) - return false; - - PATCH_BACK_ORIGINAL_MCODE; - - return true; -} +/* patcher_patch_code ********************************************************** -/* patcher_resolve_class ***************************************************** - - Initalizes a given classinfo pointer. This function does not patch - any data. + Just patches back the original machine code. *******************************************************************************/ -#ifdef ENABLE_VERIFIER -bool patcher_resolve_class(patchref_t *pr) +void patcher_patch_code(patchref_t *pr) { - unresolved_class *uc; - - /* get stuff from the stack */ - - uc = (unresolved_class *) pr->ref; - - /* resolve the class and check subtype constraints */ - - if (!resolve_class_eager_no_access_check(uc)) - return false; - PATCH_BACK_ORIGINAL_MCODE; - - return true; } -#endif /* ENABLE_VERIFIER */ /* patcher_resolve_classref_to_classinfo *************************************** @@ -234,40 +191,6 @@ bool patcher_resolve_classref_to_flags(patchref_t *pr) } -/* patcher_resolve_native_function ********************************************* - - XXX - -*******************************************************************************/ - -#if !defined(WITH_STATIC_CLASSPATH) -bool patcher_resolve_native_function(patchref_t *pr) -{ - methodinfo *m; - u1 *datap; - functionptr f; - - /* get stuff from the stack */ - - m = (methodinfo *) pr->ref; - datap = (u1 *) pr->datap; - - /* resolve native function */ - - if (!(f = native_resolve_function(m))) - return false; - - PATCH_BACK_ORIGINAL_MCODE; - - /* patch native function pointer */ - - *((ptrint *) datap) = (ptrint) f; - - return true; -} -#endif /* !defined(WITH_STATIC_CLASSPATH) */ - - /* patcher_get_putstatic ******************************************************* Machine code: