summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-01-04 09:06:34 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-01-04 09:06:34 +0000
commit1298e570c8028e426cf6d1912c04bc6cf594f73e (patch)
treed6f948271c2231c5cb2265f0abaa79207403f28c
parent6db013a7a24924fc32cb655190556b0d3093ca1c (diff)
Implemented UD2 instruction, thing is that in any case it should raise invalid trap and not unimplemented, but exist as official from Pentium (no whatsnew)
-rw-r--r--src/emu/cpu/i386/i386ops.h2
-rw-r--r--src/emu/cpu/i386/pentops.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/emu/cpu/i386/i386ops.h b/src/emu/cpu/i386/i386ops.h
index 7f00535b562..f0b16145608 100644
--- a/src/emu/cpu/i386/i386ops.h
+++ b/src/emu/cpu/i386/i386ops.h
@@ -293,7 +293,7 @@ static const X86_OPCODE x86_opcode_table[] =
{ 0x07, OP_2BYTE|OP_I386, I386OP(loadall), I386OP(loadall), },
{ 0x08, OP_2BYTE|OP_I486, I486OP(invd), I486OP(invd), },
{ 0x09, OP_2BYTE|OP_I486, I486OP(wbinvd), I486OP(wbinvd), },
- { 0x0B, OP_2BYTE|OP_I386, I386OP(unimplemented), I386OP(unimplemented), },
+ { 0x0B, OP_2BYTE|OP_PENTIUM, PENTIUMOP(ud2), PENTIUMOP(ud2), },
{ 0x20, OP_2BYTE|OP_I386, I386OP(mov_r32_cr), I386OP(mov_r32_cr), },
{ 0x21, OP_2BYTE|OP_I386, I386OP(mov_r32_dr), I386OP(mov_r32_dr), },
{ 0x22, OP_2BYTE|OP_I386, I386OP(mov_cr_r32), I386OP(mov_cr_r32), },
diff --git a/src/emu/cpu/i386/pentops.c b/src/emu/cpu/i386/pentops.c
index 8d45493aac9..09178890c29 100644
--- a/src/emu/cpu/i386/pentops.c
+++ b/src/emu/cpu/i386/pentops.c
@@ -82,3 +82,7 @@ static void PENTIUMOP(sse_group0fae)(i386_state *cpustate) // Opcode 0x0f ae
}
}
+static void PENTIUMOP(ud2)(i386_state *cpustate) // Opcode 0x0f 0b
+{
+ i386_trap(cpustate, 6, 0, 0);
+} \ No newline at end of file