Enum Class MpIntAccessGen

java.lang.Object
java.lang.Enum<MpIntAccessGen>
ghidra.pcode.emu.jit.gen.access.MpIntAccessGen
All Implemented Interfaces:
AccessGen<JitType.MpIntJitType>, MpAccessGen, Serializable, Comparable<MpIntAccessGen>, Constable

public enum MpIntAccessGen extends Enum<MpIntAccessGen> implements MpAccessGen
The generator for writing multi-precision ints.
  • Enum Constant Details

  • Method Details

    • values

      public static MpIntAccessGen[] 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 MpIntAccessGen 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
    • orderedLegTypes

      protected abstract List<JitType.IntJitType> orderedLegTypes(JitType.MpIntJitType type)
      Arrange the leg types so that the least-significant one is first
      Parameters:
      type - the mp-int type
      Returns:
      the leg types in little-endian order
    • orderedLegs

      protected abstract List<SimpleOpnd<Types.TInt,JitType.IntJitType>> orderedLegs(Opnd<JitType.MpIntJitType> opnd)
      Arrange the operand legs so that the least-significant one is first
      Parameters:
      opnd - the mp-int operand
      Returns:
      the legs in little-endian order
    • genReadToOpnd

      public <THIS extends JitCompiledPassage, N extends Emitter.Next> Opnd.OpndEm<JitType.MpIntJitType,N> genReadToOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope)
      Description copied from interface: MpAccessGen
      Emit bytecode to load the varnode's value into several locals.
      Specified by:
      genReadToOpnd in interface MpAccessGen
      Type Parameters:
      THIS - the type of the generated passage
      N - the incoming stack
      Parameters:
      em - the emitter typed with the incoming stack
      localThis - a handle to the local holding the this reference
      gen - the code generator
      vn - the varnode
      type - desired the p-code type of the value
      ext - the kind of extension to apply
      scope - a scope for generating temporary local storage
      Returns:
      the operand containing the locals, and the emitter typed with the incoming stack
    • genReadToArray

      public <THIS extends JitCompiledPassage, N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TRef<int[]>>> genReadToArray(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope, int slack)
      Description copied from interface: MpAccessGen
      Emit bytecode to load the varnode's value into an integer array in little-endian order, pushing its ref onto the JVM stack.
      Specified by:
      genReadToArray in interface MpAccessGen
      Type Parameters:
      THIS - the type of the generated passage
      N - the incoming stack
      Parameters:
      em - the emitter typed with the incoming stack
      localThis - a handle to the local holding the this reference
      gen - the code generator
      vn - the varnode
      type - desired the p-code type of the value
      ext - the kind of extension to apply
      scope - a scope for generating temporary local storage
      slack - the number of additional, more significant, elements to allocate in the array
      Returns:
      the emitter typed with the resulting stack, i.e., having the ref pushed onto it
    • genWriteFromOpnd

      public <THIS extends JitCompiledPassage, N extends Emitter.Next> Emitter<N> genWriteFromOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Opnd<JitType.MpIntJitType> opnd, Varnode vn)
      Description copied from interface: MpAccessGen
      Emit bytecode to store a value into a variable from the JVM stack.
      Specified by:
      genWriteFromOpnd in interface MpAccessGen
      Type Parameters:
      THIS - the type of the generated passage
      N - the incoming stack
      Parameters:
      em - the emitter typed with the incoming stack
      localThis - a handle to the local holding the this reference
      gen - the code generator
      opnd - the operand whose locals contain the value to be stored
      vn - the varnode
      Returns:
      the emitter typed with the incoming stack
    • genWriteFromArray

      public <THIS extends JitCompiledPassage, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<int[]>>> Emitter<N1> genWriteFromArray(Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn, Scope scope)
      Description copied from interface: MpAccessGen
      Emit bytecode to store a varnode's value from an array of integer legs, in little endian order
      Specified by:
      genWriteFromArray in interface MpAccessGen
      Type Parameters:
      THIS - the type of the generated passage
      N1 - the tail of the incoming stack
      N0 - the incoming stack having the array ref on top
      Parameters:
      em - the emitter typed with the incoming stack
      localThis - a handle to the local holding the this reference
      gen - the code generator
      vn - the varnode
      scope - a scope for generating temporary local storage
      Returns:
      the emitter typed with the resulting stack, i.e., having popped the array