From: Stevie Lavern <stevie.lavern@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Bug] x86 EFLAGS refresh is not happening correctly
Date: Thu, 5 Aug 2021 11:51:32 +0200 [thread overview]
Message-ID: <CADV2EAvr0Sb55TE=uffkb4Z17ZHNBCZGLm0nA94qKZrx1WM35A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
Hello,
I'm posting this here instead of opening an issue as it is not clear to me
if this is a bug or not.
The issue is located in function "cpu_compute_eflags" in target/i386/cpu.h
(https://gitlab.com/qemu-project/qemu/-/blob/master/target/i386/cpu.h#L2071)
This function is exectued in an out of cpu loop context.
It is used to synchronize TCG internal eflags registers (CC_OP, CC_SRC,
etc...) with the CPU eflags field upon loop exit.
It does:
eflags |= cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK);
Shouldn't it be:
eflags = cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK);
as eflags is entirely reevaluated by "cpu_cc_compute_all" ?
Thanks,
Kind regards,
Stevie
[-- Attachment #2: Type: text/html, Size: 2098 bytes --]
next reply other threads:[~2021-08-05 9:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 9:51 Stevie Lavern [this message]
2021-08-05 11:24 ` [Bug] x86 EFLAGS refresh is not happening correctly Paolo Bonzini
2021-08-05 11:33 ` Paolo Bonzini
2021-08-05 12:47 ` Stevie Lavern
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='CADV2EAvr0Sb55TE=uffkb4Z17ZHNBCZGLm0nA94qKZrx1WM35A@mail.gmail.com' \
--to=stevie.lavern@gmail.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 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).