From 8b4a3df8081f3e6f1061ed5cbb303ad623ade66b Mon Sep 17 00:00:00 2001 From: malc Date: Sun, 14 Oct 2012 14:54:38 +0400 Subject: [PATCH] Fix popcnt in long mode Thanks to Andriy Gapon for initial problem report. Signed-off-by: malc --- target-i386/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 0a7e4e3487..ee7585044b 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -7768,7 +7768,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) goto illegal_op; modrm = cpu_ldub_code(cpu_single_env, s->pc++); - reg = ((modrm >> 3) & 7); + reg = ((modrm >> 3) & 7) | rex_r; if (s->prefix & PREFIX_DATA) ot = OT_WORD; -- 2.34.1