diff options
Diffstat (limited to 'lowlevelilinstruction.cpp')
| -rw-r--r-- | lowlevelilinstruction.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lowlevelilinstruction.cpp b/lowlevelilinstruction.cpp index 5a100080..c306e571 100644 --- a/lowlevelilinstruction.cpp +++ b/lowlevelilinstruction.cpp @@ -338,6 +338,11 @@ static constexpr std::array s_instructionOperandUsage = { OperandUsage{LLIL_CTZ, {SourceExprLowLevelOperandUsage}}, OperandUsage{LLIL_RBIT, {SourceExprLowLevelOperandUsage}}, OperandUsage{LLIL_CLS, {SourceExprLowLevelOperandUsage}}, + OperandUsage{LLIL_MINS, {LeftExprLowLevelOperandUsage, RightExprLowLevelOperandUsage}}, + OperandUsage{LLIL_MAXS, {LeftExprLowLevelOperandUsage, RightExprLowLevelOperandUsage}}, + OperandUsage{LLIL_MINU, {LeftExprLowLevelOperandUsage, RightExprLowLevelOperandUsage}}, + OperandUsage{LLIL_MAXU, {LeftExprLowLevelOperandUsage, RightExprLowLevelOperandUsage}}, + OperandUsage{LLIL_ABS, {SourceExprLowLevelOperandUsage}}, }; @@ -1996,6 +2001,7 @@ void LowLevelILInstruction::VisitExprs(bn::base::function_ref<bool(const LowLeve case LLIL_CTZ: case LLIL_RBIT: case LLIL_CLS: + case LLIL_ABS: case LLIL_SX: case LLIL_ZX: case LLIL_LOW_PART: @@ -2018,6 +2024,10 @@ void LowLevelILInstruction::VisitExprs(bn::base::function_ref<bool(const LowLeve case LLIL_AND: case LLIL_OR: case LLIL_XOR: + case LLIL_MINS: + case LLIL_MAXS: + case LLIL_MINU: + case LLIL_MAXU: case LLIL_LSL: case LLIL_LSR: case LLIL_ASR: @@ -2319,6 +2329,7 @@ ExprId LowLevelILInstruction::CopyTo( case LLIL_CTZ: case LLIL_RBIT: case LLIL_CLS: + case LLIL_ABS: case LLIL_SX: case LLIL_ZX: case LLIL_LOW_PART: @@ -2340,6 +2351,10 @@ ExprId LowLevelILInstruction::CopyTo( case LLIL_AND: case LLIL_OR: case LLIL_XOR: + case LLIL_MINS: + case LLIL_MAXS: + case LLIL_MINU: + case LLIL_MAXU: case LLIL_LSL: case LLIL_LSR: case LLIL_ASR: @@ -3406,6 +3421,36 @@ ExprId LowLevelILFunction::CountLeadingSigns(size_t size, ExprId a, uint32_t fla } +ExprId LowLevelILFunction::MinSigned(size_t size, ExprId left, ExprId right, uint32_t flags, const ILSourceLocation& loc) +{ + return AddExprWithLocation(LLIL_MINS, loc, size, flags, left, right); +} + + +ExprId LowLevelILFunction::MaxSigned(size_t size, ExprId left, ExprId right, uint32_t flags, const ILSourceLocation& loc) +{ + return AddExprWithLocation(LLIL_MAXS, loc, size, flags, left, right); +} + + +ExprId LowLevelILFunction::MinUnsigned(size_t size, ExprId left, ExprId right, uint32_t flags, const ILSourceLocation& loc) +{ + return AddExprWithLocation(LLIL_MINU, loc, size, flags, left, right); +} + + +ExprId LowLevelILFunction::MaxUnsigned(size_t size, ExprId left, ExprId right, uint32_t flags, const ILSourceLocation& loc) +{ + return AddExprWithLocation(LLIL_MAXU, loc, size, flags, left, right); +} + + +ExprId LowLevelILFunction::AbsoluteValue(size_t size, ExprId a, uint32_t flags, const ILSourceLocation& loc) +{ + return AddExprWithLocation(LLIL_ABS, loc, size, flags, a); +} + + ExprId LowLevelILFunction::SignExtend(size_t size, ExprId a, uint32_t flags, const ILSourceLocation& loc) { return AddExprWithLocation(LLIL_SX, loc, size, flags, a); |
