Class OperandType


  • public final class OperandType
    extends java.lang.Object
    Helper class for testing operand related flags in an integer.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ADDRESS
      Bit set if the operand is used as an address.
      static int BIT
      Bit set if the operand is a bit value
      static int BYTE
      Bit set if the operand is a byte value
      static int CODE
      Bit set it the address referred to contains code.
      static int COP
      Bit set if the operand is a co-processor value
      static int DATA
      Bit set if the address referred to contains data.
      static int DYNAMIC
      Bit set if the operand is dynamically defined given some processorContext.
      static int FLAG
      Bit set if the operand is a flag.
      static int FLOAT
      Bit set if the operand is a float value
      static int IMMEDIATE
      Bit set if operand is an immediate value.
      static int IMPLICIT
      Bit set if operand is implicit.
      static int INDIRECT
      Bit set if operand is an indirect reference.
      static int LIST
      Bit set if the operand is a register.
      static int PORT
      Bit set if the operand is a register.
      static int QUADWORD
      Bit set if the operand is a 8 byte value
      static int READ
      Bit set if operand refers to an address being read
      static int REGISTER
      Bit set if the operand is a register.
      static int RELATIVE
      Bit set if operand depends on the instruction's address.
      static int SCALAR
      Bit set if the operand is a scalar value
      static int SIGNED
      Bit set if the operand is a signed value
      static int TEXT
      Bit set if the operand is text.
      static int WORD
      Bit set if the operand is a 2 byte value
      static int WRITE
      Bit set if operand refers to an address being written to
    • Constructor Summary

      Constructors 
      Constructor Description
      OperandType()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean doesRead​(int operandType)
      check the READ flag.
      static boolean doesWrite​(int operandType)
      check the WRITE flag.
      static boolean isAddress​(int operandType)
      check ADDRESS flag.
      static boolean isBit​(int operandType)
      check the BIT flag.
      static boolean isByte​(int operandType)
      check the BYTE flag.
      static boolean isCodeReference​(int operandType)
      check the CODE flag.
      static boolean isCoProcessor​(int operandType)
      check the COPROCESSOR flag.
      static boolean isDataReference​(int operandType)
      check the DATA flag.
      static boolean isFlag​(int operandType)
      check the CONDITION FLAG flag.
      static boolean isFloat​(int operandType)
      check the FLOAT flag.
      static boolean isImmediate​(int operandType)
      check the IMMEDIATE flag.
      static boolean isImplicit​(int operandType)
      check the IMPLICIT flag.
      static boolean isIndirect​(int operandType)
      check the INDIRECT flag.
      static boolean isList​(int operandType)
      check the LIST flag.
      static boolean isPort​(int operandType)
      check the PORT flag.
      static boolean isQuadWord​(int operandType)
      check the QUADWORD flag.
      static boolean isRegister​(int operandType)
      check the REGISTER flag.
      static boolean isRelative​(int operandType)
      check the RELATIVE flag.
      static boolean isScalar​(int operandType)
      check SCALAR flag.
      static boolean isScalarAsAddress​(int operandType)
      check if both a scalar and an address
      static boolean isSigned​(int operandType)
      check the SIGNED flag.
      static boolean isText​(int operandType)
      check the TEXT flag.
      static boolean isWord​(int operandType)
      check the WORD flag.
      static java.lang.String toString​(int operandType)
      returns a string representation of the given operandType
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • READ

        public static final int READ
        Bit set if operand refers to an address being read
        See Also:
        Constant Field Values
      • WRITE

        public static final int WRITE
        Bit set if operand refers to an address being written to
        See Also:
        Constant Field Values
      • INDIRECT

        public static final int INDIRECT
        Bit set if operand is an indirect reference.
        See Also:
        Constant Field Values
      • IMMEDIATE

        public static final int IMMEDIATE
        Bit set if operand is an immediate value.
        See Also:
        Constant Field Values
      • RELATIVE

        public static final int RELATIVE
        Bit set if operand depends on the instruction's address.
        See Also:
        Constant Field Values
      • IMPLICIT

        public static final int IMPLICIT
        Bit set if operand is implicit.
        See Also:
        Constant Field Values
      • CODE

        public static final int CODE
        Bit set it the address referred to contains code.
        See Also:
        Constant Field Values
      • DATA

        public static final int DATA
        Bit set if the address referred to contains data.
        See Also:
        Constant Field Values
      • PORT

        public static final int PORT
        Bit set if the operand is a register.
        See Also:
        Constant Field Values
      • REGISTER

        public static final int REGISTER
        Bit set if the operand is a register.
        See Also:
        Constant Field Values
      • LIST

        public static final int LIST
        Bit set if the operand is a register.
        See Also:
        Constant Field Values
      • ADDRESS

        public static final int ADDRESS
        Bit set if the operand is used as an address. If this is not set, assume it is a scalar value.
        See Also:
        Constant Field Values
      • SCALAR

        public static final int SCALAR
        Bit set if the operand is a scalar value
        See Also:
        Constant Field Values
      • BYTE

        public static final int BYTE
        Bit set if the operand is a byte value
        See Also:
        Constant Field Values
      • WORD

        public static final int WORD
        Bit set if the operand is a 2 byte value
        See Also:
        Constant Field Values
      • QUADWORD

        public static final int QUADWORD
        Bit set if the operand is a 8 byte value
        See Also:
        Constant Field Values
      • SIGNED

        public static final int SIGNED
        Bit set if the operand is a signed value
        See Also:
        Constant Field Values
      • FLOAT

        public static final int FLOAT
        Bit set if the operand is a float value
        See Also:
        Constant Field Values
      • COP

        public static final int COP
        Bit set if the operand is a co-processor value
        See Also:
        Constant Field Values
      • DYNAMIC

        public static final int DYNAMIC
        Bit set if the operand is dynamically defined given some processorContext. If bit is set then the SCALAR or ADDRESS bit must be set.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OperandType

        public OperandType()
    • Method Detail

      • doesRead

        public static boolean doesRead​(int operandType)
        check the READ flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the READ flag is set.
      • doesWrite

        public static boolean doesWrite​(int operandType)
        check the WRITE flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the WRITE flag is set.
      • isIndirect

        public static boolean isIndirect​(int operandType)
        check the INDIRECT flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the INDIRECT flag is set.
      • isImmediate

        public static boolean isImmediate​(int operandType)
        check the IMMEDIATE flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the IMMEDIATE flag is set.
      • isRelative

        public static boolean isRelative​(int operandType)
        check the RELATIVE flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the RELATIVE flag is set.
      • isImplicit

        public static boolean isImplicit​(int operandType)
        check the IMPLICIT flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the IMPLICIT flag is set.
      • isCodeReference

        public static boolean isCodeReference​(int operandType)
        check the CODE flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the CODE flag is set.
      • isDataReference

        public static boolean isDataReference​(int operandType)
        check the DATA flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the DATA flag is set.
      • isPort

        public static boolean isPort​(int operandType)
        check the PORT flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the PORT flag is set.
      • isRegister

        public static boolean isRegister​(int operandType)
        check the REGISTER flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the REGISTER flag is set.
      • isList

        public static boolean isList​(int operandType)
        check the LIST flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the LIST flag is set.
      • isFlag

        public static boolean isFlag​(int operandType)
        check the CONDITION FLAG flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the CONDITION flag is set.
      • isText

        public static boolean isText​(int operandType)
        check the TEXT flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the TEXT flag is set.
      • isAddress

        public static boolean isAddress​(int operandType)
        check ADDRESS flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the ADDRESS flag is set
      • isScalar

        public static boolean isScalar​(int operandType)
        check SCALAR flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the SCALAR flag is set
      • isBit

        public static boolean isBit​(int operandType)
        check the BIT flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the BIT flag is set.
      • isByte

        public static boolean isByte​(int operandType)
        check the BYTE flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the BYTE flag is set.
      • isWord

        public static boolean isWord​(int operandType)
        check the WORD flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the WORD flag is set.
      • isQuadWord

        public static boolean isQuadWord​(int operandType)
        check the QUADWORD flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the QUADWORD flag is set.
      • isSigned

        public static boolean isSigned​(int operandType)
        check the SIGNED flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the SIGNED flag is set.
      • isFloat

        public static boolean isFloat​(int operandType)
        check the FLOAT flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the FLOAT flag is set.
      • isCoProcessor

        public static boolean isCoProcessor​(int operandType)
        check the COPROCESSOR flag.
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if the COPROCESSOR flag is set.
      • isScalarAsAddress

        public static boolean isScalarAsAddress​(int operandType)
        check if both a scalar and an address
        Parameters:
        operandType - the bit field to examine.
        Returns:
        true if it is both a scalar and an address
      • toString

        public static java.lang.String toString​(int operandType)
        returns a string representation of the given operandType
        Parameters:
        operandType - the operandType bits
        Returns:
        the string rep