]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target-i386: Fix long jumps/calls in long mode with REX.W set
authormalc <av1474@comtv.ru>
Thu, 4 Mar 2010 12:09:26 +0000 (15:09 +0300)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 6 Mar 2010 18:40:11 +0000 (19:40 +0100)
Signed-off-by: malc <av1474@comtv.ru>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit 41b1e61f51b05fd6ca060f901b822f83e0beb6b6)

target-i386/translate.c

index 4ab226f436b74fb2b7f37d70a54f988335a9da94..0f7255d9d425f4984dff45ed185d3b370aeab714 100644 (file)
@@ -4591,9 +4591,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
                 /* operand size for jumps is 64 bit */
                 ot = OT_QUAD;
             } else if (op == 3 || op == 5) {
-                /* for call calls, the operand is 16 or 32 bit, even
-                   in long mode */
-                ot = dflag ? OT_LONG : OT_WORD;
+                ot = dflag ? OT_LONG + (rex_w == 1) : OT_WORD;
             } else if (op == 6) {
                 /* default push size is 64 bit */
                 ot = dflag ? OT_QUAD : OT_WORD;