Package ghidra.pcode.emu.jit.gen.var
Interface DirectMemoryVarGen
- All Superinterfaces:
MemoryVarGen<JitDirectMemoryVar>,ValGen<JitDirectMemoryVar>,VarGen<JitDirectMemoryVar>
- All Known Implementing Classes:
SubDirectMemoryVarGen,WholeDirectMemoryVarGen
The generator for a direct memory variable.
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, JitDirectMemoryVar 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, JitDirectMemoryVar 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, JitDirectMemoryVar 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, JitDirectMemoryVar 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.MemoryVarGen
genReadLegToStack, genReadToArray, genReadToOpnd, genReadToStack, genValInit, getVarnode
-
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, JitDirectMemoryVar 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<JitDirectMemoryVar>- 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, JitDirectMemoryVar 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<JitDirectMemoryVar>- 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, JitDirectMemoryVar 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<JitDirectMemoryVar>- 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, JitDirectMemoryVar v) Description copied from interface:ValGenEmit code to read the value onto the stack as a boolean- Specified by:
genReadToBoolin interfaceMemoryVarGen<JitDirectMemoryVar>- Specified by:
genReadToBoolin interfaceValGen<JitDirectMemoryVar>- 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
-