Merged r5476 from trunk:
[cacao.git] / src / vm / global.h
index 1d7afb45ce82c6024967670ea428c57bec0515d3..dd52df35d675a6cf9c2627a5f8d0708d3c03419a 100644 (file)
@@ -33,7 +33,7 @@
             Joseph Wenninger
             Christian Thalinger
 
-   $Id: global.h 5171 2006-07-25 13:52:38Z twisti $
+   $Id: global.h 5493 2006-09-14 18:36:20Z edwin $
 
 */
 
@@ -57,6 +57,15 @@ typedef unsigned int bool;              /* boolean data type                  */
 #define false        0
 
 
+#if defined(ENABLE_SSA)
+/* immediate to get an addidional target Local Var Index */
+/* for IINC in Combination with SSA */
+struct imm {
+       s4 i;
+       s4 op1_t;
+};
+#endif
+
 /* immediate data union */
 
 typedef union {
@@ -67,6 +76,9 @@ typedef union {
        void       *a;
        functionptr fp;
        u1          b[8];
+#if defined(ENABLE_SSA)
+       struct imm  _i;
+#endif
 } imm_union;
 
 
@@ -96,6 +108,8 @@ typedef struct java_objectarray java_objectarray;
 #define TYPE_DBL     3
 #define TYPE_ADR     4
 
+#define TYPE_RET     8   /* must not share bits with TYPE_FLT or TYPE_LNG */
+
 #define TYPE_VOID    10
 
 
@@ -105,6 +119,8 @@ typedef struct java_objectarray java_objectarray;
 
 #define IS_INT_TYPE(a)          ((a) == TYPE_INT)
 #define IS_LNG_TYPE(a)          ((a) == TYPE_LNG)
+#define IS_FLT_TYPE(a)          ((a) == TYPE_FLT)
+#define IS_DBL_TYPE(a)          ((a) == TYPE_DBL)
 #define IS_ADR_TYPE(a)          ((a) == TYPE_ADR)
 
 #define IS_VOID_TYPE(a)         ((a) == TYPE_VOID)
@@ -302,6 +318,21 @@ void compiler_lock();
 void compiler_unlock();
 #endif
 
+
+/* global constants related to the verifier ***********************************/
+
+/* The verifier needs additional variables in the variable array. Since these */
+/* must be reserved and set by parse.c and stack.c, we define these numbers   */
+/* here to avoid mysterious hard-coded constants.                             */
+
+#if defined(ENABLE_VERIFIER)
+#    define VERIFIER_EXTRA_LOCALS  1
+#    define VERIFIER_EXTRA_VARS    1
+#else
+#    define VERIFIER_EXTRA_LOCALS  0
+#    define VERIFIER_EXTRA_VARS    0
+#endif
+
 #endif /* _GLOBAL_H */