Interface SimpleOpnd<T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T,JT>>
- Type Parameters:
T- the JVM typeJT- the p-code type
- All Superinterfaces:
Opnd<JT>
- All Known Implementing Classes:
IntConstOpnd
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordSimpleOpnd.SimpleOpndEm<T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T, JT>, N extends Emitter.Next> An operand-emitter tupleNested classes/interfaces inherited from interface ghidra.pcode.emu.jit.gen.opnd.Opnd
Opnd.DoubleToDouble, Opnd.DoubleToFloat, Opnd.DoubleToInt, Opnd.DoubleToLong, Opnd.DoubleToMpInt, Opnd.Ext, Opnd.FloatToDouble, Opnd.FloatToFloat, Opnd.FloatToInt, Opnd.FloatToLong, Opnd.FloatToMpInt, Opnd.IntToDouble, Opnd.IntToFloat, Opnd.IntToInt, Opnd.IntToLong, Opnd.IntToMpInt, Opnd.LongToDouble, Opnd.LongToFloat, Opnd.LongToInt, Opnd.LongToLong, Opnd.LongToMpInt, Opnd.MpIntToDouble, Opnd.MpIntToFloat, Opnd.MpIntToInt, Opnd.MpIntToLong, Opnd.MpIntToMpInt, Opnd.MpToMpConv<FT extends Types.BPrim<?>,FLT extends JitType.SimpleJitType<FT, FLT>, FJT extends JitType.LeggedJitType<FT, FLT>, TT extends Types.BPrim<?>, TLT extends JitType.SimpleJitType<TT, TLT>, TJT extends JitType.LeggedJitType<TT, TLT>>, Opnd.MpToStackConv<FT extends Types.BPrim<?>, FLT extends JitType.SimpleJitType<FT, FLT>, FJT extends JitType.LeggedJitType<FT, FLT>, TT extends Types.BPrim<?>, TJT extends JitType.SimpleJitType<TT, TJT>>, Opnd.OpndEm<T extends JitType, N extends Emitter.Next>, Opnd.StackToMpConv<FT extends Types.BPrim<?>, FJT extends JitType.SimpleJitType<FT, FJT>, TT extends Types.BPrim<?>, TLT extends JitType.SimpleJitType<TT, TLT>, TJT extends JitType.LeggedJitType<TT, TLT>>, Opnd.StackToStackConv<FT extends Types.BPrim<?>, FJT extends JitType.SimpleJitType<FT, FJT>, TT extends Types.BPrim<?>, TJT extends JitType.SimpleJitType<TT, TJT>> -
Method Summary
Modifier and TypeMethodDescriptiondefault List<? extends SimpleOpnd<?, ?>> legsLE()Returns the legs in little-endian order.static <T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T, JT>>
SimpleOpnd<T, JT> Create a simple local operandstatic SimpleOpnd<Types.TInt, JitType.IntJitType> ofIntReadOnly(JitType.IntJitType type, Local<Types.TInt> local) Create a read-onlyintlocal operand<N extends Emitter.Next>
Emitter<Emitter.Ent<N, T>> Emit code to read the operand onto the stackdefault <N1 extends Emitter.Next,N0 extends Emitter.Ent<N1, T>>
SimpleOpnd.SimpleOpndEm<T, JT, N1> Emit code to write the operand from the stack<N1 extends Emitter.Next,N0 extends Emitter.Ent<N1, T>>
Emitter<N1> writeDirect(Emitter<N0> em) Emit code to write the operand, without generating a new operand
-
Method Details
-
of
static <T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T, SimpleOpnd<T,JT>> JT> of(JT type, Local<T> local) Create a simple local operand- Type Parameters:
T- the JVM typeJT- the p-code type- Parameters:
type- the p-code typelocal- the JVM local- Returns:
- the operand
-
ofIntReadOnly
static SimpleOpnd<Types.TInt,JitType.IntJitType> ofIntReadOnly(JitType.IntJitType type, Local<Types.TInt> local) Create a read-onlyintlocal operandMulti-precision integer operators work by composing several locals into a single p-code variable. Some of these operators need temporary variables. To avoid generating tons of those, we generally allow the temporary locals to be mutated. However, the local variables allocated to hold p-code variables cannot be mutated until the full output value has been successfully computed. Furthermore, we certainly cannot mutate any input operand by mistake. Using a read-only local for input operands ensures this does not happen. An attempt to write to one of these will instead generate a new temporary local, assign the value to it, and return the new operand. An attempt to write directly to this operand will result in an exception being thrown at generation time.
- Parameters:
type- the p-code typelocal- the local handle- Returns:
- the read-only operand
-
read
Emit code to read the operand onto the stack- Type Parameters:
N- the tail of the stack (...)- Parameters:
em- the emitter- Returns:
- the emitter with ..., value
-
write
default <N1 extends Emitter.Next,N0 extends Emitter.Ent<N1, SimpleOpnd.SimpleOpndEm<T,T>> JT, writeN1> (Emitter<N0> em, Scope scope) Emit code to write the operand from the stackThis will generate a new operand if this operand is read-only. Callers must therefore be prepared to take the result in place of this operand.
- Type Parameters:
N1- the tail of the stack (...)N0- ..., value- Parameters:
em- the emitterscope- a scope for generated temporary variables- Returns:
- the resulting operand and emitter with ...
-
writeDirect
Emit code to write the operand, without generating a new operandThis will throw an exception during generation if this operand is read-only. This should only be used when the caller is certain the operand can be written and when a scope is not available.
- Type Parameters:
N1- the tail of the stack (...)N0- ..., value- Parameters:
em- the emitter- Returns:
- the emitter with ...
-
legsLE
Description copied from interface:OpndReturns the legs in little-endian order.For non-legged types, this returns the singleton list containing only this operand
- Specified by:
legsLEin interfaceOpnd<T extends Types.BPrim<?>>- Returns:
- the legs in little-endian order
-