Merged revisions 7616-7627 via svnmerge from
[cacao.git] / src / vm / jit / jit.h
index fe5d3949c51a2d7922bc564c37f6e5bb57b3cb25..98d823bbd53371d0d403160a9ab292d6b58ba69a 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jit.h 7596 2007-03-28 21:05:53Z twisti $
+   $Id: jit.h 7627 2007-04-02 18:56:59Z twisti $
 
 */
 
@@ -333,16 +333,17 @@ typedef union {
 
 /*** flags (32 bits) ***/
 
-#define INS_FLAG_UNRESOLVED    0x01    /* contains unresolved field/meth/class*/
-#define INS_FLAG_CLASS         0x02    /* for ACONST, PUT*CONST with class    */
-#define INS_FLAG_ARRAY         0x04    /* for CHECKCAST/INSTANCEOF with array */
-#define INS_FLAG_CHECK         0x08    /* for *ALOAD|*ASTORE: check index     */
+#define INS_FLAG_BASICBLOCK    0x01    /* marks a basic block start           */
+#define INS_FLAG_UNRESOLVED    0x02    /* contains unresolved field/meth/class*/
+#define INS_FLAG_CLASS         0x04    /* for ACONST, PUT*CONST with class    */
+#define INS_FLAG_ARRAY         0x08    /* for CHECKCAST/INSTANCEOF with array */
+#define INS_FLAG_CHECK         0x10    /* for *ALOAD|*ASTORE: check index     */
                                        /* for BUILTIN: check exception        */
-#define INS_FLAG_KILL_PREV     0x02    /* for *STORE, invalidate prev local   */
-#define INS_FLAG_KILL_NEXT     0x04    /* for *STORE, invalidate next local   */
-#define INS_FLAG_RETADDR       0x08    /* for ASTORE: op is a returnAddress   */
+#define INS_FLAG_KILL_PREV     0x04    /* for *STORE, invalidate prev local   */
+#define INS_FLAG_KILL_NEXT     0x08    /* for *STORE, invalidate next local   */
+#define INS_FLAG_RETADDR       0x10    /* for ASTORE: op is a returnAddress   */
 
-#define INS_FLAG_ID_SHIFT      4
+#define INS_FLAG_ID_SHIFT      5
 #define INS_FLAG_ID_MASK       (~0 << INS_FLAG_ID_SHIFT)
 
 typedef union {
@@ -374,6 +375,9 @@ struct instruction {
 };
 
 
+#define INSTRUCTION_STARTS_BASICBLOCK(iptr) \
+       ((iptr)->flags.bits & INS_FLAG_BASICBLOCK)
+
 #define INSTRUCTION_IS_RESOLVED(iptr) \
        (!((iptr)->flags.bits & INS_FLAG_UNRESOLVED))