Interface SubMemoryVarGen<V extends JitVarnodeVar>

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

public interface SubMemoryVarGen<V extends JitVarnodeVar> extends MemoryVarGen<V>
A generator for a subpiece of a memory 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
    • getVarnode

      default Varnode getVarnode(JitCodeGenerator<?> gen, V v)
      Description copied from interface: MemoryVarGen
      Get the varnode actually accessed for the given p-code variable

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

      Specified by:
      getVarnode in interface MemoryVarGen<V extends JitVarnodeVar>
      Parameters:
      gen - the code generator
      v - the value
      Returns:
      the varnode
    • 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