1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-26 19:17:52 +00:00

These are likely to be useful outside of the decoder.

This commit is contained in:
Thomas Harte
2022-03-21 10:41:17 -04:00
parent 0b6828c895
commit 77bdaf3c78
2 changed files with 16 additions and 16 deletions
+12 -12
View File
@@ -23,6 +23,18 @@ enum class Model {
MPC620,
};
constexpr bool is64bit(Model model) {
return model == Model::MPC620;
}
constexpr bool is32bit(Model model) {
return !is64bit(model);
}
constexpr bool is601(Model model) {
return model == Model::MPC601;
}
/*!
Implements PowerPC instruction decoding.
@@ -36,18 +48,6 @@ struct Decoder {
private:
Model model_;
bool is64bit() const {
return model_ == Model::MPC620;
}
bool is32bit() const {
return !is64bit();
}
bool is601() const {
return model_ == Model::MPC601;
}
};
}