diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-30 17:38:40 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | c3fdda9727f5507818e3f55576ad32215a22b0f9 (patch) | |
| tree | d522025055eb7253c7f2cb94732402aacf2afbfc /arch/msp430/src | |
| parent | c3f344a38ca4b027b4e69b0f82d3184622d6da79 (diff) | |
[Rust] Remove Architecture trait bound on LLIL related structures
Diffstat (limited to 'arch/msp430/src')
| -rw-r--r-- | arch/msp430/src/architecture.rs | 6 | ||||
| -rw-r--r-- | arch/msp430/src/lift.rs | 11 | ||||
| -rw-r--r-- | arch/msp430/src/register.rs | 6 |
3 files changed, 9 insertions, 14 deletions
diff --git a/arch/msp430/src/architecture.rs b/arch/msp430/src/architecture.rs index ccc5ce80..e5815c91 100644 --- a/arch/msp430/src/architecture.rs +++ b/arch/msp430/src/architecture.rs @@ -194,7 +194,7 @@ impl Architecture for Msp430 { &self, data: &[u8], addr: u64, - il: &mut MutableLiftedILFunction<Self>, + il: &mut MutableLiftedILFunction, ) -> Option<(usize, bool)> { match msp430_asm::decode(data) { Ok(inst) => { @@ -226,8 +226,8 @@ impl Architecture for Msp430 { fn flag_group_llil<'a>( &self, _group: Self::FlagGroup, - _il: &'a mut MutableLiftedILFunction<Self>, - ) -> Option<MutableLiftedILExpr<'a, Self, ValueExpr>> { + _il: &'a mut MutableLiftedILFunction, + ) -> Option<MutableLiftedILExpr<'a, ValueExpr>> { None } diff --git a/arch/msp430/src/lift.rs b/arch/msp430/src/lift.rs index 6ad7b67b..124911f0 100644 --- a/arch/msp430/src/lift.rs +++ b/arch/msp430/src/lift.rs @@ -1,7 +1,6 @@ use crate::architecture::offset_to_absolute; use crate::flag::{Flag, FlagWrite}; use crate::register::Register; -use crate::Msp430; use binaryninja::{architecture::FlagCondition, low_level_il::lifting::LowLevelILLabel}; @@ -164,11 +163,7 @@ macro_rules! conditional_jump { }; } -pub(crate) fn lift_instruction( - inst: &Instruction, - addr: u64, - il: &MutableLiftedILFunction<Msp430>, -) { +pub(crate) fn lift_instruction(inst: &Instruction, addr: u64, il: &MutableLiftedILFunction) { match inst { Instruction::Rrc(inst) => { let size = match inst.operand_width() { @@ -628,8 +623,8 @@ pub(crate) fn lift_instruction( fn lift_source_operand<'a>( operand: &Operand, size: usize, - il: &'a MutableLiftedILFunction<Msp430>, -) -> MutableLiftedILExpr<'a, Msp430, ValueExpr> { + il: &'a MutableLiftedILFunction, +) -> MutableLiftedILExpr<'a, ValueExpr> { match operand { Operand::RegisterDirect(r) => il.reg(size, Register::try_from(*r as u32).unwrap()), Operand::Indexed((r, offset)) => il diff --git a/arch/msp430/src/register.rs b/arch/msp430/src/register.rs index 0886e537..31339ea0 100644 --- a/arch/msp430/src/register.rs +++ b/arch/msp430/src/register.rs @@ -1,7 +1,7 @@ use binaryninja::architecture; use binaryninja::architecture::{ImplicitRegisterExtend, RegisterId}; -use binaryninja::low_level_il::LowLevelILRegister; +use binaryninja::low_level_il::LowLevelILRegisterKind; use std::borrow::Cow; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] @@ -134,8 +134,8 @@ impl architecture::RegisterInfo for Register { } } -impl From<Register> for LowLevelILRegister<Register> { +impl From<Register> for LowLevelILRegisterKind<Register> { fn from(register: Register) -> Self { - LowLevelILRegister::ArchReg(register) + LowLevelILRegisterKind::Arch(register) } } |
