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 --- architecture.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'architecture.cpp') diff --git a/architecture.cpp b/architecture.cpp index 90d18d06..aa229b4e 100644 --- a/architecture.cpp +++ b/architecture.cpp @@ -34,15 +34,15 @@ InstructionInfo::InstructionInfo() length = 0; archTransitionByTargetAddr = false; branchCount = 0; - branchDelay = false; + delaySlots = 0; } -void InstructionInfo::AddBranch(BNBranchType type, uint64_t target, Architecture* arch, bool hasDelaySlot) +void InstructionInfo::AddBranch(BNBranchType type, uint64_t target, Architecture* arch, uint8_t delaySlot) { if (branchCount >= BN_MAX_INSTRUCTION_BRANCHES) return; - branchDelay = hasDelaySlot; + delaySlots = delaySlot; branchType[branchCount] = type; branchTarget[branchCount] = target; branchArch[branchCount++] = arch ? arch->GetObject() : nullptr; @@ -242,6 +242,7 @@ bool Architecture::GetInstructionInfoCallback( CallbackRef arch(ctxt); InstructionInfo info; + info.delaySlots = result->delaySlots; bool ok = arch->GetInstructionInfo(data, addr, maxLen, info); *result = info; return ok; -- cgit v1.3.1