summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/i386/i386ops.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/i386/i386ops.hxx')
-rw-r--r--src/devices/cpu/i386/i386ops.hxx26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/devices/cpu/i386/i386ops.hxx b/src/devices/cpu/i386/i386ops.hxx
index 4a192738458..a063fa65d9f 100644
--- a/src/devices/cpu/i386/i386ops.hxx
+++ b/src/devices/cpu/i386/i386ops.hxx
@@ -736,9 +736,10 @@ void i386_device::i386_mov_dr_r32() // Opcode 0x0f 23
case 6: CYCLES(CYCLES_MOV_DR6_7_REG); m_dr[dr] = LOAD_RM32(modrm); break;
case 7:
{
- dr7_changed(m_dr[7], rm32);
- CYCLES(CYCLES_MOV_DR6_7_REG);
+ uint32_t old_dr7 = m_dr[7];
m_dr[dr] = rm32;
+ dr7_changed(old_dr7, m_dr[7]);
+ CYCLES(CYCLES_MOV_DR6_7_REG);
break;
}
default:
@@ -1143,11 +1144,19 @@ void i386_device::i386_repeat(int invert_flag)
m_segment_prefix=1;
break;
case 0x66:
- m_operand_size ^= 1;
- m_xmm_operand_size ^= 1;
+ if(!m_operand_prefix)
+ {
+ m_operand_size ^= 1;
+ m_xmm_operand_size ^= 1;
+ m_operand_prefix = 1;
+ }
break;
case 0x67:
- m_address_size ^= 1;
+ if(!m_address_prefix)
+ {
+ m_address_size ^= 1;
+ m_address_prefix = 1;
+ }
break;
default:
prefix_flag=0;
@@ -2484,12 +2493,17 @@ void i386_device::i386_clts() // Opcode 0x0f 0x06
// Privileged instruction, CPL must be zero. Can be used in real or v86 mode.
if(PROTECTED_MODE && m_CPL != 0)
FAULT(FAULT_GP,0)
- m_cr[0] &= ~0x08; /* clear TS bit */
+ m_cr[0] &= ~CR0_TS; /* clear TS bit */
CYCLES(CYCLES_CLTS);
}
void i386_device::i386_wait() // Opcode 0x9B
{
+ if ((m_cr[0] & (CR0_TS | CR0_MP)) == (CR0_TS | CR0_MP))
+ {
+ i386_trap(FAULT_NM, 0, 0);
+ return;
+ }
// TODO
}