001 /*
002 * This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 * This file is licensed to You under the Eclipse Public License (EPL);
005 * You may not use this file except in compliance with the License. You
006 * may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 * See the COPYRIGHT.txt file distributed with this work for information
011 * regarding copyright ownership.
012 */
013 package org.jikesrvm.compilers.baseline;
014
015 /**
016 * A set of constants that define some useful Java types and stack
017 * sizes that describe the state of a basic block and its stack
018 * contents on entry.
019 */
020 public interface BBConstants {
021
022 // first two bits determine the number of Java words making up the
023 // entity
024 byte LENGTH_MASK = 0x03;
025
026 byte VOID_TYPE = 0x00;
027 byte INT_TYPE = 0x01;
028 byte ADDRESS_TYPE = 0x02;
029 byte LONG_TYPE = 0x04;
030 byte FLOAT_TYPE = 0x08;
031 byte DOUBLE_TYPE = 0x10;
032 byte LONGHALF_TYPE = 0x20;
033
034 short DUMMYBLOCK = -1;
035 short STARTBLOCK = 1;
036 short EXITBLOCK = 2;
037 short EXCEPTIONHANDLER = -2;
038
039 byte TARGET_ = 0x10;
040 byte CONDITIONAL_ = 0x20;
041 byte FALLTHRU_ = 0x40;
042 byte TRYSTART_ = (byte) 0x80;
043
044 byte NOTBLOCK = 0x0;
045 byte INJSR_ = 0x1;
046 byte JSRENTRY = 0x2;
047 byte TRYHANDLERSTART = 0x4;
048 byte HASHANDLER_ = 0x8;
049 byte METHODENTRY = TARGET_;
050 byte CONDITIONALTARGET = TARGET_ | CONDITIONAL_;
051 byte UNCONDITIONALTARGET = TARGET_;
052 byte FALLTHRUTARGET = TARGET_ | CONDITIONAL_ | FALLTHRU_;
053
054 }