cpu/lh5801: Don't add PC value twice when disassembling relative addressing modes. (#12999)

This commit is contained in:
goldnchild 2024-11-19 09:32:21 -08:00 committed by GitHub
parent 0adfebca38
commit a249584c49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -623,10 +623,10 @@ offs_t lh5801_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
util::stream_format(stream, "%s %04x", entry->ins_name(),absolut);break;
case RelP:
temp=opcodes.r8(pos++);
util::stream_format(stream, "%s %04x", entry->ins_name(),pc+pos+temp);break;
util::stream_format(stream, "%s %04x", entry->ins_name(),pos+temp);break;
case RelM:
temp=opcodes.r8(pos++);
util::stream_format(stream, "%s %04x", entry->ins_name(),pc+pos-temp);break;
util::stream_format(stream, "%s %04x", entry->ins_name(),pos-temp);break;
case Abs:
absolut=opcodes.r8(pos++)<<8;
absolut|=opcodes.r8(pos++);