Interface IntBitwiseBinOpGen<T extends JitBinOp>

Type Parameters:
T - the class of p-code op node in the use-def graph
All Superinterfaces:
BinOpGen<T>, IntOpBinOpGen<T>, OpGen<T>
All Known Implementing Classes:
BoolAndOpGen, BoolOrOpGen, BoolXorOpGen, IntAndOpGen, IntOrOpGen, IntXorOpGen

public interface IntBitwiseBinOpGen<T extends JitBinOp> extends IntOpBinOpGen<T>
An extension for bitwise binary operators

This provides a simple strategy for multi-precision integer implementation. Since all bit positions are considered independently, we just apply the same IntOpBinOpGen.opForInt(Emitter, IntJitType) operator to each pair of corresponding legs independently to compute each corresponding output leg.

  • Method Details

    • isSigned

      default boolean isSigned()
      Description copied from interface: BinOpGen
      Whether this operator is signed

      In many cases, the operator itself is not affected by the signedness of the operands; however, if size adjustments to the operands are needed, this can determine how those operands are extended.

      Specified by:
      isSigned in interface BinOpGen<T extends JitBinOp>
      Returns:
      true for signed, false if not
    • genRunMpInt

      default <THIS extends JitCompiledPassage> Emitter<Emitter.Bot> genRunMpInt(Emitter<Emitter.Bot> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, T op, JitType.MpIntJitType type, Scope scope)
      Description copied from interface: IntOpBinOpGen
      Emit the JVM bytecode to perform the operator with multi-precision operands.
      Specified by:
      genRunMpInt in interface IntOpBinOpGen<T extends JitBinOp>
      Type Parameters:
      THIS - the type of the generated passage
      Parameters:
      em - the emitter typed with the empty stack
      localThis - a handle to the local holding the this reference
      gen - the code generator
      op - the p-code op
      type - the p-code type of the operands
      scope - a scope for generating temporary local storage
      Returns:
      the emitter typed with the empty stack