mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-18 16:30:29 +00:00
Eliminate redundant CMPSD, CDQ, CWDE.
Also removes IBTS for now, as I'm unclear where it should sit in the opcode map.
This commit is contained in:
parent
fd4f85eb19
commit
1725894fe9
@ -301,7 +301,7 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
|
|||||||
case 0x96: Complete(XCHG, eAX, eSI, data_size_); break;
|
case 0x96: Complete(XCHG, eAX, eSI, data_size_); break;
|
||||||
case 0x97: Complete(XCHG, eAX, eDI, data_size_); break;
|
case 0x97: Complete(XCHG, eAX, eDI, data_size_); break;
|
||||||
|
|
||||||
case 0x98: Complete(CBW, eAX, AH, DataSize::Byte); break;
|
case 0x98: Complete(CBW, eAX, AH, data_size_); break;
|
||||||
case 0x99: Complete(CWD, eAX, eDX, data_size_); break;
|
case 0x99: Complete(CWD, eAX, eDX, data_size_); break;
|
||||||
case 0x9a: Far(CALLfar); break;
|
case 0x9a: Far(CALLfar); break;
|
||||||
case 0x9b: Complete(WAIT, None, None, DataSize::None); break;
|
case 0x9b: Complete(WAIT, None, None, DataSize::None); break;
|
||||||
@ -823,7 +823,9 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
|
|||||||
default: undefined();
|
default: undefined();
|
||||||
|
|
||||||
case 0: operation_ = Operation::SGDT; break;
|
case 0: operation_ = Operation::SGDT; break;
|
||||||
|
case 1: operation_ = Operation::SIDT; break;
|
||||||
case 2: operation_ = Operation::LGDT; break;
|
case 2: operation_ = Operation::LGDT; break;
|
||||||
|
case 3: operation_ = Operation::LIDT; break;
|
||||||
case 4: operation_ = Operation::SMSW; break;
|
case 4: operation_ = Operation::SMSW; break;
|
||||||
case 6: operation_ = Operation::LMSW; break;
|
case 6: operation_ = Operation::LMSW; break;
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,13 @@ enum class Operation: uint8_t {
|
|||||||
/// Decimal adjust after subtraction; source and destination will be AL.
|
/// Decimal adjust after subtraction; source and destination will be AL.
|
||||||
DAS,
|
DAS,
|
||||||
|
|
||||||
/// Convert byte into word; source will be AL, destination will be AH.
|
/// If data size is word, convert byte into word; source will be AL, destination will be AH.
|
||||||
|
/// If data size is DWord, convert word to dword; AX will be expanded to fill EAX.
|
||||||
|
/// In both cases, conversion will be by sign extension.
|
||||||
CBW,
|
CBW,
|
||||||
/// Convert word to double word; source will be AX and destination will be DX.
|
/// If data size is Word, converts word to double word; source will be AX and destination will be DX.
|
||||||
|
/// If data size is DWord, converts double word to quad word (i.e. CDW); source will be EAX and destination will be EDX:EAX.
|
||||||
|
/// In both cases, conversion will be by sign extension.
|
||||||
CWD,
|
CWD,
|
||||||
|
|
||||||
/// Escape, for a coprocessor; perform the bus cycles necessary to read the source and destination and perform a NOP.
|
/// Escape, for a coprocessor; perform the bus cycles necessary to read the source and destination and perform a NOP.
|
||||||
@ -310,17 +314,6 @@ enum class Operation: uint8_t {
|
|||||||
/// Bit test and set.
|
/// Bit test and set.
|
||||||
BTS,
|
BTS,
|
||||||
|
|
||||||
/// Compare string double word.
|
|
||||||
CMPSD,
|
|
||||||
/// [Early 80386s only] Insert bit string.
|
|
||||||
IBTS,
|
|
||||||
|
|
||||||
/// Convert dword to qword; fills EDX with the sign bit of EAX.
|
|
||||||
CDQ,
|
|
||||||
/// Convert word to dword; AX will be expanded to fill EAX.
|
|
||||||
/// Compare and contrast to CWD which would expand AX to DX:AX.
|
|
||||||
CWDE,
|
|
||||||
|
|
||||||
/// Move from the source to the destination, extending the source with zeros.
|
/// Move from the source to the destination, extending the source with zeros.
|
||||||
/// The instruction data size dictates the size of the source; the destination will
|
/// The instruction data size dictates the size of the source; the destination will
|
||||||
/// be either 16- or 32-bit depending on the current processor operating mode.
|
/// be either 16- or 32-bit depending on the current processor operating mode.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user