From 984cb2f0c4a193968be92897c9e90f8792c801d0 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Fri, 7 Feb 2020 17:16:52 +0200 Subject: [PATCH] chore: rust-fmt Former-commit-id: 8bb31056864e64bcad6877f3c2c1000464cce82e --- src/core/arm7tdmi/cpu.rs | 12 +++++++----- src/core/arm7tdmi/thumb/exec.rs | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/arm7tdmi/cpu.rs b/src/core/arm7tdmi/cpu.rs index 111284b..b5b36b1 100644 --- a/src/core/arm7tdmi/cpu.rs +++ b/src/core/arm7tdmi/cpu.rs @@ -106,12 +106,14 @@ impl Core { pub fn set_reg(&mut self, r: usize, val: u32) { match r { 0...14 => self.gpr[r] = val, - 15 => self.pc = { - match self.cpsr.state() { - CpuState::THUMB => val & !1, - CpuState::ARM => val & !3 + 15 => { + self.pc = { + match self.cpsr.state() { + CpuState::THUMB => val & !1, + CpuState::ARM => val & !3, + } } - }, + } _ => panic!("invalid register"), } } diff --git a/src/core/arm7tdmi/thumb/exec.rs b/src/core/arm7tdmi/thumb/exec.rs index b611557..e9b43ba 100644 --- a/src/core/arm7tdmi/thumb/exec.rs +++ b/src/core/arm7tdmi/thumb/exec.rs @@ -231,7 +231,7 @@ impl Core { sb: &mut SysBus, insn: ThumbInstruction, addr: Addr, - is_transferring_bytes: bool + is_transferring_bytes: bool, ) -> CpuExecResult { let rd = (insn.raw & 0b111) as usize; if insn.is_load() {