From 4180c31fda63b6ccb9ce4ee543031fe4a5060d5f Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sat, 10 May 2025 17:29:24 -0400 Subject: [Rust] Add Assert and ForceVersion LLIL operations --- rust/src/low_level_il/instruction.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'rust/src/low_level_il/instruction.rs') diff --git a/rust/src/low_level_il/instruction.rs b/rust/src/low_level_il/instruction.rs index 90d2f1d8..19b721af 100644 --- a/rust/src/low_level_il/instruction.rs +++ b/rust/src/low_level_il/instruction.rs @@ -240,6 +240,10 @@ where Bp(Operation<'func, M, F, operation::NoArgs>), Trap(Operation<'func, M, F, operation::Trap>), Undef(Operation<'func, M, F, operation::NoArgs>), + Assert(Operation<'func, M, F, operation::Assert>), + AssertSsa(Operation<'func, M, F, operation::AssertSsa>), + ForceVersion(Operation<'func, M, F, operation::ForceVersion>), + ForceVersionSsa(Operation<'func, M, F, operation::ForceVersionSsa>), /// The instruction is an expression. Value(LowLevelILExpression<'func, M, F, ValueExpr>), @@ -332,6 +336,18 @@ where LLIL_UNDEF => { LowLevelILInstructionKind::Undef(Operation::new(function, op, expr_index)) } + LLIL_ASSERT => { + LowLevelILInstructionKind::Assert(Operation::new(function, op, expr_index)) + } + LLIL_ASSERT_SSA => { + LowLevelILInstructionKind::AssertSsa(Operation::new(function, op, expr_index)) + } + LLIL_FORCE_VER => { + LowLevelILInstructionKind::ForceVersion(Operation::new(function, op, expr_index)) + } + LLIL_FORCE_VER_SSA => { + LowLevelILInstructionKind::ForceVersionSsa(Operation::new(function, op, expr_index)) + } _ => LowLevelILInstructionKind::Value(LowLevelILExpression::new(function, expr_index)), } } @@ -384,7 +400,8 @@ where } Value(e) => visit!(e), // Do not have any sub expressions. - Nop(_) | NoRet(_) | Goto(_) | Syscall(_) | Bp(_) | Trap(_) | Undef(_) => {} + Nop(_) | NoRet(_) | Goto(_) | Syscall(_) | Bp(_) | Trap(_) | Undef(_) | Assert(_) + | AssertSsa(_) | ForceVersion(_) | ForceVersionSsa(_) => {} } VisitorAction::Sibling -- cgit v1.3.1