mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Implement STOS with one failure.
This commit is contained in:
parent
4efc181f07
commit
c2ebbe5ad9
@ -1402,6 +1402,20 @@ void cmps(const InstructionT &instruction, AddressT &eCX, AddressT &eSI, Address
|
||||
repeat_ene<AddressT>(instruction, status, eCX, flow_controller);
|
||||
}
|
||||
|
||||
template <typename IntT, typename AddressT, typename InstructionT, typename MemoryT, typename FlowControllerT>
|
||||
void scas(const InstructionT &instruction, AddressT &eCX, AddressT &eDI, IntT &eAX, MemoryT &memory, Status &status, FlowControllerT &flow_controller) {
|
||||
if(repetition_over<AddressT>(instruction, eCX)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const IntT rhs = memory.template access<IntT>(Source::ES, eDI);
|
||||
eDI += status.direction<AddressT>() * sizeof(IntT);
|
||||
|
||||
Primitive::sub<false, false>(eAX, rhs, status);
|
||||
|
||||
repeat_ene<AddressT>(instruction, status, eCX, flow_controller);
|
||||
}
|
||||
|
||||
template <typename IntT, typename AddressT, typename InstructionT, typename MemoryT, typename FlowControllerT>
|
||||
void lods(const InstructionT &instruction, AddressT &eCX, AddressT &eSI, IntT &eAX, MemoryT &memory, Status &status, FlowControllerT &flow_controller) {
|
||||
if(repetition_over<AddressT>(instruction, eCX)) {
|
||||
@ -1698,6 +1712,9 @@ template <
|
||||
case Operation::STOS:
|
||||
Primitive::stos<IntT, AddressT>(instruction, eCX(), eDI(), pair_low(), memory, status, flow_controller);
|
||||
break;
|
||||
case Operation::SCAS:
|
||||
Primitive::scas<IntT, AddressT>(instruction, eCX(), eDI(), pair_low(), memory, status, flow_controller);
|
||||
break;
|
||||
}
|
||||
|
||||
// Write to memory if required to complete this operation.
|
||||
|
@ -414,6 +414,9 @@ struct FailedExecution {
|
||||
|
||||
// STOS
|
||||
@"AA.json.gz", @"AB.json.gz",
|
||||
|
||||
// SCAS
|
||||
@"AE.json.gz", @"AF.json.gz",
|
||||
/*
|
||||
@"E0.json.gz", // LOOPNE
|
||||
@"E1.json.gz", // LOOPE
|
||||
|
Loading…
x
Reference in New Issue
Block a user