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.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Model_h
|
|
|
|
#define Model_h
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Model_h */
|