1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-12 08:30:05 +00:00

Add TRAP suffix, disambiguate RTR and RTE.

This commit is contained in:
Thomas Harte 2022-04-22 14:24:12 -04:00
parent 3a42b0ac3d
commit 821b5358ea

View File

@ -1049,7 +1049,9 @@ struct ProcessorStorageConstructor {
DirectMap(DIVU); DirectMap(DIVU);
DirectMap(DIVS); DirectMap(DIVS);
case Operation::RTE_RTR: opname = "RTE/RTR"; break; case Operation::RTE_RTR:
opname = (opcode_ == 0x4e77) ? "RTR" : "RTE";
break;
DirectMap(TRAP); DirectMap(TRAP);
DirectMap(TRAPV); DirectMap(TRAPV);
@ -1133,6 +1135,8 @@ struct ProcessorStorageConstructor {
} else { } else {
sprintf(tbuf, "%d", val); sprintf(tbuf, "%d", val);
} }
} else if(operation_ == Operation::TRAP) {
sprintf(tbuf, "%d", opcode_ & 15);
} else { } else {
const auto val = ((opcode_ >> 9)&7); const auto val = ((opcode_ >> 9)&7);
sprintf(tbuf, "%d", val ? val : 8); sprintf(tbuf, "%d", val ? val : 8);
@ -3307,6 +3311,7 @@ struct ProcessorStorageConstructor {
break; break;
case Decoder::TRAP: { case Decoder::TRAP: {
dumper.set_source(Quick);
// TRAP involves some oddly-sequenced stack writes, so is calculated // TRAP involves some oddly-sequenced stack writes, so is calculated
// at runtime; also the same sequence is used for illegal instructions. // at runtime; also the same sequence is used for illegal instructions.
// So the entirety is scheduled at runtime. // So the entirety is scheduled at runtime.