From 2b05272e4f369bb261eea72832696496cfabd6a0 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 9 Aug 2024 13:28:14 -0700 Subject: Add LLIL_EXTERN_PTR to rust api --- rust/src/llil/expression.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rust/src/llil/expression.rs') diff --git a/rust/src/llil/expression.rs b/rust/src/llil/expression.rs index 4339787b..94fd52ed 100644 --- a/rust/src/llil/expression.rs +++ b/rust/src/llil/expression.rs @@ -98,6 +98,8 @@ where LLIL_CONST => ExprInfo::Const(Operation::new(function, op)), LLIL_CONST_PTR => ExprInfo::ConstPtr(Operation::new(function, op)), + LLIL_EXTERN_PTR => ExprInfo::ExternPtr(Operation::new(function, op)), + LLIL_ADD => ExprInfo::Add(Operation::new(function, op)), LLIL_ADC => ExprInfo::Adc(Operation::new(function, op)), LLIL_SUB => ExprInfo::Sub(Operation::new(function, op)), @@ -392,6 +394,7 @@ where ConstPtr(Operation<'func, A, M, F, operation::Const>), Flag(Operation<'func, A, M, F, operation::Flag>), FlagBit(Operation<'func, A, M, F, operation::FlagBit>), + ExternPtr(Operation<'func, A, M, F, operation::Extern>), Add(Operation<'func, A, M, F, operation::BinaryOp>), Adc(Operation<'func, A, M, F, operation::BinaryOpCarry>), @@ -608,6 +611,8 @@ where Const(ref op) | ConstPtr(ref op) => &op.op, + ExternPtr(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) @@ -663,6 +668,8 @@ where Const(ref op) | ConstPtr(ref op) => op.flag_write(), + ExternPtr(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) @@ -775,6 +782,8 @@ where Const(ref op) | ConstPtr(ref op) => write!(f, "0x{:x}", op.value()), + ExternPtr(ref op) => write!(f, "0x{:x}", op.value()), + Adc(ref op) | Sbb(ref op) | Rlc(ref op) | Rrc(ref op) => { let left = op.left(); let right = op.right(); -- cgit v1.3.1