Skip to content

Commit 23be748

Browse files
committed
Remove Architecture trait bound on LLIL related structures in Rust API
1 parent 234bb7e commit 23be748

File tree

23 files changed

+808
-977
lines changed

23 files changed

+808
-977
lines changed

arch/msp430/src/architecture.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl Architecture for Msp430 {
194194
&self,
195195
data: &[u8],
196196
addr: u64,
197-
il: &mut MutableLiftedILFunction<Self>,
197+
il: &mut MutableLiftedILFunction,
198198
) -> Option<(usize, bool)> {
199199
match msp430_asm::decode(data) {
200200
Ok(inst) => {
@@ -226,8 +226,8 @@ impl Architecture for Msp430 {
226226
fn flag_group_llil<'a>(
227227
&self,
228228
_group: Self::FlagGroup,
229-
_il: &'a mut MutableLiftedILFunction<Self>,
230-
) -> Option<MutableLiftedILExpr<'a, Self, ValueExpr>> {
229+
_il: &'a mut MutableLiftedILFunction,
230+
) -> Option<MutableLiftedILExpr<'a, ValueExpr>> {
231231
None
232232
}
233233

arch/msp430/src/lift.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::architecture::offset_to_absolute;
22
use crate::flag::{Flag, FlagWrite};
33
use crate::register::Register;
4-
use crate::Msp430;
54

65
use binaryninja::{architecture::FlagCondition, low_level_il::lifting::LowLevelILLabel};
76

@@ -164,11 +163,7 @@ macro_rules! conditional_jump {
164163
};
165164
}
166165

167-
pub(crate) fn lift_instruction(
168-
inst: &Instruction,
169-
addr: u64,
170-
il: &MutableLiftedILFunction<Msp430>,
171-
) {
166+
pub(crate) fn lift_instruction(inst: &Instruction, addr: u64, il: &MutableLiftedILFunction) {
172167
match inst {
173168
Instruction::Rrc(inst) => {
174169
let size = match inst.operand_width() {
@@ -628,8 +623,8 @@ pub(crate) fn lift_instruction(
628623
fn lift_source_operand<'a>(
629624
operand: &Operand,
630625
size: usize,
631-
il: &'a MutableLiftedILFunction<Msp430>,
632-
) -> MutableLiftedILExpr<'a, Msp430, ValueExpr> {
626+
il: &'a MutableLiftedILFunction,
627+
) -> MutableLiftedILExpr<'a, ValueExpr> {
633628
match operand {
634629
Operand::RegisterDirect(r) => il.reg(size, Register::try_from(*r as u32).unwrap()),
635630
Operand::Indexed((r, offset)) => il

arch/msp430/src/register.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use binaryninja::architecture;
22
use binaryninja::architecture::{ImplicitRegisterExtend, RegisterId};
33

4-
use binaryninja::low_level_il::LowLevelILRegister;
4+
use binaryninja::low_level_il::LowLevelILRegisterKind;
55
use std::borrow::Cow;
66

77
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -134,8 +134,8 @@ impl architecture::RegisterInfo for Register {
134134
}
135135
}
136136

137-
impl From<Register> for LowLevelILRegister<Register> {
137+
impl From<Register> for LowLevelILRegisterKind<Register> {
138138
fn from(register: Register) -> Self {
139-
LowLevelILRegister::ArchReg(register)
139+
LowLevelILRegisterKind::Arch(register)
140140
}
141141
}

arch/riscv/disasm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ impl StandardExtension for ExtensionSupported {
23312331
}
23322332
}
23332333

2334-
pub trait RiscVDisassembler: 'static + Debug + Sized + Copy + Clone + Send + Sync {
2334+
pub trait RiscVDisassembler: 'static + Debug + Sized + Copy + Clone + Send + Sync {
23352335
type RegFile: RegFile;
23362336
type MulDivExtension: StandardExtension;
23372337
type AtomicExtension: StandardExtension;

0 commit comments

Comments
 (0)