Package ghidra.pcode.opbehavior
Class BinaryOpBehavior
- java.lang.Object
-
- ghidra.pcode.opbehavior.OpBehavior
-
- ghidra.pcode.opbehavior.BinaryOpBehavior
-
- Direct Known Subclasses:
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
public abstract class BinaryOpBehavior extends OpBehavior
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract long
evaluateBinary(int sizeout, int sizein, long unsignedIn1, long unsignedIn2)
Evaluate the binary (2 input args) operation using long dataabstract java.math.BigInteger
evaluateBinary(int sizeout, int sizein, java.math.BigInteger unsignedIn1, java.math.BigInteger unsignedIn2)
Evaluate the binary (2 input args) operation using BigInteger data-
Methods inherited from class ghidra.pcode.opbehavior.OpBehavior
getOpCode
-
-
-
-
Method Detail
-
evaluateBinary
public abstract long evaluateBinary(int sizeout, int sizein, long unsignedIn1, long unsignedIn2)
Evaluate the binary (2 input args) operation using long data- Parameters:
sizeout
- intended output size (bytes)sizein
- in1 size (bytes)unsignedIn1
- unsigned input 1unsignedIn2
- unsigned input 2- Returns:
- operation result. NOTE: 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.
- See Also:
Utils.longToBytes(long, int, boolean)
,Utils.bytesToLong(byte[], int, boolean)
-
evaluateBinary
public abstract java.math.BigInteger evaluateBinary(int sizeout, int sizein, java.math.BigInteger unsignedIn1, java.math.BigInteger unsignedIn2)
Evaluate the binary (2 input args) operation using BigInteger data- Parameters:
sizeout
- intended output size (bytes)sizein
- in1 size (bytes)unsignedIn1
- unsigned input 1unsignedIn2
- unsigned input 2- Returns:
- operation result. NOTE: 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.
- See Also:
Utils.bigIntegerToBytes(BigInteger, int, boolean)
,Utils.bytesToBigInteger(byte[], int, boolean, boolean)
-
-