Fix RTE popping the format word as a long

This commit is contained in:
pjht 2023-11-06 12:19:15 -06:00
parent 2110bfbab8
commit c607697b7a
Signed by: pjht
GPG Key ID: CA239FC6934E6F3A

View File

@ -626,7 +626,7 @@ impl M68K {
Instruction::Rte => { Instruction::Rte => {
self.sr = self.pop(Size::Word)? as u16; self.sr = self.pop(Size::Word)? as u16;
self.pc = self.pop(Size::Long)?; self.pc = self.pop(Size::Long)?;
let format = (self.pop(Size::Long)? & 0xf000) >> 12; let format = (self.pop(Size::Word)? & 0xf000) >> 12;
if format == 8 { if format == 8 {
let special_status_word = self.pop(Size::Long)?; let special_status_word = self.pop(Size::Long)?;
let fault_address = self.pop(Size::Long)?; let fault_address = self.pop(Size::Long)?;