Interface SleighPcodeUseropDefinition<T>

Type Parameters:
T - no type in particular, except to match any executor
All Superinterfaces:
PcodeUseropLibrary.PcodeUseropDefinition<T>
All Known Implementing Classes:
AbstractSleighPcodeUseropDefinition, FixedSleighPcodeUseropDefinition, OverloadedSleighPcodeUseropDefinition

public interface SleighPcodeUseropDefinition<T> extends PcodeUseropLibrary.PcodeUseropDefinition<T>
A p-code userop defined using Sleigh source
  • Field Details

  • Method Details

    • getBody

      String getBody(List<Varnode> args)
      Get the Sleigh source that defines this userop

      The body may or may not actually depend on the arguments. Ideally, it does not, but sometimes the body may vary depending on the sizes of the arguments. In cases where it is known the body is fixed, the args parameter may be null or an empty list. When the arguments are required, index 0 must be the output varnode. If the userop has no output, index 0 may be null.

      Parameters:
      args - the argument varnodes
      Returns:
      the body
    • getBody

      default String getBody(Varnode... args)
      Get the Sleigh source that defines this userop
      Parameters:
      args - the argument varnodes
      Returns:
      the body
      See Also:
    • programFor

      PcodeProgram programFor(List<Varnode> args, PcodeUseropLibrary<?> library)
      Get the p-code program implementing this userop for the given arguments and library.

      This will compile and cache a program for each new combination of arguments seen.

      Parameters:
      args - the operands, output at index 0, and inputs following
      library - the complete userop library
      Returns:
      the p-code program to be fed to the same executor as invoked this userop, but in a new frame