From 08a1e68f7dbf4671ec53538e874162998b249f0c Mon Sep 17 00:00:00 2001 From: Ryan Snyder Date: Fri, 24 May 2024 16:09:43 -0400 Subject: arch: multiple delay slot support, suppress spurious mips warning --- rust/src/architecture.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src') diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 6831844e..11daa71c 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -97,11 +97,11 @@ impl<'a> Iterator for BranchIter<'a> { #[repr(C)] pub struct InstructionInfo(BNInstructionInfo); impl InstructionInfo { - pub fn new(len: usize, branch_delay: bool) -> Self { + pub fn new(len: usize, delay_slots: u8) -> Self { InstructionInfo(BNInstructionInfo { length: len, archTransitionByTargetAddr: false, - branchDelay: branch_delay, + delaySlots: delay_slots, branchCount: 0usize, branchType: [BranchType::UnresolvedBranch; 3], branchTarget: [0u64; 3], @@ -121,8 +121,8 @@ impl InstructionInfo { self.0.branchCount } - pub fn branch_delay(&self) -> bool { - self.0.branchDelay + pub fn delay_slots(&self) -> u8 { + self.0.delaySlots } pub fn branches(&self) -> BranchIter { -- cgit v1.3.1