Interface ExportsLegAccessGen
- All Superinterfaces:
AccessGen<JitType.IntJitType>,SimpleAccessGen<Types.TInt,JitType.IntJitType>
- All Known Implementing Classes:
IntAccessGen
MpIntAccessGen.
This really just avoids the re-creation of Varnode objects for each leg of a large
varnode. The method instead takes the (space,offset,size) triple as well as the offset of the
block containing its start.
-
Method Summary
Modifier and TypeMethodDescription<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, AddressSpace space, long block, int off, int size) Emit code to read one JVM int, either a whole variable or one leg of a multi-precision int variable.default <THIS extends JitCompiledPassage,N extends Emitter.Next>
Emitter<Emitter.Ent<N, Types.TInt>> genReadToStack(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn) Emit code to read a varnodedefault <THIS extends JitCompiledPassage,N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>>
Emitter<N1> genWriteFromStack(Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn) Emit code to write a varnode<THIS extends JitCompiledPassage,N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>>
Emitter<N1> genWriteLegFromStack(Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, AddressSpace space, long block, int off, int size) Emit code to write one JVM int, either a whole variable or one leg of a multi-precision int variable.
-
Method Details
-
genReadLegToStack
<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, AddressSpace space, long block, int off, int size) Emit code to read one JVM int, either a whole variable or one leg of a multi-precision int variable.Legs that span blocks are handled as in
genReadToStack(Emitter, Local, JitCodeGenerator, Varnode)- Type Parameters:
THIS- the type of the generated passageN- the incoming stack- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorspace- the address space of the varnodeblock- the block offset containing the varnode (or leg)off- the offset of the varnode (or leg)size- the size of the varnode in bytes (or leg)- Returns:
- the emitter typed with the resulting stack, i.e., having pushed the value
-
genWriteLegFromStack
<THIS extends JitCompiledPassage,N1 extends Emitter.Next, Emitter<N1> genWriteLegFromStackN0 extends Emitter.Ent<N1, Types.TInt>> (Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, AddressSpace space, long block, int off, int size) Emit code to write one JVM int, either a whole variable or one leg of a multi-precision int variable.Legs that span blocks are handled as in
genWriteFromStack(Emitter, Local, JitCodeGenerator, Varnode)- Type Parameters:
THIS- the type of the generated passageN1- the tail of the incoming stackN0- the incoming stack with the value on top- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorspace- the address space of the varnodeblock- the block offset containing the varnode (or leg)off- the offset of the varnode (or leg)size- the size of the varnode in bytes (or leg)- Returns:
- the emitter typed with the resulting stack, i.e., having popped the value
-
genReadToStack
default <THIS extends JitCompiledPassage,N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TInt>> genReadToStack(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn) Description copied from interface:SimpleAccessGenEmit code to read a varnodeIf the varnode fits completely in the block (the common case), then this accesses the bytes from the one block, using the method chosen by size. If the varnode extends into the next block, then this will split the varnode into two portions according to machine byte order. Each portion is accessed using the method for the size of that portion. The results are reassembled into a single operand.
- Specified by:
genReadToStackin interfaceSimpleAccessGen<Types.TInt,JitType.IntJitType> - Type Parameters:
N- the incoming stack- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorvn- the varnode- Returns:
- the code generator with the resulting stack, i.e., having pushed the value
-
genWriteFromStack
default <THIS extends JitCompiledPassage,N1 extends Emitter.Next, Emitter<N1> genWriteFromStackN0 extends Emitter.Ent<N1, Types.TInt>> (Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn) Description copied from interface:SimpleAccessGenEmit code to write a varnodeIf the varnode fits completely in the block (the common case), then this accesses the bytes from the one block, using the method chosen by size. If the varnode extends into the next block, then this will split the varnode into two portions according to machine byte order. Each portion is accessed using the method for the size of that portion.
- Specified by:
genWriteFromStackin interfaceSimpleAccessGen<Types.TInt,JitType.IntJitType> - Type Parameters:
N1- the tail of the incoming stackN0- the incoming stack having the value on top- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorvn- the varnode- Returns:
- the code generator with the resulting stack, i.e., having popped the value
-