Interface UnaryOpBehavior
- All Superinterfaces:
OpBehavior
- All Known Implementing Classes:
OpBehaviorBoolNegate, OpBehaviorCopy, OpBehaviorFloatAbs, OpBehaviorFloatCeil, OpBehaviorFloatFloat2Float, OpBehaviorFloatFloor, OpBehaviorFloatInt2Float, OpBehaviorFloatNan, OpBehaviorFloatNeg, OpBehaviorFloatRound, OpBehaviorFloatSqrt, OpBehaviorFloatTrunc, OpBehaviorInt2Comp, OpBehaviorIntNegate, OpBehaviorIntSext, OpBehaviorIntZext, OpBehaviorLzcount, OpBehaviorPopcount
The implementation of a unary (1 input arg, 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
ChangeModifier and TypeMethodDescriptionlongevaluateUnary(int sizeout, int sizein, long unsignedIn1) Evaluate the unary operation using long dataevaluateUnary(int sizeout, int sizein, BigInteger unsignedIn1) Evaluate the unary operation using BigInteger dataMethods inherited from interface OpBehavior
opcode
-
Method Details
-
evaluateUnary
long evaluateUnary(int sizeout, int sizein, long unsignedIn1) Evaluate the unary 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 1- Returns:
- operation result.
- See Also:
-
evaluateUnary
Evaluate the unary 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 1- Returns:
- operation result.
- See Also:
-