* src/vm/jit/x86_64/codegen.c (codegen_emit PUTFIELDCONST, PUTSTATICCONST):
[cacao.git] / src / vm / jit / alpha / patcher.c
index e55761bc5caa1ca8ed0465287a6f30c09e6ab8b6..f990bbe99fdcac16251520844b4b0d69f25646fd 100644 (file)
@@ -1,9 +1,7 @@
 /* src/vm/jit/alpha/patcher.c - Alpha code patching functions
 
-   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
@@ -31,6 +29,8 @@
 
 #include "vm/types.h"
 
+#include "vm/jit/alpha/md.h"
+
 #include "mm/memory.h"
 
 #include "native/native.h"
@@ -41,7 +41,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"
 
@@ -190,38 +189,6 @@ bool patcher_resolve_classref_to_flags(patchref_t *pr)
 }
 
 
-/* patcher_resolve_native_function *********************************************
-
-   XXX
-
-*******************************************************************************/
-
-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;
-}
-
-
 /* patcher_get_putstatic *******************************************************
 
    Machine code:
@@ -250,8 +217,8 @@ bool patcher_get_putstatic(patchref_t *pr)
 
        /* check if the field's class is initialized */
 
-       if (!(fi->class->state & CLASS_INITIALIZED))
-               if (!initialize_class(fi->class))
+       if (!(fi->clazz->state & CLASS_INITIALIZED))
+               if (!initialize_class(fi->clazz))
                        return false;
 
        PATCH_BACK_ORIGINAL_MCODE;
@@ -423,12 +390,12 @@ bool patcher_invokeinterface(patchref_t *pr)
        /* patch interfacetable index */
 
        *((s4 *) (ra + 4)) |= (s4) ((OFFSET(vftbl_t, interfacetable[0]) -
-                                                                sizeof(methodptr*) * m->class->index) & 0x0000ffff);
+                                                                sizeof(methodptr*) * m->clazz->index) & 0x0000ffff);
 
        /* patch method offset */
 
        *((s4 *) (ra + 4 + 4)) |=
-               (s4) ((sizeof(methodptr) * (m - m->class->methods)) & 0x0000ffff);
+               (s4) ((sizeof(methodptr) * (m - m->clazz->methods)) & 0x0000ffff);
 
        md_icacheflush(NULL, 0);