Interface AccessGen<JT extends JitType>

Type Parameters:
JT - the JIT type of the operand
All Known Subinterfaces:
ExportsLegAccessGen, MpAccessGen, SimpleAccessGen<T,JT>
All Known Implementing Classes:
DoubleAccessGen, FloatAccessGen, IntAccessGen, LongAccessGen, MpIntAccessGen

public interface AccessGen<JT extends JitType>
A generator to emit code that accesses variables of various size in a state, for a specific type and byte order.

This is used by variable birthing and retirement as well as direct memory accesses. Dynamic memory accesses, i.e., store and load do not use this, though they may borrow some portions.

  • Method Details

    • lookup

      static <T extends JitType> AccessGen<T> lookup(Endian endian, T type)
      Lookup the generator for accessing variables for the given type and byte order
      Parameters:
      endian - the byte order
      type - the p-code type of the variable
      Returns:
      the access generator
    • lookupSimple

      static <T extends Types.BPrim<?>, JT extends JitType.SimpleJitType<T, JT>> SimpleAccessGen<T,JT> lookupSimple(Endian endian, JT type)
      Lookup the generator for accessing variables of simple types and the given byte order
      Type Parameters:
      T - the JVM type of the variable
      JT - the p-code type of the variable
      Parameters:
      endian - the byte order
      type - the p-code type of the variable
      Returns:
      the access generator
    • lookupMp

      static MpIntAccessGen lookupMp(Endian endian)
      Lookup the generator for accessing variables of multi-precision integer type and the given byte order
      Parameters:
      endian - the byte order
      Returns:
      the access generator
    • genReadToBool

      static <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, Varnode vn)
      Emit bytecode to read the given varnode onto the stack as a p-code bool (JVM int)
      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
      Returns:
      the emitter typed with the resulting stack, i.e., having pushed the value