From: Doug Evans <dje@google.com>
To: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] x86: Fix eflags tracking for syscall insn
Date: Tue, 06 Dec 2016 17:13:39 +0000 [thread overview]
Message-ID: <001a113ec6308021110543008630@google.com> (raw)
Hi.
While researching an issue related to the syscall insn it seemed
like eflags status tracking was missing this step.
I think(!) this is correct, it follows what similar code does elsewhere,
and what the doc says. If it's not correct IWBN to clarify the situation.
commit 393243eda30d4429a07a0f7c29b0f6297616a355
Author: Doug Evans <dje@google.com>
Date: Tue Dec 6 09:00:42 2016 -0800
syscall insn: update eflags to CC_OP_EFLAGS
Signed-off-by: Doug Evans <dje@google.com>
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 324103c..9fd1a04 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -7104,6 +7104,10 @@ static target_ulong disas_insn(CPUX86State *env,
DisasContext *s,
gen_update_cc_op(s);
gen_jmp_im(pc_start - s->cs_base);
gen_helper_syscall(cpu_env, tcg_const_i32(s->pc - pc_start));
+ /* condition codes are modified only in long mode */
+ if (s->lma) {
+ set_cc_op(s, CC_OP_EFLAGS);
+ }
gen_eob(s);
break;
case 0x107: /* sysret */
next reply other threads:[~2016-12-06 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 17:13 Doug Evans [this message]
2016-12-06 19:43 ` [Qemu-devel] [PATCH] x86: Fix eflags tracking for syscall insn Richard Henderson
2016-12-06 22:36 ` Doug Evans
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=001a113ec6308021110543008630@google.com \
--to=dje@google.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.