Package ghidra.pcode.emu.jit.analysis
Record Class JitType.MpIntJitType
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.analysis.JitType.MpIntJitType
- Record Components:
size- the size in byteslegTypesBE- the type of each leg, in big-endian orderlegTypesLE- the type of each leg, in little-endian order
- All Implemented Interfaces:
JitType,JitType.LeggedJitType<Types.TInt,JitType.IntJitType>
- Enclosing interface:
JitType
public static record JitType.MpIntJitType(int size, List<JitType.IntJitType> legTypesBE, List<JitType.IntJitType> legTypesLE)
extends Record
implements JitType.LeggedJitType<Types.TInt,JitType.IntJitType>
The p-code types for integers of size 9 and greater.
We take the strategy of inlined manipulation of int locals, composed to form the full variable. When stored on the stack, the least-significant portion is always toward the top, no matter the language endianness.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.pcode.emu.jit.analysis.JitType
JitType.DoubleJitType, JitType.FloatJitType, JitType.IntJitType, JitType.LeggedJitType<T extends Types.BPrim<?>,LT extends JitType.SimpleJitType<T, LT>>, JitType.LongJitType, JitType.MpFloatJitType, JitType.MpIntJitType, JitType.SimpleJitType<T extends Types.BPrim<?>, JT extends JitType.SimpleJitType<T, JT>> -
Constructor Summary
ConstructorsConstructorDescriptionMpIntJitType(int size, List<JitType.IntJitType> legTypesBE, List<JitType.IntJitType> legTypesLE) Creates an instance of aMpIntJitTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.ext()Extend this p-code type to the p-code type that fills its entire host JVM type.static JitType.MpIntJitTypeforSize(int size) Get the type for an integer of the given size 9 or greaterfinal inthashCode()Returns a hash code value for this object.intThe total number of JVM int variables ("legs") required to store the intintThe number of legs that are filledReturns the value of thelegTypesBErecord component.Returns the value of thelegTypesLErecord component.nm()Part of the name of a JVM local variable allocated for this typeintThe number of bytes filled in the last leg, if partialintpref()The preference for this type.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.pcode.emu.jit.analysis.JitType.LeggedJitType
castLegsLE
-
Constructor Details
-
MpIntJitType
public MpIntJitType(int size, List<JitType.IntJitType> legTypesBE, List<JitType.IntJitType> legTypesLE) Creates an instance of aMpIntJitTyperecord class.- Parameters:
size- the value for thesizerecord componentlegTypesBE- the value for thelegTypesBErecord componentlegTypesLE- the value for thelegTypesLErecord component
-
-
Method Details
-
forSize
Get the type for an integer of the given size 9 or greater- Parameters:
size- the size in bytes- Returns:
- the type
- Throws:
IllegalArgumentException- for any size 8 or less
-
pref
public int pref()Description copied from interface:JitTypeThe preference for this type. Smaller is more preferred. -
nm
Description copied from interface:JitTypePart of the name of a JVM local variable allocated for this type -
legsAlloc
public int legsAlloc()The total number of JVM int variables ("legs") required to store the int- Returns:
- the total number of legs
-
legsWhole
public int legsWhole()The number of legs that are filled- Returns:
- the number of whole legs
-
partialSize
public int partialSize()The number of bytes filled in the last leg, if partial- Returns:
- the number of bytes in the partial leg, or 0 if all legs are whole
-
ext
Description copied from interface:JitType -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
size
public int size()Returns the value of thesizerecord component. -
legTypesBE
Returns the value of thelegTypesBErecord component.- Specified by:
legTypesBEin interfaceJitType- Specified by:
legTypesBEin interfaceJitType.LeggedJitType<Types.TInt,JitType.IntJitType> - Returns:
- the value of the
legTypesBErecord component
-
legTypesLE
Returns the value of thelegTypesLErecord component.- Specified by:
legTypesLEin interfaceJitType- Returns:
- the value of the
legTypesLErecord component
-