mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Implement LEA.
This commit is contained in:
parent
cf846f501a
commit
da029ee344
@ -812,6 +812,17 @@ void ld(
|
||||
}
|
||||
}
|
||||
|
||||
template <Model model, typename IntT, typename InstructionT, typename MemoryT, typename RegistersT>
|
||||
void lea(
|
||||
InstructionT &instruction,
|
||||
IntT &destination,
|
||||
MemoryT &memory,
|
||||
RegistersT ®isters
|
||||
) {
|
||||
// TODO: address size.
|
||||
destination = IntT(address<model, uint16_t>(instruction, instruction.source(), registers, memory));
|
||||
}
|
||||
|
||||
template <typename FlowControllerT>
|
||||
void int_(uint8_t vector, FlowControllerT &flow_controller) {
|
||||
flow_controller.interrupt(vector);
|
||||
@ -1006,6 +1017,8 @@ template <
|
||||
case Operation::LDS: if constexpr (data_size == DataSize::Word) Primitive::ld<model, Source::DS>(instruction, destination(), memory, registers); return;
|
||||
case Operation::LES: if constexpr (data_size == DataSize::Word) Primitive::ld<model, Source::ES>(instruction, destination(), memory, registers); return;
|
||||
|
||||
case Operation::LEA: Primitive::lea<model>(instruction, destination(), memory, registers); return;
|
||||
|
||||
case Operation::JO: jcc(status.condition<Condition::Overflow>()); return;
|
||||
case Operation::JNO: jcc(!status.condition<Condition::Overflow>()); return;
|
||||
case Operation::JB: jcc(status.condition<Condition::Below>()); return;
|
||||
|
@ -374,11 +374,11 @@ struct FailedExecution {
|
||||
|
||||
@"9E.json.gz", // SAHF
|
||||
@"9F.json.gz", // LAHF
|
||||
*/
|
||||
|
||||
@"C5.json.gz", // LDS
|
||||
@"C4.json.gz", // LES
|
||||
|
||||
// TODO: LEA
|
||||
*/
|
||||
@"8D.json.gz", // LEA
|
||||
|
||||
// TODO: CMPS, LODS, MOVS, SCAS, STOS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user