Enum Class TaintVec.ShiftMode

java.lang.Object
java.lang.Enum<TaintVec.ShiftMode>
ghidra.taint.model.TaintVec.ShiftMode
All Implemented Interfaces:
Serializable, Comparable<TaintVec.ShiftMode>, Constable
Enclosing class:
TaintVec

public static enum TaintVec.ShiftMode extends Enum<TaintVec.ShiftMode>
Common shifting behaviors
  • Enum Constant Details

    • UNBOUNDED

      public static final TaintVec.ShiftMode UNBOUNDED
      No bound is applied to the shift. Values that fall off the edge are dropped. Furthermore, if the shift is greater than the length, all the values will fall off the edge and be dropped.
       +---+------+
       | 0 | 1234 |
       | 1 | _123 |
       | 2 | __12 |
       | 3 | ___1 |
       | 4 | ____ |
       +---+------+
       
    • REMAINDER

      public static final TaintVec.ShiftMode REMAINDER
      Only the lowest required bits are taken for the shift amount, i.e., the remainder when divided by the length, often a power of 2. Values that fall off the edge are dropped.
       +---+------+
       | 0 | 1234 |
       | 1 | _123 |
       | 2 | __12 |
       | 3 | ___1 |
       | 4 | 1234 | (Only the lowest 2 bits of the shift amount are considered)
       +---+------+
       
    • CIRCULAR

      public static final TaintVec.ShiftMode CIRCULAR
      Only the lowest required bits are taken for the shift amount, i.e., the remainder when divided by the length, often a power of 2. (Even if unbounded, a circular shift yields the same result.) Values that fall off the edge are cycled to the opposite end.
       +---+------+
       | 0 | 1234 |
       | 1 | 4123 |
       | 2 | 3412 |
       | 3 | 2341 |
       | 4 | 1234 |
       +---+------+
       
  • Method Details

    • values

      public static TaintVec.ShiftMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TaintVec.ShiftMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null