diff options
author | Benedikt Böhm <bb@xnull.de> | 2009-07-07 09:46:27 +0200 |
---|---|---|
committer | Benedikt Böhm <bb@xnull.de> | 2009-07-07 09:46:27 +0200 |
commit | d15276557c65de2a1941632ec9024dea261cce26 (patch) | |
tree | a6a71e24e428f40bf2bdc54d2d4efaf4561786c9 /src/emu/opc.c | |
parent | b5d10e72de8d93a232886f069db9791b85c3e332 (diff) | |
download | swppy-d15276557c65de2a1941632ec9024dea261cce26.tar.gz swppy-d15276557c65de2a1941632ec9024dea261cce26.tar.xz swppy-d15276557c65de2a1941632ec9024dea261cce26.zip |
make instruction 64-bit wide to support more than 32 registers
Diffstat (limited to '')
-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) |