diff options
author | bd <bdunahu@operationnull.com> | 2025-03-29 02:36:38 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-29 02:36:38 -0400 |
commit | bc47d9131869b1f072e21d9cb61746d14bf30751 (patch) | |
tree | 3da9c04aa06f606d729c6267248966cd17ea7c63 /inc/instr.h | |
parent | b06f7b0546d679958153263e15ea857659819499 (diff) |
get_instr_fields return mnemonic rather than opcode and type
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 |