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<Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>,InstanceFieldReq<Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>
public record FieldForSpaceIndirect(AddressSpace space)
extends Record
implements InstanceFieldReq<Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>
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 aFieldForSpaceIndirectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<THIS extends JitCompiledPassage,N extends Emitter.Next>
Emitter<N> genInit(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, org.objectweb.asm.ClassVisitor cv) Emit the field declaration and its initialization bytecode<THIS extends JitCompiledPassage,N extends Emitter.Next>
Emitter<Emitter.Ent<N, Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>> genLoad(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen) Emit code to load the field onto the JVM stackfinal inthashCode()Returns a hash code value for this object.name()Derive a suitable name for the fieldspace()Returns the value of thespacerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FieldForSpaceIndirect
Creates an instance of aFieldForSpaceIndirectrecord class.- Parameters:
space- the value for thespacerecord component
-
-
Method Details
-
name
Description copied from interface:FieldReqDerive a suitable name for the field- Specified by:
namein interfaceFieldReq<Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>- Returns:
- the name
-
genInit
public <THIS extends JitCompiledPassage,N extends Emitter.Next> Emitter<N> genInit(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, org.objectweb.asm.ClassVisitor cv) 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.JitBytesPcodeExecutorStateSpacespaceInd_ram;And the initialization is equivalent to:
spaceInd_ram = state.getForSpace(ADDRESS_FACTORY.getAddressSpace(ramId));
- Specified by:
genInitin interfaceInstanceFieldReq<Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>- Type Parameters:
THIS- the type of the compiled passageN- the incoming stack- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generatorcv- the visitor for the class definition- Returns:
- the emitter typed with the incoming stack
-
genLoad
public <THIS extends JitCompiledPassage,N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>> genLoad(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen) Description copied from interface:InstanceFieldReqEmit code to load the field onto the JVM stack- Specified by:
genLoadin interfaceInstanceFieldReq<Types.TRef<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>>- Type Parameters:
THIS- the type of the compiled passageN- the incoming stack- Parameters:
em- the emitter typed with the incoming stacklocalThis- a handle to the local holding thethisreferencegen- the code generator- Returns:
- the emitter typed with the resulting stack, i.e., having pushed the value
-
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 thespacerecord component.- Returns:
- the value of the
spacerecord component
-