Class SVM_JUMPIF


public class SVM_JUMPIF extends SVM_JUMP

SVM-INSTRUCTION: JUMPIF relation size paddr

Runtime Stack
   ..., sos, tos →
   ...

The 'tos' and 'sos' are popped off the Runtime stack. The 'result' is calculated as result = sos relation tos. Note: Both 'tos' abd 'sos' may be multi-sized.

Conditional Jump to paddr.

A conditional jump is executed, branching only if the relation evaluates true. Ie. The Program Sequence Control PCS := paddr otherwise PCS is incremented by one.

Link to GitHub: Source File.

Author:
S-Port: Definition of S-code, Øystein Myhre Andersen
  • Field Details

    • relation

      private final Relation relation
      The relation
    • size

      private final int size
      The test value size
  • Constructor Details

    • SVM_JUMPIF

      public SVM_JUMPIF(Relation relation, int size, ProgramAddress destination)
      Construct a new SVM_JUMP instruction
      Parameters:
      relation - the relation
      size - the test value size
      destination - the jump destination address
    • SVM_JUMPIF

      private SVM_JUMPIF(AttributeInputStream inpt) throws IOException
      Construct an SVM_JUMPIF instruction from the given input.
      Parameters:
      inpt - the input stream
      Throws:
      IOException - if IOException occur
  • Method Details