From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nn9s3-0001aI-0C for qemu-devel@nongnu.org; Thu, 04 Mar 2010 07:09:39 -0500 Received: from [199.232.76.173] (port=41552 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nn9s2-0001Zv-HM for qemu-devel@nongnu.org; Thu, 04 Mar 2010 07:09:38 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nn9s0-0003wY-V3 for qemu-devel@nongnu.org; Thu, 04 Mar 2010 07:09:38 -0500 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:57779 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nn9s0-0003wO-JU for qemu-devel@nongnu.org; Thu, 04 Mar 2010 07:09:36 -0500 Date: Thu, 4 Mar 2010 15:09:26 +0300 (MSK) From: malc Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [Qemu-devel] [RFC][PATCH] x86_64: Fix long jumps/calls in long mode with REX.W set List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Brad Spengler Signed-off-by: malc --- target-i386/translate.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index a597e80..68e6df9 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -4589,9 +4589,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; -- 1.6.6.1 -- mailto:av1474@comtv.ru