Package iota

Class NMarvinJump


class NMarvinJump extends NMarvinInstruction
Representation of a jump (conditional or unconditional) instruction.
  • Field Details

    • rX

      public NPhysicalRegister rX
      Lhs of the condition (null for an unconditional jump and return from a method).
    • rY

      public NPhysicalRegister rY
      Rhs of the condition (null for an unconditional jump and return from a method).
    • trueBlock

      public NBasicBlock trueBlock
      Block to jump to on true (null for return from a method).
    • falseBlock

      public NBasicBlock falseBlock
      Block to jump to on false (null for an unconditional jump and return from a method).
    • returnFromMethod

      public boolean returnFromMethod
      Whether the jump (if unconditional) is to return from a method.
    • N

      public int N
      Program counter of the instruction to jump to.
  • Constructor Details

    • NMarvinJump

      public NMarvinJump(String mnemonic, NPhysicalRegister rX, NPhysicalRegister rY, NBasicBlock trueBlock, NBasicBlock falseBlock, boolean returnFromMethod)
      Constructs an NMarvinJump object for a jump.
      Parameters:
      mnemonic - instruction mnemonic.
      rX - lhs of the condition (null for return from method).
      rY - rhs of the condition (null for return from method).
      trueBlock - block to jump to on true.
      falseBlock - block to jump to on false.
      returnFromMethod - whether the jump (if unconditional) is to return from a method.
  • Method Details

    • write

      public void write(PrintWriter out)
      Writes this instruction to the given output stream.
      Specified by:
      write in class NMarvinInstruction
      Parameters:
      out - output stream.