Fix writeback for Thumb LdmStm

Former-commit-id: 00a15dc99716290da7b260b261090454d621ce8a
This commit is contained in:
Michel Heily 2019-07-09 02:20:32 +03:00
parent 65de0c4e9d
commit 92f65794d8
2 changed files with 6 additions and 1 deletions

View file

@ -375,6 +375,8 @@ impl Core {
} }
} }
self.gpr[rb] = addr as u32;
Ok(CpuPipelineAction::IncPC) Ok(CpuPipelineAction::IncPC)
} }

View file

@ -219,7 +219,10 @@ impl ThumbInstruction {
} }
pub fn rb(&self) -> usize { pub fn rb(&self) -> usize {
self.raw.bit_range(3..6) as usize match self.fmt {
ThumbFormat::LdmStm => self.raw.bit_range(8..11) as usize,
_ => self.raw.bit_range(3..6) as usize,
}
} }
pub fn ro(&self) -> usize { pub fn ro(&self) -> usize {