qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Cc: Brad Spengler <spender@grsecurity.net>
Subject: [Qemu-devel] [RFC][PATCH] x86_64: Fix long jumps/calls in long mode with REX.W set
Date: Thu, 4 Mar 2010 15:09:26 +0300 (MSK)	[thread overview]
Message-ID: <alpine.LNX.2.00.1003041508540.3806@linmac> (raw)


Signed-off-by: malc <av1474@comtv.ru>
---
 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

             reply	other threads:[~2010-03-04 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04 12:09 malc [this message]
2010-03-04 13:03 ` [Qemu-devel] [RFC][PATCH] x86_64: Fix long jumps/calls in long mode with REX.W set malc
2010-03-06 18:21   ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1003041508540.3806@linmac \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=spender@grsecurity.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).