summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2011-08-25 13:27:13 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2011-08-25 13:27:13 +0000
commitbf52cb255151604ae22c3a1df8c15d315400b5dc (patch)
tree728c83c95ce60aa4b66a4aa529e05b01dee2931d /src
parent044df7903ef39c89d83b028d0672958ba706c957 (diff)
m68k: improved disassembly of CINV and CPUSH [R. Belmont]
Diffstat (limited to 'src')
-rw-r--r--src/emu/cpu/m68000/m68kdasm.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/emu/cpu/m68000/m68kdasm.c b/src/emu/cpu/m68000/m68kdasm.c
index 522fd70a9a4..2628847c849 100644
--- a/src/emu/cpu/m68000/m68kdasm.c
+++ b/src/emu/cpu/m68000/m68kdasm.c
@@ -1336,17 +1336,19 @@ static void d68040_cinv(void)
LIMIT_CPU_TYPES(M68040_PLUS);
switch((g_cpu_ir>>3)&3)
{
+ static const char *cachetype[4] = { "nop", "data", "inst", "both" };
+
case 0:
sprintf(g_dasm_str, "cinv (illegal scope); (4)");
break;
case 1:
- sprintf(g_dasm_str, "cinvl %d, (A%d); (4)", (g_cpu_ir>>6)&3, g_cpu_ir&7);
+ sprintf(g_dasm_str, "cinvl %s, (A%d); (4)", cachetype[(g_cpu_ir>>6)&3], g_cpu_ir&7);
break;
case 2:
- sprintf(g_dasm_str, "cinvp %d, (A%d); (4)", (g_cpu_ir>>6)&3, g_cpu_ir&7);
+ sprintf(g_dasm_str, "cinvp %s, (A%d); (4)", cachetype[(g_cpu_ir>>6)&3], g_cpu_ir&7);
break;
case 3:
- sprintf(g_dasm_str, "cinva %d; (4)", (g_cpu_ir>>6)&3);
+ sprintf(g_dasm_str, "cinva %s; (4)", cachetype[(g_cpu_ir>>6)&3]);
break;
}
}
@@ -1580,6 +1582,8 @@ static void d68020_cptrapcc_32(void)
static void d68040_cpush(void)
{
+ static const char *cachetype[4] = { "nop", "data", "inst", "both" };
+
LIMIT_CPU_TYPES(M68040_PLUS);
switch((g_cpu_ir>>3)&3)
{
@@ -1587,13 +1591,13 @@ static void d68040_cpush(void)
sprintf(g_dasm_str, "cpush (illegal scope); (4)");
break;
case 1:
- sprintf(g_dasm_str, "cpushl %d, (A%d); (4)", (g_cpu_ir>>6)&3, g_cpu_ir&7);
+ sprintf(g_dasm_str, "cpushl %s, (A%d); (4)", cachetype[(g_cpu_ir>>6)&3], g_cpu_ir&7);
break;
case 2:
- sprintf(g_dasm_str, "cpushp %d, (A%d); (4)", (g_cpu_ir>>6)&3, g_cpu_ir&7);
+ sprintf(g_dasm_str, "cpushp %s, (A%d); (4)", cachetype[(g_cpu_ir>>6)&3], g_cpu_ir&7);
break;
case 3:
- sprintf(g_dasm_str, "cpusha %d; (4)", (g_cpu_ir>>6)&3);
+ sprintf(g_dasm_str, "cpusha %s; (4)", cachetype[(g_cpu_ir>>6)&3]);
break;
}
}