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 Details

    • NOWHERE

      public static final JitPassage.AddrCtx NOWHERE
      An address-context pair for synthetic p-code ops

      This is currently used in probing an instruction (possibly instrumented) for fall through, and in testing.

    • biCtx

      public final BigInteger biCtx
      The contextreg value as a big integer

      This is 0 when the language does not have a context register

    • rvCtx

      public final RegisterValue rvCtx
      The contextreg as a register value

      This is null when the language does not have a context register

    • address

      public final Address address
      The address
  • Constructor Details

    • AddrCtx

      public AddrCtx(RegisterValue ctx, Address address)
      Construct an address-context pair
      Parameters:
      ctx - the contextreg value
      address - the address
  • Method Details

    • fromInstructionContext

      public static JitPassage.AddrCtx fromInstructionContext(InstructionContext insCtx)
      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

      public static JitPassage.AddrCtx fromInstruction(Instruction instruction)
      Derive the address-context pair from an instruction
      Parameters:
      instruction - the instruction
      Returns:
      the instruction's address and input decode context
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(JitPassage.AddrCtx that)
      Specified by:
      compareTo in interface Comparable<JitPassage.AddrCtx>