mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-27 00:30:26 +00:00
LEA implies a word. Otherwise add TODOs.
So that's now 69 failures.
This commit is contained in:
parent
f16ac603f2
commit
cd072e1b57
@ -716,6 +716,8 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
|
|||||||
case ModRegRMFormat::MemReg_Seg:
|
case ModRegRMFormat::MemReg_Seg:
|
||||||
// The 16-bit chips have four segment registers;
|
// The 16-bit chips have four segment registers;
|
||||||
// the 80386 onwards has six.
|
// the 80386 onwards has six.
|
||||||
|
|
||||||
|
// TODO: the 8086, at least, decodes something. Probably just the low two bits?
|
||||||
if(!is_32bit(model) && reg > 3) {
|
if(!is_32bit(model) && reg > 3) {
|
||||||
undefined();
|
undefined();
|
||||||
} else if(reg > 5) {
|
} else if(reg > 5) {
|
||||||
|
@ -155,6 +155,7 @@ bool InstructionSet::x86::mnemonic_implies_data_size(Operation operation) {
|
|||||||
case Operation::STOS:
|
case Operation::STOS:
|
||||||
case Operation::JMPrel:
|
case Operation::JMPrel:
|
||||||
case Operation::JMPfar:
|
case Operation::JMPfar:
|
||||||
|
case Operation::LEA:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,9 @@ std::string to_string(InstructionSet::x86::DataPointer pointer, const Instructio
|
|||||||
}
|
}
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case 2:
|
case 2:
|
||||||
|
// TODO: this mismatches some tests because it doesn't eliminate sign extensions.
|
||||||
|
// But when is it permissible to eliminate sign extensions? Always for now, and deal
|
||||||
|
// with it when testing actual execution?
|
||||||
if(!(instruction.offset() & 0xff00)) {
|
if(!(instruction.offset() & 0xff00)) {
|
||||||
stream << '+' << to_hex(instruction.offset(), 2);
|
stream << '+' << to_hex(instruction.offset(), 2);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user