qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Kulke <magnuskulke@linux.microsoft.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Roman Bolshakov <rbolshakov@ddn.com>,
	Cameron Esfahani <dirty@apple.com>, Wei Liu <wei.liu@kernel.org>,
	Phil Dennis-Jordan <phil@philjordan.eu>
Subject: Re: [PATCH v3] target/i386/emulate: remove rflags leftovers
Date: Tue, 29 Apr 2025 14:17:01 +0200	[thread overview]
Message-ID: <aBDBExDzR57PcRre@example.com> (raw)
In-Reply-To: <CABgObfaxzxdBf3f-JwKA8osOwZZQf-dqpsambpAFhPvkvjDo8w@mail.gmail.com>

On Tue, Apr 29, 2025 at 12:02:48PM +0200, Paolo Bonzini wrote:
> Il mar 29 apr 2025, 11:33 Magnus Kulke <magnuskulke@linux.microsoft.com> ha
> scritto:
> 
> > Fixes: c901905ea670 ("target/i386/emulate: remove flags_mask")
> >
> > In c901905ea670 rflags have been removed from `x86_decode`, but there
> > were some leftovers.
> >
> > Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
> >
> 
> Thanks, I will queue thos; I have some more emulator patches but no way to
> test that, could you please help?
> 
> Paolo
> 

Yes, I'm using the generalized emulator in the context of adding the MSHV
accelerator. (I'll probably get around sending an RFC patchset this week for
it). There were minor compilation issues w/ the emulator code, that I had to
fix to make it compile on Linux. However I don't have access to an x86_64
Mac for development either, so I can't test a HVF build.

Best,

Magnus

> ---
> >  target/i386/emulate/x86_decode.c | 17 ++++++-----------
> >  1 file changed, 6 insertions(+), 11 deletions(-)
> >
> > diff --git a/target/i386/emulate/x86_decode.c
> > b/target/i386/emulate/x86_decode.c
> > index 7fee219687..7efa2f570e 100644
> > --- a/target/i386/emulate/x86_decode.c
> > +++ b/target/i386/emulate/x86_decode.c
> > @@ -1408,7 +1408,7 @@ struct decode_tbl _2op_inst[] = {
> >  };
> >
> >  struct decode_x87_tbl invl_inst_x87 = {0x0, 0, 0, 0, 0, false, false,
> > NULL,
> > -                                       NULL, decode_invalid, 0};
> > +                                       NULL, decode_invalid};
> >
> >  struct decode_x87_tbl _x87_inst[] = {
> >      {0xd8, 0, 3, X86_DECODE_CMD_FADD, 10, false, false,
> > @@ -1456,8 +1456,7 @@ struct decode_x87_tbl _x87_inst[] = {
> >       decode_x87_modrm_st0, NULL, decode_d9_4},
> >      {0xd9, 4, 0, X86_DECODE_CMD_INVL, 4, false, false,
> >       decode_x87_modrm_bytep, NULL, NULL},
> > -    {0xd9, 5, 3, X86_DECODE_CMD_FLDxx, 10, false, false, NULL, NULL, NULL,
> > -     RFLAGS_MASK_NONE},
> > +    {0xd9, 5, 3, X86_DECODE_CMD_FLDxx, 10, false, false, NULL, NULL,
> > NULL},
> >      {0xd9, 5, 0, X86_DECODE_CMD_FLDCW, 2, false, false,
> >       decode_x87_modrm_bytep, NULL, NULL},
> >
> > @@ -1478,20 +1477,17 @@ struct decode_x87_tbl _x87_inst[] = {
> >       decode_x87_modrm_st0, NULL},
> >      {0xda, 3, 3, X86_DECODE_CMD_FCMOV, 10, false, false,
> > decode_x87_modrm_st0,
> >       decode_x87_modrm_st0, NULL},
> > -    {0xda, 4, 3, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL,
> > -     RFLAGS_MASK_NONE},
> > +    {0xda, 4, 3, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL},
> >      {0xda, 4, 0, X86_DECODE_CMD_FSUB, 4, false, false,
> > decode_x87_modrm_st0,
> >       decode_x87_modrm_intp, NULL},
> >      {0xda, 5, 3, X86_DECODE_CMD_FUCOM, 10, false, true,
> > decode_x87_modrm_st0,
> >       decode_decode_x87_modrm_st0, NULL},
> >      {0xda, 5, 0, X86_DECODE_CMD_FSUB, 4, true, false,
> > decode_x87_modrm_st0,
> >       decode_x87_modrm_intp, NULL},
> > -    {0xda, 6, 3, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL,
> > -     RFLAGS_MASK_NONE},
> > +    {0xda, 6, 3, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL},
> >      {0xda, 6, 0, X86_DECODE_CMD_FDIV, 4, false, false,
> > decode_x87_modrm_st0,
> >       decode_x87_modrm_intp, NULL},
> > -    {0xda, 7, 3, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL,
> > -     RFLAGS_MASK_NONE},
> > +    {0xda, 7, 3, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL},
> >      {0xda, 7, 0, X86_DECODE_CMD_FDIV, 4, true, false,
> > decode_x87_modrm_st0,
> >       decode_x87_modrm_intp, NULL},
> >
> > @@ -1511,8 +1507,7 @@ struct decode_x87_tbl _x87_inst[] = {
> >       decode_x87_modrm_intp, NULL, NULL},
> >      {0xdb, 4, 3, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL,
> >       decode_db_4},
> > -    {0xdb, 4, 0, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL,
> > -     RFLAGS_MASK_NONE},
> > +    {0xdb, 4, 0, X86_DECODE_CMD_INVL, 10, false, false, NULL, NULL, NULL},
> >      {0xdb, 5, 3, X86_DECODE_CMD_FUCOMI, 10, false, false,
> >       decode_x87_modrm_st0, decode_x87_modrm_st0, NULL},
> >      {0xdb, 5, 0, X86_DECODE_CMD_FLD, 10, false, false,
> > --
> > 2.34.1
> >
> >


  reply	other threads:[~2025-04-29 12:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  9:33 [PATCH v3] target/i386/emulate: remove rflags leftovers Magnus Kulke
2025-04-29 10:02 ` Paolo Bonzini
2025-04-29 12:17   ` Magnus Kulke [this message]
2025-04-29 12:27     ` Paolo Bonzini
2025-04-29 12:49       ` Magnus Kulke
2025-05-02 17:04     ` Wei Liu
2025-05-02 22:48       ` Paolo Bonzini

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=aBDBExDzR57PcRre@example.com \
    --to=magnuskulke@linux.microsoft.com \
    --cc=dirty@apple.com \
    --cc=pbonzini@redhat.com \
    --cc=phil@philjordan.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=rbolshakov@ddn.com \
    --cc=wei.liu@kernel.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).