diff options
Diffstat (limited to 'inc/instr.h')
-rw-r--r-- | inc/instr.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/inc/instr.h b/inc/instr.h index 98ecf1d..08b4fd0 100644 --- a/inc/instr.h +++ b/inc/instr.h @@ -2,7 +2,7 @@ #define INSTR_H #include <functional> #include <iostream> -#include <map> +#include <unordered_map> enum Mnemonic { ADD, @@ -42,15 +42,14 @@ enum Mnemonic { BOF, PUSH, POP, + NOP, }; -std::ostream &operator<<(std::ostream &os, Mnemonic a); - namespace instr { // clang-format off - extern const std::map<unsigned int, Mnemonic> mnemonic_map; - extern const std::map<Mnemonic, std::function<void(signed int &s1, signed int &s2, signed int &s3)>> instr_map; + extern const std::unordered_map<unsigned int, Mnemonic> mnemonic_map; + extern const std::unordered_map<Mnemonic, std::function<void(signed int &s1, signed int &s2, signed int &s3)>> instr_map; // clang-format on } // namespace instr |