feat(cpu): use actual fetch regions for boundary bus snapshots
This commit is contained in:
parent
f2c532f8f6
commit
0a696ea3e7
14 changed files with 465 additions and 28 deletions
|
|
@ -396,11 +396,12 @@ impl Memory {
|
|||
}
|
||||
}
|
||||
self.drive_iwram_fetch(fetch);
|
||||
let same_region = fetch.address >> 24 == pc >> 24;
|
||||
// The newly accessed bus supplies the snapshot, even across a region boundary.
|
||||
// Unknown local lanes and unavailable/unsupported fetch observations stay diagnostic.
|
||||
let prefetch = match instruction_set {
|
||||
InstructionSet::Arm => fetch.bus_word,
|
||||
InstructionSet::Thumb if !same_region => None,
|
||||
InstructionSet::Thumb if pc >> 24 == 3 => self.iwram_bus.snapshot(),
|
||||
InstructionSet::Thumb if fetch.instruction.is_err() => None,
|
||||
InstructionSet::Thumb if fetch.address >> 24 == 3 => self.iwram_bus.snapshot(),
|
||||
InstructionSet::Thumb => fetch.bus_word,
|
||||
};
|
||||
self.cpu_access = Some(CpuAccess { pc, prefetch });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue