Package ghidra.pcode.emu.jit
Class JitPassage.AddrCtx
java.lang.Object
ghidra.pcode.emu.jit.JitPassage.AddrCtx
- All Implemented Interfaces:
Comparable<JitPassage.AddrCtx>
- Enclosing class:
JitPassage
public static final class JitPassage.AddrCtx
extends Object
implements Comparable<JitPassage.AddrCtx>
An address-context pair
Because decode is sensitive to the contextreg value, we have to consider that visiting the same address with a different context could produce a completely different stride. Thus, we subsume the context value in a sense as part of the address when seeding the passage decoder, when referring to the "location" of p-code ops, when exiting a translated passage, etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Address
The addressfinal BigInteger
The contextreg value as a big integerstatic final JitPassage.AddrCtx
An address-context pair for synthetic p-code opsfinal RegisterValue
The contextreg as a register value -
Constructor Summary
ConstructorsConstructorDescriptionAddrCtx
(RegisterValue ctx, Address address) Construct an address-context pair -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(JitPassage.AddrCtx that) boolean
static JitPassage.AddrCtx
fromInstruction
(Instruction instruction) Derive the address-context pair from an instructionstatic JitPassage.AddrCtx
Derive the address-context pair from an instruction's contextint
hashCode()
toString()
-
Field Details
-
NOWHERE
An address-context pair for synthetic p-code opsThis is currently used in probing an instruction (possibly instrumented) for fall through, and in testing.
-
biCtx
The contextreg value as a big integerThis is 0 when the language does not have a context register
-
rvCtx
The contextreg as a register valueThis is
null
when the language does not have a context register -
address
The address
-
-
Constructor Details
-
AddrCtx
Construct an address-context pair- Parameters:
ctx
- the contextreg valueaddress
- the address
-
-
Method Details
-
fromInstructionContext
Derive the address-context pair from an instruction's context- Parameters:
insCtx
- the context- Returns:
- the address and input decode context of the instruction whose context was given
-
fromInstruction
Derive the address-context pair from an instruction- Parameters:
instruction
- the instruction- Returns:
- the instruction's address and input decode context
-
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<JitPassage.AddrCtx>
-