summaryrefslogtreecommitdiff
path: root/rust/src/architecture.rs
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2024-05-24 16:09:43 -0400
committerRyan Snyder <ryan@vector35.com>2024-05-24 17:14:46 -0400
commit08a1e68f7dbf4671ec53538e874162998b249f0c (patch)
treef393b38c532ef883b5fbf26f22f3e9def0147d0a /rust/src/architecture.rs
parent56115aecf186bc720dae9a20cc4c6aef248ba07f (diff)
arch: multiple delay slot support, suppress spurious mips warning
Diffstat (limited to 'rust/src/architecture.rs')
-rw-r--r--rust/src/architecture.rs8
1 files changed, 4 insertions, 4 deletions
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 {