Interface ExportsLegAccessGen
- All Superinterfaces:
TypedAccessGen
- All Known Implementing Classes:
IntReadGen,IntWriteGen
MpTypedAccessGen.
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 TypeMethodDescriptiondefault voidgenerateCode(JitCodeGenerator gen, Varnode vn, org.objectweb.asm.MethodVisitor rv) Emit code to access a varnode.voidgenerateMpCodeLeg(JitCodeGenerator gen, AddressSpace space, long block, int off, int size, org.objectweb.asm.MethodVisitor rv) Emit code to access one JVM int, either a whole variable or one leg of a multi-precision int variable.
-
Method Details
-
generateMpCodeLeg
void generateMpCodeLeg(JitCodeGenerator gen, AddressSpace space, long block, int off, int size, org.objectweb.asm.MethodVisitor rv) Emit code to access one JVM int, either a whole variable or one leg of a multi-precision int variable.Legs that span blocks are handled as in
generateCode(JitCodeGenerator, Varnode, MethodVisitor).- Parameters:
gen- 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)rv- the method visitor
-
generateCode
Description copied from interface:TypedAccessGenEmit code to access a varnode.If reading, the result is placed on the JVM stack. If writing, the value is popped from the JVM stack.
If 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. If reading, the results are reassembled into a single value and pushed onto the JVM stack.
- Specified by:
generateCodein interfaceTypedAccessGen- Parameters:
gen- the code generatorvn- the varnoderv- the method visitor
-