1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-12-11 20:21:50 +00:00

Add SLDT.

This commit is contained in:
Thomas Harte
2025-05-12 23:17:34 -04:00
parent 61469f8e09
commit 159f3cb780
4 changed files with 29 additions and 0 deletions

View File

@@ -347,6 +347,7 @@ template <
assert(false);
}
break;
case Operation::SIDT:
if constexpr (ContextT::model >= Model::i80286) {
Primitive::sdt<DescriptorTable::Interrupt, AddressT>(source_indirect(), instruction, context);
@@ -361,6 +362,16 @@ template <
assert(false);
}
break;
case Operation::SLDT:
// TODO:
// "When the destination operand is a memory location, the segment selector is written to memory as a
// 16-bit quantity, regardless of the operand size."
if constexpr (ContextT::model >= Model::i80286) {
Primitive::sldt<IntT>(destination_w(), context);
} else {
assert(false);
}
break;
case Operation::JO: jcc(context.flags.template condition<Condition::Overflow>()); return;
case Operation::JNO: jcc(!context.flags.template condition<Condition::Overflow>()); return;