Interface SubLocalVarGen<V extends JitVarnodeVar>

Type Parameters:
V - the class of p-code variable node in the use-def graph
All Superinterfaces:
LocalVarGen<V>, ValGen<V>, VarGen<V>
All Known Implementing Classes:
SubInputVarGen, SubLocalOutVarGen

public interface SubLocalVarGen<V extends JitVarnodeVar> extends LocalVarGen<V>
A generator for a subpiece of a local variable
  • Method Details

    • byteOffset

      int byteOffset()
      Returns . the number of bytes to the right of the subpiece
      Returns:
    • maxByteSize

      int maxByteSize()
      Returns the size of the subpiece.
      Returns:
      the size of the subpiece
    • getHandler

      default VarHandler getHandler(JitCodeGenerator<?> gen, V v)
      Description copied from interface: LocalVarGen
      Get the handler for a given p-code variable

      This is made to be overridden for the implementation of subpiece handlers.

      Specified by:
      getHandler in interface LocalVarGen<V extends JitVarnodeVar>
      Parameters:
      gen - the code generator
      v - the value
      Returns:
      the handler
    • subpiece

      default ValGen<V> subpiece(int byteOffset, int maxByteSize)
      Description copied from interface: ValGen
      Create a generator for a PcodeOp.SUBPIECE of a value.
      Specified by:
      subpiece in interface ValGen<V extends JitVarnodeVar>
      Parameters:
      byteOffset - the number of least-significant bytes to remove
      maxByteSize - the maximum size of the resulting variable. In general, a subpiece should never exceed the size of the parent varnode, but if it does, this will truncate that excess.
      Returns:
      the resulting subpiece generator