Package ghidra.pcode.emu.jit.gen.var
Interface LocalVarGen<V extends JitVarnodeVar>
- Type Parameters:
V
- the class of p-code variable node in the use-def graph
- All Known Implementing Classes:
InputVarGen
,LocalOutVarGen
The generator for local variable access.
These variables are presumed to be allocated as JVM locals. The generator emits
iload
and istore
and or depending on the assigned
type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.pcode.emu.jit.gen.var.VarGen
VarGen.BlockTransition
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
generateValInitCode
(JitCodeGenerator gen, V v, org.objectweb.asm.MethodVisitor iv) Prepare any class-level items required to use this variabledefault JitType
generateValReadCode
(JitCodeGenerator gen, V v, JitTypeBehavior typeReq, org.objectweb.asm.MethodVisitor rv) Read the value onto the stackMethods inherited from interface ghidra.pcode.emu.jit.gen.var.VarGen
generateVarWriteCode
-
Method Details
-
generateValInitCode
Description copied from interface:ValGen
Prepare any class-level items required to use this variableFor 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.
- Specified by:
generateValInitCode
in interfaceValGen<V extends JitVarnodeVar>
- Parameters:
gen
- the code generatorv
- the valueiv
- the constructor visitor
-
generateValReadCode
default JitType generateValReadCode(JitCodeGenerator gen, V v, JitTypeBehavior typeReq, org.objectweb.asm.MethodVisitor rv) Description copied from interface:ValGen
Read the value onto the stack- Specified by:
generateValReadCode
in interfaceValGen<V extends JitVarnodeVar>
- Parameters:
gen
- the code generatorv
- the value to readtypeReq
- the required type of the valuerv
- the visitor for therun
method- Returns:
- the actual p-code type (which determines the JVM type) of the value on the stack
-