chore: rust-fmt
Former-commit-id: 8bb31056864e64bcad6877f3c2c1000464cce82e
This commit is contained in:
parent
374c429d16
commit
984cb2f0c4
|
@ -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"),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
Reference in a new issue