Enum Class LoadOpGen

java.lang.Object
java.lang.Enum<LoadOpGen>
ghidra.pcode.emu.jit.gen.op.LoadOpGen
All Implemented Interfaces:
OpGen<JitLoadOp>, Serializable, Comparable<LoadOpGen>, Constable

public enum LoadOpGen extends Enum<LoadOpGen> implements OpGen<JitLoadOp>
The generator for a load.

These ops are currently presumed to be indirect memory accesses. TODO: If we fold constants, we could convert some of these to direct.

We request a field to pre-fetch the space and emit code to load it onto the stack. We then emit code to load the offset onto the stack and convert it to a JVM long, if necessary. The varnode size is loaded by emitting an ldc, and finally we emit an invocation of JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace.read(long, int). The result is a byte array, so we finish by emitting the appropriate conversion and write the result to the output operand.