From f5b7f5b2779b1b29e14856efd2a2e56a7c3b0113 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 31 Jan 2025 13:02:22 -0500 Subject: Add LLIL_REG_STACK_POP and LLIL_REG_STACK_PUSH to Rust API These were unhandled and x87 register stack LLIL would emit a bunch of warnings --- rust/src/low_level_il/expression.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'rust/src/low_level_il/expression.rs') diff --git a/rust/src/low_level_il/expression.rs b/rust/src/low_level_il/expression.rs index 2fc9f93d..7bae22c1 100644 --- a/rust/src/low_level_il/expression.rs +++ b/rust/src/low_level_il/expression.rs @@ -236,6 +236,8 @@ where FlagBit(Operation<'func, A, M, F, operation::FlagBit>), ExternPtr(Operation<'func, A, M, F, operation::Extern>), + RegStackPop(Operation<'func, A, M, F, operation::RegStackPop>), + Add(Operation<'func, A, M, F, operation::BinaryOp>), Adc(Operation<'func, A, M, F, operation::BinaryOpCarry>), Sub(Operation<'func, A, M, F, operation::BinaryOp>), @@ -357,6 +359,10 @@ where } LLIL_EXTERN_PTR => LowLevelILExpressionKind::ExternPtr(Operation::new(function, op)), + LLIL_REG_STACK_POP => { + LowLevelILExpressionKind::RegStackPop(Operation::new(function, op)) + } + LLIL_ADD => LowLevelILExpressionKind::Add(Operation::new(function, op)), LLIL_ADC => LowLevelILExpressionKind::Adc(Operation::new(function, op)), LLIL_SUB => LowLevelILExpressionKind::Sub(Operation::new(function, op)), @@ -597,7 +603,8 @@ where } // Do not have any sub expressions. Pop(_) | Reg(_) | RegSplit(_) | Const(_) | ConstPtr(_) | Flag(_) | FlagBit(_) - | ExternPtr(_) | FlagCond(_) | FlagGroup(_) | Unimpl(_) | Undef(_) => {} + | ExternPtr(_) | FlagCond(_) | FlagGroup(_) | Unimpl(_) | Undef(_) | RegStackPop(_) => { + } } VisitorAction::Sibling @@ -635,6 +642,8 @@ where ExternPtr(ref op) => &op.op, + RegStackPop(ref op) => &op.op, + Adc(ref op) | Sbb(ref op) | Rlc(ref op) | Rrc(ref op) => &op.op, Add(ref op) | Sub(ref op) | And(ref op) | Or(ref op) | Xor(ref op) | Lsl(ref op) @@ -692,6 +701,8 @@ where ExternPtr(ref op) => op.flag_write(), + RegStackPop(ref op) => op.flag_write(), + Adc(ref op) | Sbb(ref op) | Rlc(ref op) | Rrc(ref op) => op.flag_write(), Add(ref op) | Sub(ref op) | And(ref op) | Or(ref op) | Xor(ref op) | Lsl(ref op) -- cgit v1.3.1