Package ghidra.pcode.emu.jit.gen
Record Class FieldForSpaceIndirect
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.gen.FieldForSpaceIndirect
- Record Components:
space
- the address space of the state space to pre-fetch
- All Implemented Interfaces:
FieldReq
,InstanceFieldReq
A field request for a pre-fetched
JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace
The field is used for indirect memory accesses. For those, the address space is given in the p-code, but the offset must be computed at run time. Thus, we can pre-fetch the state space, but not any particular page.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aFieldForSpaceIndirect
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.void
generateInitCode
(JitCodeGenerator gen, org.objectweb.asm.ClassVisitor cv, org.objectweb.asm.MethodVisitor iv) Emit the field declaration and its initialization bytecodevoid
generateLoadCode
(JitCodeGenerator gen, org.objectweb.asm.MethodVisitor rv) Emit code to load the field onto the JVM stackfinal int
hashCode()
Returns a hash code value for this object.name()
Derive a suitable name for the fieldspace()
Returns the value of thespace
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FieldForSpaceIndirect
Creates an instance of aFieldForSpaceIndirect
record class.- Parameters:
space
- the value for thespace
record component
-
-
Method Details
-
name
Description copied from interface:FieldReq
Derive a suitable name for the field -
generateInitCode
public void generateInitCode(JitCodeGenerator gen, org.objectweb.asm.ClassVisitor cv, org.objectweb.asm.MethodVisitor iv) Emit the field declaration and its initialization bytecodeThe declaration is emitted into the class definition, and the initialization code is emitted into the class constructor.
Consider the "ram" space. The declaration is equivalent to:
private final
JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace
spaceInd_ram;And the initialization is equivalent to:
spaceInd_ram = state.getForSpace(ADDRESS_FACTORY.getAddressSpace(ramId));
- Specified by:
generateInitCode
in interfaceInstanceFieldReq
- Parameters:
gen
- the code generatorcv
- the visitor for the class definitioniv
- the visitor for the class constructor
-
generateLoadCode
Description copied from interface:FieldReq
Emit code to load the field onto the JVM stack- Specified by:
generateLoadCode
in interfaceFieldReq
- Parameters:
gen
- the code generatorrv
- the visitor often for therun
method, but could be the static initializer or constructor
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
space
Returns the value of thespace
record component.- Returns:
- the value of the
space
record component
-