2022-02-27 16:25:02 +00:00
|
|
|
//
|
|
|
|
// Model.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 27/02/2022.
|
|
|
|
// Copyright © 2022 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2022-02-27 16:25:02 +00:00
|
|
|
|
2023-10-05 21:06:00 +00:00
|
|
|
#include <cstdint>
|
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace InstructionSet::x86 {
|
2022-02-27 16:25:02 +00:00
|
|
|
|
|
|
|
enum class Model {
|
|
|
|
i8086,
|
|
|
|
i80186,
|
|
|
|
i80286,
|
|
|
|
i80386,
|
|
|
|
};
|
|
|
|
|
2022-03-01 22:30:41 +00:00
|
|
|
static constexpr bool is_32bit(Model model) { return model >= Model::i80386; }
|
2022-02-27 16:25:02 +00:00
|
|
|
|
2023-10-05 21:06:00 +00:00
|
|
|
template <bool is_32bit> struct AddressT { using type = uint16_t; };
|
|
|
|
template <> struct AddressT<true> { using type = uint32_t; };
|
|
|
|
|
2022-02-27 16:25:02 +00:00
|
|
|
}
|