Interface BinaryOpBehavior
- All Superinterfaces:
OpBehavior
- All Known Implementing Classes:
OpBehaviorBoolAnd, OpBehaviorBoolOr, OpBehaviorBoolXor, OpBehaviorEqual, OpBehaviorFloatAdd, OpBehaviorFloatDiv, OpBehaviorFloatEqual, OpBehaviorFloatLess, OpBehaviorFloatLessEqual, OpBehaviorFloatMult, OpBehaviorFloatNotEqual, OpBehaviorFloatSub, OpBehaviorIntAdd, OpBehaviorIntAnd, OpBehaviorIntCarry, OpBehaviorIntDiv, OpBehaviorIntLeft, OpBehaviorIntLess, OpBehaviorIntLessEqual, OpBehaviorIntMult, OpBehaviorIntOr, OpBehaviorIntRem, OpBehaviorIntRight, OpBehaviorIntSborrow, OpBehaviorIntScarry, OpBehaviorIntSdiv, OpBehaviorIntSless, OpBehaviorIntSlessEqual, OpBehaviorIntSrem, OpBehaviorIntSright, OpBehaviorIntSub, OpBehaviorIntXor, OpBehaviorNotEqual, OpBehaviorPiece, OpBehaviorSubpiece
The implementation of a binary (2 input args, 1 output) p-code operator
-
Field Summary
Fields inherited from interface OpBehavior
BOOL_AND, BOOL_NEGATE, BOOL_OR, BOOL_XOR, BRANCH, BRANCHIND, CALL, CALLIND, CALLOTHER, CAST, CBRANCH, COPY, CPOOLREF, FLOAT_ABS, FLOAT_ADD, FLOAT_CEIL, FLOAT_DIV, FLOAT_EQUAL, FLOAT_FLOAT2FLOAT, FLOAT_FLOOR, FLOAT_INT2FLOAT, FLOAT_LESS, FLOAT_LESSEQUAL, FLOAT_MULT, FLOAT_NAN, FLOAT_NEG, FLOAT_NOTEQUAL, FLOAT_ROUND, FLOAT_SQRT, FLOAT_SUB, FLOAT_TRUNC, INDIRECT, INSERT, INT_2COMP, INT_ADD, INT_AND, INT_CARRY, INT_DIV, INT_EQUAL, INT_LEFT, INT_LESS, INT_LESSEQUAL, INT_MULT, INT_NEGATE, INT_NOTEQUAL, INT_OR, INT_REM, INT_RIGHT, INT_SBORROW, INT_SCARRY, INT_SDIV, INT_SEXT, INT_SLESS, INT_SLESSEQUAL, INT_SREM, INT_SRIGHT, INT_SUB, INT_XOR, INT_ZEXT, LOAD, LZCOUNT, MULTIEQUAL, NEW, PIECE, POPCOUNT, PTRADD, PTRSUB, RETURN, SEGMENTOP, SPULL, STORE, SUBPIECE, ZPULL -
Method Summary
Modifier and TypeMethodDescriptionlongevaluateBinary(int sizeout, int sizein, long unsignedIn1, long unsignedIn2) Evaluate the binary operation using long dataevaluateBinary(int sizeout, int sizein, BigInteger unsignedIn1, BigInteger unsignedIn2) Evaluate the binary operation using BigInteger dataMethods inherited from interface OpBehavior
opcode
-
Method Details
-
evaluateBinary
long evaluateBinary(int sizeout, int sizein, long unsignedIn1, long unsignedIn2) Evaluate the binary operation using long dataNOTE: if the operation overflows bits may be set beyond the specified sizeout. Even though results should be treated as unsigned it may be returned as a signed long value. It is expected that the returned result always be properly truncated by the caller since the evaluation may not - this is done to conserve emulation cycles.
- Parameters:
sizeout- intended output size (bytes)sizein- in1 size (bytes)unsignedIn1- unsigned input 1unsignedIn2- unsigned input 2- Returns:
- operation result.
- See Also:
-
evaluateBinary
Evaluate the binary operation using BigInteger dataNOTE: if the operation overflows bits may be set beyond the specified sizeout. Even though results should be treated as unsigned it may be returned as a signed value. It is expected that the returned result always be properly truncated by the caller since the evaluation may not - this is done to conserve emulation cycles.
- Parameters:
sizeout- intended output size (bytes)sizein- in1 size (bytes)unsignedIn1- unsigned input 1unsignedIn2- unsigned input 2- Returns:
- operation result.
- See Also:
-