1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-07 08:28:57 +00:00

Resolve wrong-headed mapping of LEA to MOVEAl.

This commit is contained in:
Thomas Harte 2022-04-19 19:36:21 -04:00
parent 2707887a65
commit 343a8e0192
3 changed files with 3 additions and 7 deletions

View File

@ -80,8 +80,6 @@ constexpr Operation Predecoder<model>::operation(OpT op) {
case BCLRI: return Operation::BCLR;
case BSETI: return Operation::BSET;
case LEA: return Operation::MOVEAl;
#define ImmediateGroup(x) \
case x##Ib: return Operation::x##b; \
case x##Iw: return Operation::x##w; \
@ -400,7 +398,7 @@ template <uint8_t op, bool validate> Preinstruction Predecoder<model>::decode(ui
// b9b11: destination address register;
// b0b2 and b3b5: source effective address.
//
case LEA:
case OpT(Operation::LEA):
return validated<op, validate>(
Preinstruction(operation,
combined_mode(ea_mode, ea_register), ea_register,
@ -822,7 +820,7 @@ Preinstruction Predecoder<model>::decode4(uint16_t instruction) {
}
switch(instruction & 0x1c0) {
case 0x1c0: Decode(LEA); // 4-110 (p214)
case 0x1c0: Decode(Op::LEA); // 4-110 (p214)
case 0x180: Decode(Op::CHK); // 4-69 (p173)
default: break;
}

View File

@ -75,8 +75,6 @@ template <Model model> class Predecoder {
BTSTI, BCHGI, BCLRI, BSETI,
LEA,
MOVEq,
};

View File

@ -33,7 +33,7 @@ enum class Operation: uint8_t {
MOVEb, MOVEw, MOVEl,
MOVEAw, MOVEAl,
MOVEq,
PEA,
LEA, PEA,
MOVEtoSR, MOVEfromSR,
MOVEtoCCR,