Package ghidra.pcode.emu.jit.gen.access
Enum Class MpIntAccessGen
- All Implemented Interfaces:
AccessGen<JitType.MpIntJitType>,MpAccessGen,Serializable,Comparable<MpIntAccessGen>,Constable
The generator for writing multi-precision ints.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescription<THIS extends JitCompiledPassage,N extends Emitter.Next>
Emitter<Emitter.Ent<N, Types.TRef<int[]>>> genReadToArray(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope, int slack) Emit bytecode to load the varnode's value into an integer array in little-endian order, pushing its ref onto the JVM stack.<THIS extends JitCompiledPassage,N extends Emitter.Next>
Opnd.OpndEm<JitType.MpIntJitType, N> genReadToOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope) Emit bytecode to load the varnode's value into several locals.<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, Varnode vn, Scope scope) Emit bytecode to store a varnode's value from an array of integer legs, in little endian order<THIS extends JitCompiledPassage,N extends Emitter.Next>
Emitter<N> genWriteFromOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Opnd<JitType.MpIntJitType> opnd, Varnode vn) Emit bytecode to store a value into a variable from the JVM stack.protected abstract List<SimpleOpnd<Types.TInt, JitType.IntJitType>> orderedLegs(Opnd<JitType.MpIntJitType> opnd) Arrange the operand legs so that the least-significant one is firstprotected abstract List<JitType.IntJitType> Arrange the leg types so that the least-significant one is firststatic MpIntAccessGenReturns the enum constant of this class with the specified name.static MpIntAccessGen[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BE
The big-endian instance -
LE
The little-endian instance
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
orderedLegTypes
Arrange the leg types so that the least-significant one is first- Parameters:
type- the mp-int type- Returns:
- the leg types in little-endian order
-
orderedLegs
protected abstract List<SimpleOpnd<Types.TInt,JitType.IntJitType>> orderedLegs(Opnd<JitType.MpIntJitType> opnd) Arrange the operand legs so that the least-significant one is first- Parameters:
opnd- the mp-int operand- Returns:
- the legs in little-endian order
-
genReadToOpnd
public <THIS extends JitCompiledPassage,N extends Emitter.Next> Opnd.OpndEm<JitType.MpIntJitType,N> genReadToOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope) Description copied from interface:MpAccessGenEmit bytecode to load the varnode's value into several locals.- Specified by:
genReadToOpndin interfaceMpAccessGen- Type Parameters:
THIS- the type of the generated passageN- the incoming stack- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorvn- the varnodetype- desired the p-code type of the valueext- the kind of extension to applyscope- a scope for generating temporary local storage- Returns:
- the operand containing the locals, and the emitter typed with the incoming stack
-
genReadToArray
public <THIS extends JitCompiledPassage,N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TRef<int[]>>> genReadToArray(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn, JitType.MpIntJitType type, Opnd.Ext ext, Scope scope, int slack) Description copied from interface:MpAccessGenEmit bytecode to load the varnode's value into an integer array in little-endian order, pushing its ref onto the JVM stack.- Specified by:
genReadToArrayin interfaceMpAccessGen- Type Parameters:
THIS- the type of the generated passageN- the incoming stack- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorvn- the varnodetype- desired the p-code type of the valueext- the kind of extension to applyscope- a scope for generating temporary local storageslack- the number of additional, more significant, elements to allocate in the array- Returns:
- the emitter typed with the resulting stack, i.e., having the ref pushed onto it
-
genWriteFromOpnd
public <THIS extends JitCompiledPassage,N extends Emitter.Next> Emitter<N> genWriteFromOpnd(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Opnd<JitType.MpIntJitType> opnd, Varnode vn) Description copied from interface:MpAccessGenEmit bytecode to store a value into a variable from the JVM stack.- Specified by:
genWriteFromOpndin interfaceMpAccessGen- Type Parameters:
THIS- the type of the generated passageN- the incoming stack- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatoropnd- the operand whose locals contain the value to be storedvn- the varnode- Returns:
- the emitter typed with the incoming stack
-
genWriteFromArray
public <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, Varnode vn, Scope scope) Description copied from interface:MpAccessGenEmit bytecode to store a varnode's value from an array of integer legs, in little endian order- Specified by:
genWriteFromArrayin interfaceMpAccessGen- Type Parameters:
THIS- the type of the generated passageN1- the tail of the incoming stackN0- the incoming stack having the array ref on top- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorvn- the varnodescope- a scope for generating temporary local storage- Returns:
- the emitter typed with the resulting stack, i.e., having popped the array
-