1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-05 06:05:27 +00:00
CLK/InstructionSets/M68k/Perform.hpp

41 lines
1.1 KiB
C++
Raw Normal View History

//
// Perform.hpp
// Clock Signal
//
// Created by Thomas Harte on 28/04/2022.
// Copyright © 2022 Thomas Harte. All rights reserved.
//
#ifndef InstructionSets_M68k_Perform_h
#define InstructionSets_M68k_Perform_h
#include "Model.hpp"
#include "Instruction.hpp"
#include "Status.hpp"
#include "../../Numeric/RegisterSizes.hpp"
namespace InstructionSet {
namespace M68k {
struct NullFlowController {
void raise_exception(int) {}
void consume_cycles(int) {}
};
/// Performs @c op using @c source and @c dest (which mmay be ignored as per the semantics of the operation).
2022-04-29 11:57:02 +00:00
/// And change in processor status will be applied to @c status. If this operation raises an exception, causes a
/// branch, or consumes additional cycles due to the particular value of the operands (on the 68000, think DIV or MUL),
/// that'll be notified to the @c flow_controller.
template <
Operation op,
Model model,
typename FlowController
> void perform(CPU::RegisterPair32 &source, CPU::RegisterPair32 &dest, Status &status, FlowController &flow_controller);
}
}
2022-04-28 20:55:47 +00:00
#include "Implementation/PerformImplementation.hpp"
#endif /* InstructionSets_M68k_Perform_h */