chore: rust-fmt

Former-commit-id: 8bb31056864e64bcad6877f3c2c1000464cce82e
This commit is contained in:
Michel Heily 2020-02-07 17:16:52 +02:00
parent 374c429d16
commit 984cb2f0c4
2 changed files with 8 additions and 6 deletions

View file

@ -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"),
}
}

View file

@ -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() {