diff options
author | 2008-06-06 17:13:53 +0000 | |
---|---|---|
committer | 2008-06-06 17:13:53 +0000 | |
commit | 40d2b88ef51cef0f82beb3e0720fc9e88d1e5988 (patch) | |
tree | b0463125043ddfa3ebca54825f83acc3b236cced /src | |
parent | e40a5aa32d3c72c3f5827e1b17a0b037cab2afd4 (diff) |
UML:
* Added NOP opcode
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/cpu/drcbec.c | 5 | ||||
-rw-r--r-- | src/emu/cpu/drcbex64.c | 13 | ||||
-rw-r--r-- | src/emu/cpu/drcbex86.c | 13 | ||||
-rw-r--r-- | src/emu/cpu/drcuml.c | 1 | ||||
-rw-r--r-- | src/emu/cpu/drcuml.h | 1 | ||||
-rw-r--r-- | src/emu/cpu/drcumlsh.h | 1 |
6 files changed, 32 insertions, 2 deletions
diff --git a/src/emu/cpu/drcbec.c b/src/emu/cpu/drcbec.c index 5401172718f..e74636d90a6 100644 --- a/src/emu/cpu/drcbec.c +++ b/src/emu/cpu/drcbec.c @@ -415,8 +415,9 @@ static void drcbec_generate(drcbe_state *drcbe, drcuml_block *block, const drcum drclabel_set_codeptr(drcbe->labels, inst->param[0].value, (drccodeptr)dst); break; - /* ignore COMMENT opcodes */ + /* ignore COMMENT and NOP opcodes */ case DRCUML_OP_COMMENT: + case DRCUML_OP_NOP: break; /* when we hit a MAPVAR opcode, log the change for the current PC */ @@ -435,7 +436,7 @@ static void drcbec_generate(drcbe_state *drcbe, drcuml_block *block, const drcum dst->inst = (drcbec_instruction *)drclabel_get_codeptr(drcbe->labels, inst->param[0].value, fixup_label, dst); dst++; break; - + /* generically handle everything else */ default: diff --git a/src/emu/cpu/drcbex64.c b/src/emu/cpu/drcbex64.c index 1c4b81687dc..b1a4df88dea 100644 --- a/src/emu/cpu/drcbex64.c +++ b/src/emu/cpu/drcbex64.c @@ -389,6 +389,7 @@ static x86code *op_label(drcbe_state *drcbe, x86code *dst, const drcuml_instruct static x86code *op_comment(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_mapvar(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); +static x86code *op_nop(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_debug(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_exit(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_hashjmp(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); @@ -472,6 +473,7 @@ static const opcode_table_entry opcode_table_source[] = { DRCUML_OP_MAPVAR, op_mapvar }, /* MAPVAR mapvar,value */ /* Control Flow Operations */ + { DRCUML_OP_NOP, op_nop }, /* NOP */ { DRCUML_OP_DEBUG, op_debug }, /* DEBUG pc */ { DRCUML_OP_EXIT, op_exit }, /* EXIT src1[,c] */ { DRCUML_OP_HASHJMP, op_hashjmp }, /* HASHJMP mode,pc,handle */ @@ -3069,6 +3071,17 @@ static x86code *op_mapvar(drcbe_state *drcbe, x86code *dst, const drcuml_instruc ***************************************************************************/ /*------------------------------------------------- + op_nop - process a NOP opcode +-------------------------------------------------*/ + +static x86code *op_nop(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst) +{ + /* nothing */ + return dst; +} + + +/*------------------------------------------------- op_debug - process a DEBUG opcode -------------------------------------------------*/ diff --git a/src/emu/cpu/drcbex86.c b/src/emu/cpu/drcbex86.c index a4d7ae46d5d..f732ff115d6 100644 --- a/src/emu/cpu/drcbex86.c +++ b/src/emu/cpu/drcbex86.c @@ -275,6 +275,7 @@ static x86code *op_label(drcbe_state *drcbe, x86code *dst, const drcuml_instruct static x86code *op_comment(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_mapvar(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); +static x86code *op_nop(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_debug(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_exit(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); static x86code *op_hashjmp(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst); @@ -358,6 +359,7 @@ static const opcode_table_entry opcode_table_source[] = { DRCUML_OP_MAPVAR, op_mapvar }, /* MAPVAR mapvar,value */ /* Control Flow Operations */ + { DRCUML_OP_NOP, op_nop }, /* NOP */ { DRCUML_OP_DEBUG, op_debug }, /* DEBUG pc */ { DRCUML_OP_EXIT, op_exit }, /* EXIT src1[,c] */ { DRCUML_OP_HASHJMP, op_hashjmp }, /* HASHJMP mode,pc,handle */ @@ -3120,6 +3122,17 @@ static x86code *op_mapvar(drcbe_state *drcbe, x86code *dst, const drcuml_instruc ***************************************************************************/ /*------------------------------------------------- + op_nop - process a NOP opcode +-------------------------------------------------*/ + +static x86code *op_nop(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst) +{ + /* nothing */ + return dst; +} + + +/*------------------------------------------------- op_debug - process a DEBUG opcode -------------------------------------------------*/ diff --git a/src/emu/cpu/drcuml.c b/src/emu/cpu/drcuml.c index 451aec05e3f..62758af7589 100644 --- a/src/emu/cpu/drcuml.c +++ b/src/emu/cpu/drcuml.c @@ -192,6 +192,7 @@ static const drcuml_opcode_info opcode_info_source[] = OPINFO2(MAPVAR, "mapvar", 4, FALSE, NONE, NONE, NONE, PINFO(OUT, OP, MVAR), PINFO(IN, OP, IMV)) /* Control Flow Operations */ + OPINFO0(NOP, "nop", 4, FALSE, NONE, NONE, NONE) OPINFO1(DEBUG, "debug", 4, FALSE, NONE, NONE, ALL, PINFO(IN, OP, IANY)) OPINFO1(EXIT, "exit", 4, TRUE, NONE, NONE, ALL, PINFO(IN, OP, IANY)) OPINFO3(HASHJMP, "hashjmp", 4, FALSE, NONE, NONE, ALL, PINFO(IN, OP, IANY), PINFO(IN, OP, IANY), PINFO(IN, OP, HAND)) diff --git a/src/emu/cpu/drcuml.h b/src/emu/cpu/drcuml.h index fd0d13e9267..ef01362925c 100644 --- a/src/emu/cpu/drcuml.h +++ b/src/emu/cpu/drcuml.h @@ -193,6 +193,7 @@ enum _drcuml_opcode DRCUML_OP_MAPVAR, /* MAPVAR mapvar,value */ /* Control Flow Operations */ + DRCUML_OP_NOP, /* NOP */ DRCUML_OP_DEBUG, /* DEBUG pc */ DRCUML_OP_EXIT, /* EXIT src1[,c] */ DRCUML_OP_HASHJMP, /* HASHJMP mode,pc,handle */ diff --git a/src/emu/cpu/drcumlsh.h b/src/emu/cpu/drcumlsh.h index e6196fd277f..2a9a3f3c941 100644 --- a/src/emu/cpu/drcumlsh.h +++ b/src/emu/cpu/drcumlsh.h @@ -76,6 +76,7 @@ /* ----- Control Flow Operations ----- */ +#define UML_NOP(block) do { drcuml_block_append_0(block, DRCUML_OP_NOP, 4, IF_ALWAYS); } while (0) #define UML_DEBUG(block, pc) do { drcuml_block_append_1(block, DRCUML_OP_DEBUG, 4, IF_ALWAYS, pc); } while (0) #define UML_EXIT(block, param) do { drcuml_block_append_1(block, DRCUML_OP_EXIT, 4, IF_ALWAYS, param); } while (0) #define UML_EXITc(block, cond, param) do { drcuml_block_append_1(block, DRCUML_OP_EXIT, 4, cond, param); } while (0) |