summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2023-12-12 15:03:39 -0600
committer cracyc <cracyc@users.noreply.github.com>2023-12-12 15:03:39 -0600
commit1fdf6d10a7907bc92cd9f36eda1eca0484e47aba (patch)
tree2da0a3fb4bd26d649e2608ffb1d8a0088ad2a93f
parent1d0f8adaf8c1fd3d2dcf33daec19268da588e85e (diff)
i386: don't handle op/addr size prefixes twice in rep
-rw-r--r--src/devices/cpu/i386/i386ops.hxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/devices/cpu/i386/i386ops.hxx b/src/devices/cpu/i386/i386ops.hxx
index 1f15550a776..3209ba9a823 100644
--- a/src/devices/cpu/i386/i386ops.hxx
+++ b/src/devices/cpu/i386/i386ops.hxx
@@ -1144,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;