diff options
| author | Mark Rowe <mrowe@bdash.net.nz> | 2025-05-27 15:14:22 -0700 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-05-30 19:17:10 -0400 |
| commit | 1e3b9e54fb7947d5b4b46ed01d1dd8a16e7537af (patch) | |
| tree | 81d566f004c3d9f2879e7ee74f3dcf5fe073e3e7 /rust/src/low_level_il/operation.rs | |
| parent | 6e8116614b43097800f0e7b493260c4aaadd7c29 (diff) | |
[Rust] Add support for LLIL_SEPARATE_PARAM_LIST_SSA
Diffstat (limited to 'rust/src/low_level_il/operation.rs')
| -rw-r--r-- | rust/src/low_level_il/operation.rs | 30 |
1 files changed, 30 insertions, 0 deletions
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<LowLevelILExpression<'func, M, F, ValueExpr>> { + self.get_operand_list(0) + .into_iter() + .map(|val| LowLevelExpressionIndex(val as usize)) + .map(|expr_idx| LowLevelILExpression::new(self.function, expr_idx)) + .collect() + } +} + +impl<M, F> 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 {} |
