From d15276557c65de2a1941632ec9024dea261cce26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20B=C3=B6hm?= Date: Tue, 7 Jul 2009 09:46:27 +0200 Subject: make instruction 64-bit wide to support more than 32 registers --- src/emu/opc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/emu/opc.c') 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) -- cgit v1.2.3