diff options
Diffstat (limited to 'src/emu/opc.c')
-rw-r--r-- | src/emu/opc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/opc.c b/src/emu/opc.c index 3d62479..c9e5f8c 100644 --- a/src/emu/opc.c +++ b/src/emu/opc.c @@ -5,7 +5,7 @@ typedef struct opc_mapping { const char *name; - uint32_t opcode; + inst_t opcode; } opc_mapping_t; opc_mapping_t opc_map[] = { @@ -36,19 +36,19 @@ opc_mapping_t opc_map[] = { { NULL, 0 } }; -uint32_t mnemonic2opc(const char *mnemonic) +inst_t mnemonic2opc(const char *mnemonic) { for (uint8_t i = 0; opc_map[i].name; i++) { if (strcmp(opc_map[i].name, mnemonic) == 0) - return opc_map[i].opcode << 26; + return opc_map[i].opcode << 58; } return ~0; } -const char *opc2mnemonic(uint32_t IR) +const char *opc2mnemonic(inst_t IR) { - uint32_t opcode = IR >> 26; + inst_t opcode = IR >> 58; for (uint8_t i = 0; opc_map[i].name; i++) { if (opc_map[i].opcode == opcode) |