Unified variables changes for common/i386.
[cacao.git] / src / vm / jit / codegen-common.h
index a7a3f21320893c4e03f246d61fce6b58677d0a00..81fb1d4477a3f989ccc36a1db65d0abcf973325d 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Christian Ullrich
             Edwin Steiner
 
-   $Id: codegen-common.h 5038 2006-06-19 22:22:34Z twisti $
+   $Id: codegen-common.h 5404 2006-09-07 13:29:05Z christian $
 
 */
 
@@ -103,8 +103,7 @@ struct codegendata {
        struct superstart *superstarts; /* list of supers without patchers        */
 #endif
 
-       u1             *dsegtop;        /* pointer to top (end) of data area      */
-       s4              dsegsize;       /* complete size of data area (bytes)     */
+       dsegentry      *dseg;           /* chain of data segment entries          */
        s4              dseglen;        /* used size of data area (bytes)         */
                                     /* data area grows from top to bottom     */
 
@@ -134,6 +133,7 @@ struct codegendata {
 
        s4              maxstack;
        s4              maxlocals;
+       s4              stackframesize;    /* stackframe size of this method      */
 };
 
 
@@ -165,7 +165,7 @@ void codegen_addreference(codegendata *cd, basicblock *target);
 void codegen_add_arithmeticexception_ref(codegendata *cd);
 void codegen_add_arrayindexoutofboundsexception_ref(codegendata *cd, s4 reg);
 void codegen_add_arraystoreexception_ref(codegendata *cd);
-void codegen_add_classcastexception_ref(codegendata *cd);
+void codegen_add_classcastexception_ref(codegendata *cd, s4 reg);
 void codegen_add_nullpointerexception_ref(codegendata *cd);
 void codegen_add_fillinstacktrace_ref(codegendata *cd);
 
@@ -174,7 +174,8 @@ void codegen_addpatchref(codegendata *cd, functionptr patcher, voidptr ref,
                                                 s4 disp);
 
 void codegen_insertmethod(u1 *startpc, u1 *endpc);
-u1 *codegen_findmethod(u1 *pc);
+u1 *codegen_get_pv_from_pc(u1 *pc);
+u1 *codegen_get_pv_from_pc_nocheck(u1 *pc);
 
 void codegen_finish(jitdata *jd);
 
@@ -184,7 +185,7 @@ void codegen_disassemble_nativestub(methodinfo *m, u1 *start, u1 *end);
 #endif
 
 void codegen_start_native_call(u1 *datasp, u1 *pv, u1 *sp, u1 *ra);
-void codegen_finish_native_call(u1 *datasp);
+java_objectheader *codegen_finish_native_call(u1 *datasp);
 
 u1 *createcompilerstub(methodinfo *m);
 u1 *createnativestub(functionptr f, jitdata *jd, methoddesc *nmd);
@@ -197,7 +198,12 @@ u1 *intrp_createnativestub(functionptr f, jitdata *jd, methoddesc *md);
 void removecompilerstub(u1 *stub);
 void removenativestub(u1 *stub);
 
+#if defined(NEW_VAR)
+s4 codegen_reg_of_var(u2 opcode, varinfo *v, s4 tempregnum);
+#else
 s4 codegen_reg_of_var(registerdata *rd, u2 opcode, stackptr v, s4 tempregnum);
+#endif
+s4 codegen_reg_of_dst(jitdata *jd, instruction *iptr, s4 tempregnum);
 
 #if defined(ENABLE_THREADS)
 void codegen_threadcritrestart(codegendata *cd, int offset);
@@ -206,7 +212,7 @@ void codegen_threadcritstop(codegendata *cd, int offset);
 #endif
 
 /* machine dependent functions */
-u1 *md_codegen_findmethod(u1 *ra);
+u1 *md_codegen_get_pv_from_pc(u1 *ra);
 
 bool codegen(jitdata *jd);