Interface JitOp

All Known Subinterfaces:
JitBinOp, JitBoolBinOp, JitBoolUnOp, JitCallOtherOpIf, JitDefOp, JitFloatBinOp, JitFloatTestOp, JitFloatUnOp, JitIntBinOp, JitIntTestOp, JitIntUnOp, JitSyntheticOp, JitUnOp
All Known Implementing Classes:
JitBoolAndOp, JitBoolNegateOp, JitBoolOrOp, JitBoolXorOp, JitBranchIndOp, JitBranchOp, JitCallOtherDefOp, JitCallOtherMissingOp, JitCallOtherOp, JitCatenateOp, JitCBranchOp, JitCopyOp, JitFloatAbsOp, JitFloatAddOp, JitFloatCeilOp, JitFloatDivOp, JitFloatEqualOp, JitFloatFloat2FloatOp, JitFloatFloorOp, JitFloatInt2FloatOp, JitFloatLessEqualOp, JitFloatLessOp, JitFloatMultOp, JitFloatNaNOp, JitFloatNegOp, JitFloatNotEqualOp, JitFloatRoundOp, JitFloatSqrtOp, JitFloatSubOp, JitFloatTruncOp, JitInt2CompOp, JitIntAddOp, JitIntAndOp, JitIntCarryOp, JitIntDivOp, JitIntEqualOp, JitIntLeftOp, JitIntLessEqualOp, JitIntLessOp, JitIntMultOp, JitIntNegateOp, JitIntNotEqualOp, JitIntOrOp, JitIntRemOp, JitIntRightOp, JitIntSBorrowOp, JitIntSCarryOp, JitIntSDivOp, JitIntSExtOp, JitIntSLessEqualOp, JitIntSLessOp, JitIntSRemOp, JitIntSRightOp, JitIntSubOp, JitIntXorOp, JitIntZExtOp, JitLoadOp, JitLzCountOp, JitNopOp, JitPhiOp, JitPopCountOp, JitStoreOp, JitSubPieceOp, JitSynthSubPieceOp, JitUnimplementedOp

public interface JitOp
A p-code operator use-def node.

For a table of p-code ops, use-def nodes, and code generators, see OpGen.

  • Method Details

    • stubOp

      static JitOp stubOp(PcodeOp op)
      Create a use-def node for a nop or unimplemented op.
      Parameters:
      op - the p-code op
      Returns:
      the use-def node
    • unOp

      static JitUnOp unOp(PcodeOp op, JitOutVar out, JitVal u)
      Create a use-def node for a unary p-coe op
      Parameters:
      op - the p-code op
      out - the (pre-made) output operand use-def node
      u - the input operand use-def node
      Returns:
      the use-def node
    • binOp

      static JitDefOp binOp(PcodeOp op, JitOutVar out, JitVal l, JitVal r)
      Create a use-def node for a binary p-coe op
      Parameters:
      op - the p-code op
      out - the (pre-made) output operand use-def node
      l - the left input operand use-def node
      r - the right input operand use-def node
      Returns:
      the use-def node
    • op

      PcodeOp op()
      The p-code op represented by this use-def node
      Returns:
      the p-code op
    • canBeRemoved

      boolean canBeRemoved()
      Indicates the operation can be removed if its output is never used.
      Returns:
      true if removable
    • inputs

      List<JitVal> inputs()
      The input operand use-def nodes in some defined order
      Returns:
      the list of inputs
    • typeFor

      JitTypeBehavior typeFor(int position)
      Get the required type behavior for the input at the given position in inputs()
      Parameters:
      position - the input position
      Returns:
      the behavior
    • link

      void link()
      Add this op to the JitVal.uses() of each input operand, and (if applicable) set the JitOutVar.definition() of the output operand to this op.
    • unlink

      void unlink()
      Remove this op from the JitVal.uses() of each input operand, and (if applicable) unset the JitOutVar.definition() of the output operand.