Enum Class FailValGen

java.lang.Object
java.lang.Enum<FailValGen>
ghidra.pcode.emu.jit.gen.var.FailValGen
All Implemented Interfaces:
ValGen<JitFailVal>, Serializable, Comparable<FailValGen>, Constable

public enum FailValGen extends Enum<FailValGen> implements ValGen<JitFailVal>
The generator that is forbidden from actually generating.
  • Enum Constant Details

    • GEN

      public static final FailValGen GEN
      Singleton
  • Method Details

    • values

      public static FailValGen[] 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 FailValGen 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
    • genValInit

      public <THIS extends JitCompiledPassage, N extends Emitter.Next> Emitter<N> genValInit(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitFailVal v)
      Description copied from interface: ValGen
      Emit code to prepare any class-level items required to use this variable

      For example, if this represents a direct memory variable, then this can prepare a reference to the portion of the state involved, allowing it to access it readily.

      This should be used to emit code into the constructor.

      Specified by:
      genValInit in interface ValGen<JitFailVal>
      Type Parameters:
      THIS - the type of the generated class
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      localThis - a handle to this
      gen - the code generator
      v - the value
      Returns:
      the emitter with ...
    • genReadToStack

      public <THIS extends JitCompiledPassage, T extends Types.BPrim<?>, JT extends JitType.SimpleJitType<T, JT>, N extends Emitter.Next> Emitter<Emitter.Ent<N,T>> genReadToStack(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitFailVal v, JT type, Opnd.Ext ext)
      Description copied from interface: ValGen
      Emit code to read the value onto the stack
      Specified by:
      genReadToStack in interface ValGen<JitFailVal>
      Type Parameters:
      THIS - the type of the generated class
      T - the desired JVM type
      JT - the desired p-code type
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      localThis - a handle to this
      gen - the code generator
      v - the value
      type - the desired p-code type
      ext - the kind of extension to apply
      Returns:
      the emitter with ..., result
    • 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, JitFailVal v, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope)
      Description copied from interface: ValGen
      Emit code to read the value into local variables

      NOTE: In some cases, this may not emit any code at all. It may simple compose the operand from locals already allocated for a variable being "read."

      Specified by:
      genReadToOpnd in interface ValGen<JitFailVal>
      Type Parameters:
      THIS - the type of the generated class
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      localThis - a handle to this
      gen - the code generator
      v - the value
      type - the desired p-code type
      ext - the kind of extension to apply
      scope - a scope for generated temporary variables
      Returns:
      the operand and emitter with ...
    • genReadLegToStack

      public <THIS extends JitCompiledPassage, N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TInt>> genReadLegToStack(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitFailVal v, JitType.MpIntJitType type, int leg, Opnd.Ext ext)
      Description copied from interface: ValGen
      Emit code to read a leg of the value onto the stack
      Specified by:
      genReadLegToStack in interface ValGen<JitFailVal>
      Type Parameters:
      THIS - the type of the generated class
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      localThis - a handle to this
      gen - the code generator
      v - the value
      type - the desired p-code type
      leg - the leg index, 0 being the least significant
      ext - the kind of extension to apply
      Returns:
      the emitter with ..., result
    • 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, JitFailVal v, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope, int slack)
      Description copied from interface: ValGen
      Emit code to read the value into an array
      Specified by:
      genReadToArray in interface ValGen<JitFailVal>
      Type Parameters:
      THIS - the type of the generated class
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      localThis - a handle to this
      gen - the code generator
      v - the value
      type - the desired p-code type
      ext - the kind of extension to apply
      scope - a scope for generated temporary variables
      slack - the number of extra (more significant) elements to allocate in the array
      Returns:
      the operand and emitter with ..., arrayref
    • genReadToBool

      public <THIS extends JitCompiledPassage, N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TInt>> genReadToBool(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitFailVal v)
      Description copied from interface: ValGen
      Emit code to read the value onto the stack as a boolean
      Specified by:
      genReadToBool in interface ValGen<JitFailVal>
      Type Parameters:
      THIS - the type of the generated class
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      localThis - a handle to this
      gen - the code generator
      v - the value
      Returns:
      the emitter with ..., result
    • subpiece

      public ValGen<JitFailVal> subpiece(int byteShift, int maxByteSize)
      Description copied from interface: ValGen
      Create a generator for a PcodeOp.SUBPIECE of a value.
      Specified by:
      subpiece in interface ValGen<JitFailVal>
      Parameters:
      byteShift - 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