optimize/arm: Improve arm instruction condition check.
Obviously AL(always) instructions are the most common, so prioritize checking these first. Former-commit-id: e236f1e116dbf65757a68dda9090645d220a1cee
This commit is contained in:
parent
414c1b0557
commit
d9ce1c7d8d
|
@ -1,6 +1,7 @@
|
|||
use crate::bit::BitIndex;
|
||||
|
||||
use super::super::alu::*;
|
||||
use super::ArmCond;
|
||||
use crate::core::arm7tdmi::psr::RegPSR;
|
||||
use crate::core::arm7tdmi::CpuAction;
|
||||
use crate::core::arm7tdmi::{Addr, Core, CpuMode, CpuState, REG_LR, REG_PC};
|
||||
|
@ -11,10 +12,12 @@ use super::*;
|
|||
|
||||
impl Core {
|
||||
pub fn exec_arm(&mut self, bus: &mut SysBus, insn: ArmInstruction) -> CpuAction {
|
||||
if insn.cond != ArmCond::AL {
|
||||
if !self.check_arm_cond(insn.cond) {
|
||||
self.S_cycle32(bus, self.pc);
|
||||
return CpuAction::AdvancePC;
|
||||
}
|
||||
}
|
||||
match insn.fmt {
|
||||
ArmFormat::BX => self.exec_bx(bus, insn),
|
||||
ArmFormat::B_BL => self.exec_b_bl(bus, insn),
|
||||
|
|
Reference in a new issue