aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-i386/translate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 5b11d7f63e..0f62a97286 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -7351,6 +7351,10 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
ot = OT_QUAD;
else
ot = OT_LONG;
+ if ((prefixes & PREFIX_LOCK) && (reg == 0) &&
+ (s->cpuid_ext3_features & CPUID_EXT3_CR8LEG)) {
+ reg = 8;
+ }
switch(reg) {
case 0:
case 2: