Class TokenField


  • public class TokenField
    extends PatternValue
    A contiguous set of bits within instruction stream, interpreted as an integer value
    • Constructor Detail

      • TokenField

        public TokenField()
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getBitStart

        public int getBitStart()
      • getBitEnd

        public int getBitEnd()
      • getByteStart

        public int getByteStart()
      • getByteEnd

        public int getByteEnd()
      • hasSignbit

        public boolean hasSignbit()
      • signExtend

        public static long signExtend​(long val,
                                      int bit)
        Sign extend -val- above -bit-
        Parameters:
        val - value to extend
        bit - bit specifying sign
        Returns:
      • zeroExtend

        public static long zeroExtend​(long val,
                                      int bit)
        Clear all bits in -val- above -bit-
        Parameters:
        val - value to zero extend
        bit - bit above which to zero extend
        Returns:
      • byteSwap

        public static long byteSwap​(long val,
                                    int size)
        Swap the least sig -size- bytes in -val-
        Parameters:
        val - value to be byte swapped
        size - number of bytes involved in swap
        Returns:
      • isBigEndian

        public boolean isBigEndian()
      • getShift

        public int getShift()