Package ghidra.pcode.emu.jit.gen.var
Interface InputVarGen
- All Superinterfaces:
LocalVarGen<JitInputVar>,ValGen<JitInputVar>,VarGen<JitInputVar>
- All Known Implementing Classes:
SubInputVarGen,WholeInputVarGen
The generator for a local variable that is input to the passage.
This prohibits generation of code to write the variable.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.pcode.emu.jit.gen.var.VarGen
VarGen.BlockTransition<THIS extends JitCompiledPassage> -
Method Summary
Modifier and TypeMethodDescriptiondefault <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, JitInputVar v) Emit code to read the value onto the stack as a booleandefault <THIS extends JitCompiledPassage,N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<int[]>>>
Emitter<N1> genWriteFromArray(Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitInputVar v, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope) Write a value from an array operand into the given variabledefault <THIS extends JitCompiledPassage,N extends Emitter.Next>
Emitter<N> genWriteFromOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitInputVar v, Opnd<JitType.MpIntJitType> opnd, Opnd.Ext ext, Scope scope) Write a value from a local operand into the given variabledefault <THIS extends JitCompiledPassage,T extends Types.BPrim<?>, JT extends JitType.SimpleJitType<T, JT>, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T>>
Emitter<N1> genWriteFromStack(Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitInputVar v, JT type, Opnd.Ext ext, Scope scope) Write a value from a stack operand into the given variableMethods inherited from interface ghidra.pcode.emu.jit.gen.var.LocalVarGen
genReadLegToStack, genReadToArray, genReadToOpnd, genReadToStack, genValInit, getHandler
-
Method Details
-
genWriteFromStack
default <THIS extends JitCompiledPassage,T extends Types.BPrim<?>, Emitter<N1> genWriteFromStackJT extends JitType.SimpleJitType<T, JT>, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T>> (Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitInputVar v, JT type, Opnd.Ext ext, Scope scope) Description copied from interface:VarGenWrite a value from a stack operand into the given variable- Specified by:
genWriteFromStackin interfaceVarGen<JitInputVar>- Type Parameters:
THIS- the type of the generated classT- the JVM type of the stack operandJT- the p-code type of the stack operandN1- the tail of the stack (...)N0- ..., value- Parameters:
em- the emitterlocalThis- a handle tothisgen- the code generatorv- the variable to writetype- the p-code type of the stack operandext- the kind of extension to apply when adjusting from varnode size to JVM sizescope- a scope for temporaries- Returns:
- the emitter with ...
-
genWriteFromOpnd
default <THIS extends JitCompiledPassage,N extends Emitter.Next> Emitter<N> genWriteFromOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitInputVar v, Opnd<JitType.MpIntJitType> opnd, Opnd.Ext ext, Scope scope) Description copied from interface:VarGenWrite a value from a local operand into the given variable- Specified by:
genWriteFromOpndin interfaceVarGen<JitInputVar>- Type Parameters:
THIS- the type of the generated classN- the tail of the stack (...)- Parameters:
em- the emitterlocalThis- a handle tothisgen- the code generatorv- the variable to writeopnd- the source operandext- the kind of extension to apply when adjusting from varnode size to JVM sizescope- a scope for temporaries- Returns:
- the emitter with ...
-
genWriteFromArray
default <THIS extends JitCompiledPassage,N1 extends Emitter.Next, Emitter<N1> genWriteFromArrayN0 extends Emitter.Ent<N1, Types.TRef<int[]>>> (Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitInputVar v, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope) Description copied from interface:VarGenWrite a value from an array operand into the given variable- Specified by:
genWriteFromArrayin interfaceVarGen<JitInputVar>- Type Parameters:
THIS- the type of the generated classN1- the tail of the stack (...)N0- ..., arrayref- Parameters:
em- the emitterlocalThis- a handle tothisgen- the code generatorv- the variable to writetype- the p-code type of the array operandext- the kind of extension to apply when adjusting from varnode size to JVM sizescope- a scope for temporaries- Returns:
- the emitter with ...
-
genReadToBool
default <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, JitInputVar v) Description copied from interface:ValGenEmit code to read the value onto the stack as a boolean- Specified by:
genReadToBoolin interfaceLocalVarGen<JitInputVar>- Specified by:
genReadToBoolin interfaceValGen<JitInputVar>- Type Parameters:
THIS- the type of the generated classN- the tail of the stack (...)- Parameters:
em- the emitterlocalThis- a handle tothisgen- the code generatorv- the value- Returns:
- the emitter with ..., result
-