Package ghidra.pcode.emu.jit.gen.var
Interface SubMemoryVarGen<V extends JitVarnodeVar>
- Type Parameters:
V- the class of p-code variable node in the use-def graph
- All Superinterfaces:
MemoryVarGen<V>,ValGen<V>,VarGen<V>
- All Known Implementing Classes:
SubDirectMemoryVarGen,SubMemoryOutVarGen
A generator for a subpiece of a memory 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 TypeMethodDescriptionintReturns .default VarnodegetVarnode(JitCodeGenerator<?> gen, V v) Get the varnode actually accessed for the given p-code variableintReturns the size of the subpiece.subpiece(int byteOffset, int maxByteSize) Create a generator for aPcodeOp.SUBPIECEof a value.Methods inherited from interface ghidra.pcode.emu.jit.gen.var.MemoryVarGen
genReadLegToStack, genReadToArray, genReadToBool, genReadToOpnd, genReadToStack, genValInitMethods inherited from interface ghidra.pcode.emu.jit.gen.var.VarGen
genWriteFromArray, genWriteFromOpnd, genWriteFromStack
-
Method Details
-
byteOffset
int byteOffset()Returns . the number of bytes to the right of the subpiece- Returns:
-
maxByteSize
int maxByteSize()Returns the size of the subpiece.- Returns:
- the size of the subpiece
-
getVarnode
Description copied from interface:MemoryVarGenGet the varnode actually accessed for the given p-code variableThis is made to be overridden for the implementation of subpiece access.
- Specified by:
getVarnodein interfaceMemoryVarGen<V extends JitVarnodeVar>- Parameters:
gen- the code generatorv- the value- Returns:
- the varnode
-
subpiece
Description copied from interface:ValGenCreate a generator for aPcodeOp.SUBPIECEof a value.- Specified by:
subpiecein interfaceValGen<V extends JitVarnodeVar>- Parameters:
byteOffset- the number of least-significant bytes to removemaxByteSize- the maximum size of the resulting variable. In general, a subpiece should never exceed the size of the parent varnode, but if it does, this will truncate that excess.- Returns:
- the resulting subpiece generator
-