diff --git a/InstructionSets/x86/Implementation/PerformImplementation.hpp b/InstructionSets/x86/Implementation/PerformImplementation.hpp index 691a13b83..484865917 100644 --- a/InstructionSets/x86/Implementation/PerformImplementation.hpp +++ b/InstructionSets/x86/Implementation/PerformImplementation.hpp @@ -812,6 +812,17 @@ void ld( } } +template +void lea( + InstructionT &instruction, + IntT &destination, + MemoryT &memory, + RegistersT ®isters +) { + // TODO: address size. + destination = IntT(address(instruction, instruction.source(), registers, memory)); +} + template 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(instruction, destination(), memory, registers); return; case Operation::LES: if constexpr (data_size == DataSize::Word) Primitive::ld(instruction, destination(), memory, registers); return; + case Operation::LEA: Primitive::lea(instruction, destination(), memory, registers); return; + case Operation::JO: jcc(status.condition()); return; case Operation::JNO: jcc(!status.condition()); return; case Operation::JB: jcc(status.condition()); return; diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index 81a260344..def26027e 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -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