narray first check in
[cacao.git] / jit / jitdef.h
index 8867aad02ff5673160036bf2239a889776eb5144..5691143c611c7c3a3f56b1991ca7e1ec867c9da8 100644 (file)
@@ -12,7 +12,8 @@
 
 *******************************************************************************/
 
-#include "../sysdep/types.h"
+#ifndef __jitdef__
+#define __jitdef__
 
 /**************************** resolve typedef-cycles **************************/
 
@@ -79,6 +80,10 @@ struct instruction {
                double d;               /* double operand     */
                void *a;                /* address operand    */
                } val;                  /* immediate constant */
+
+       void *target;                           /* used for targets of branches and jumps         */
+                                                               /* and as address for list of targets for         */
+                                                               /* statements                                                             */
        };
 
 
@@ -107,6 +112,14 @@ struct basicblock {
        int          outdepth;      /* stack depth end of basic block             */
        int          pre_count;     /* count of predecessor basic blocks          */
        branchref   *branchrefs;    /* list of branches to be patched             */
+
+       basicblock      *next;                  /* used to build a BB list (instead of array) */
+       int                      lflags;                /* used during loop copying, init with 0          */
+       basicblock      *copied_to;             /* points to the copy of this basic block         */
+                                                               /* when loop nodes are copied                             */
+
+  int debug_nr;
+
        };
 
 
@@ -743,40 +756,8 @@ static int jcommandsize[256] = {
 #define JAVA_BREAKPOINT       202
         1,
 
-#define ICMD_OPT_IALOAD       203
-        1,
-#define ICMD_OPT_LALOAD       204
-        1,
-#define ICMD_OPT_FALOAD       205
-        1,
-#define ICMD_OPT_DALOAD       206
-        1,
-#define ICMD_OPT_AALOAD       207
-        1,
-#define ICMD_OPT_BALOAD       208
-        1,
-#define ICMD_OPT_CALOAD       209
-        1,
-#define ICMD_OPT_SALOAD       210
-        1,
-
-#define ICMD_OPT_IASTORE      211
-        1,
-#define ICMD_OPT_LASTORE      212
-        1,
-#define ICMD_OPT_FASTORE      213
-        1,
-#define ICMD_OPT_DASTORE      214
-        1,
-#define ICMD_OPT_AASTORE      215
-        1,
-#define ICMD_OPT_BASTORE      216
-        1,
-#define ICMD_OPT_CASTORE      217
-        1,
-#define ICMD_OPT_SASTORE      218
-        1,
-                        1,1,            /* unused */
+            1,1,1,1,1,1,1,1,            /* unused */
+        1,1,1,1,1,1,1,1,1,1,
         1,1,1,1,1,1,1,1,1,1,
         1,1,1,1,1,1,1,1,1,1,
         1,1,1,1,1,1,1,1,1,1,
@@ -1106,24 +1087,10 @@ static char *icmd_names[256] = {
        "UNDEF201     ", /* JSR_W       201 */
        "UNDEF202     ", /* BREAKPOINT  202 */
 
-       "OPT_IALOAD   ", /*             203 */
-       "OPT_LALOAD   ", /*             204 */
-       "OPT_FALOAD   ", /*             205 */
-       "OPT_DALOAD   ", /*             206 */
-       "OPT_AALOAD   ", /*             207 */
-       "OPT_BALOAD   ", /*             208 */
-       "OPT_CALOAD   ", /*             209 */
-       "OPT_SALOAD   ", /*             210 */
-       "OPT_IASTORE  ", /*             211 */
-       "OPT_LASTORE  ", /*             212 */
-       "OPT_FASTORE  ", /*             213 */
-       "OPT_DASTORE  ", /*             214 */
-       "OPT_AASTORE  ", /*             215 */
-       "OPT_BASTORE  ", /*             216 */
-       "OPT_CASTORE  ", /*             217 */
-       "OPT_SASTORE  ", /*             218 */
-
-                            "UNDEF219","UNDEF220",
+                             "UNDEF203","UNDEF204","UNDEF205",
+       "UNDEF206","UNDEF207","UNDEF208","UNDEF209","UNDEF210",
+       "UNDEF","UNDEF","UNDEF","UNDEF","UNDEF",
+       "UNDEF216","UNDEF217","UNDEF218","UNDEF219","UNDEF220",
        "UNDEF","UNDEF","UNDEF","UNDEF","UNDEF",
        "UNDEF226","UNDEF227","UNDEF228","UNDEF229","UNDEF230",
        "UNDEF","UNDEF","UNDEF","UNDEF","UNDEF",
@@ -1131,6 +1098,7 @@ static char *icmd_names[256] = {
        "UNDEF","UNDEF","UNDEF","UNDEF","UNDEF",
        "UNDEF246","UNDEF247","UNDEF248","UNDEF249","UNDEF250",
        "UNDEF251","UNDEF252",
+
        "BUILTIN3     ", /*             253 */
        "BUILTIN2     ", /*             254 */
        "BUILTIN1     "  /*             255 */
@@ -1164,3 +1132,5 @@ void asm_handle_nat_exception();
 
 static void disassinstr (int c, int pos);       /* disassemble an instruction */
 static void disassemble (int *code, int len);   /* disassemble a code block   */
+
+#endif