From 1e3b9e54fb7947d5b4b46ed01d1dd8a16e7537af Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Tue, 27 May 2025 15:14:22 -0700 Subject: [Rust] Add support for LLIL_SEPARATE_PARAM_LIST_SSA --- rust/src/low_level_il/operation.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'rust/src/low_level_il/operation.rs') diff --git a/rust/src/low_level_il/operation.rs b/rust/src/low_level_il/operation.rs index 382b4927..bc8e579e 100644 --- a/rust/src/low_level_il/operation.rs +++ b/rust/src/low_level_il/operation.rs @@ -2111,6 +2111,35 @@ where } } +// LLIL_SEPARATE_PARAM_LIST_SSA +pub struct SeparateParamListSsa; + +impl<'func, M, F> Operation<'func, M, F, SeparateParamListSsa> +where + M: FunctionMutability, + F: FunctionForm, +{ + pub fn param_exprs(&self) -> Vec> { + self.get_operand_list(0) + .into_iter() + .map(|val| LowLevelExpressionIndex(val as usize)) + .map(|expr_idx| LowLevelILExpression::new(self.function, expr_idx)) + .collect() + } +} + +impl Debug for Operation<'_, M, F, SeparateParamListSsa> +where + M: FunctionMutability, + F: FunctionForm, +{ + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.debug_struct("SeparateParamListSsa") + .field("param_exprs", &self.param_exprs()) + .finish() + } +} + // TODO TEST_BIT pub trait OperationArguments: 'static {} @@ -2168,3 +2197,4 @@ impl OperationArguments for Assert {} impl OperationArguments for AssertSsa {} impl OperationArguments for ForceVersion {} impl OperationArguments for ForceVersionSsa {} +impl OperationArguments for SeparateParamListSsa {} -- cgit v1.3.1