Enum Class JitPassage.Reachability

java.lang.Object
java.lang.Enum<JitPassage.Reachability>
ghidra.pcode.emu.jit.JitPassage.Reachability
All Implemented Interfaces:
Serializable, Comparable<JitPassage.Reachability>, Constable
Enclosing class:
JitPassage

public static enum JitPassage.Reachability extends Enum<JitPassage.Reachability>
Describes the manner in which something is reachable, wrt. dynamic context changes within an instruction step.

At the moment, the only way context can be changed dynamically is via a p-code userop. Such ops must have the AnnotatedPcodeUseropLibrary.PcodeUserop.modifiesContext() attribute set. If such an op is known to have been executed when finishing an instruction (either by branch or fall-through), we must exit the compiled passage.

  • Enum Constant Details

    • WITHOUT_CTXMOD

      public static final JitPassage.Reachability WITHOUT_CTXMOD
      There is at least one path to reach it. None of them modify the context dynamically.
    • MAYBE_CTXMOD

      public static final JitPassage.Reachability MAYBE_CTXMOD
      There are at least two paths to reach it. Some modify the context dynamically, and some do not.
    • WITH_CTXMOD

      public static final JitPassage.Reachability WITH_CTXMOD
      There is at least one path to reach it. All of them modify the context dynamically.
  • Method Details

    • values

      public static JitPassage.Reachability[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JitPassage.Reachability valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • combine

      public abstract JitPassage.Reachability combine(JitPassage.Reachability that)
      Consider this and another reachability as "or"
      Parameters:
      that - the other reachability
      Returns:
      the "or" of both
    • canReachWithoutCtxMod

      public abstract boolean canReachWithoutCtxMod()
      Check if it is possible for this block to be reached without a context modification.

      This is true if there exists any path to this block that doesn't include a possible context modification.

      Returns:
      true if reachable without context modification, false otherwise.