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) {
|
pub fn set_reg(&mut self, r: usize, val: u32) {
|
||||||
match r {
|
match r {
|
||||||
0...14 => self.gpr[r] = val,
|
0...14 => self.gpr[r] = val,
|
||||||
15 => self.pc = {
|
15 => {
|
||||||
match self.cpsr.state() {
|
self.pc = {
|
||||||
CpuState::THUMB => val & !1,
|
match self.cpsr.state() {
|
||||||
CpuState::ARM => val & !3
|
CpuState::THUMB => val & !1,
|
||||||
|
CpuState::ARM => val & !3,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
_ => panic!("invalid register"),
|
_ => panic!("invalid register"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,7 +231,7 @@ impl Core {
|
||||||
sb: &mut SysBus,
|
sb: &mut SysBus,
|
||||||
insn: ThumbInstruction,
|
insn: ThumbInstruction,
|
||||||
addr: Addr,
|
addr: Addr,
|
||||||
is_transferring_bytes: bool
|
is_transferring_bytes: bool,
|
||||||
) -> CpuExecResult {
|
) -> CpuExecResult {
|
||||||
let rd = (insn.raw & 0b111) as usize;
|
let rd = (insn.raw & 0b111) as usize;
|
||||||
if insn.is_load() {
|
if insn.is_load() {
|
||||||
|
|
Reference in a new issue