qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Joseph Myers <joseph@codesourcery.com>,
	qemu-devel@nongnu.org, rth@twiddle.net, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH] target/i386: set rip_offset for some SSE4.1 instructions
Date: Tue, 8 Aug 2017 09:05:38 +0200	[thread overview]
Message-ID: <4d5f4788-9be3-e42c-3c82-0ba56d021399@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1708080041391.28702@digraph.polyomino.org.uk>

On 08/08/2017 02:43, Joseph Myers wrote:
> When emulating various SSE4.1 instructions such as pinsrd, the address
> of a memory operand is computed without allowing for the 8-bit
> immediate operand located after the memory operand, meaning that the
> memory operand uses the wrong address in the case where it is
> rip-relative.  This patch adds the required rip_offset setting for
> those instructions, so fixing some GCC test failures (13 in the gcc
> testsuite in my GCC 6-based testing) when testing with a default CPU
> setting enabling those instructions.
> 
> Signed-off-by: Joseph Myers <joseph@codesourcery.com>
> 
> ---
> 
> diff --git a/target/i386/translate.c b/target/i386/translate.c
> index cab9e32..5fdadf9 100644
> --- a/target/i386/translate.c
> +++ b/target/i386/translate.c
> @@ -4080,6 +4080,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
>              if (sse_fn_eppi == SSE_SPECIAL) {
>                  ot = mo_64_32(s->dflag);
>                  rm = (modrm & 7) | REX_B(s);
> +                s->rip_offset = 1;
>                  if (mod != 3)
>                      gen_lea_modrm(env, s, modrm);
>                  reg = ((modrm >> 3) & 7) | rex_r;
> 


Queued for 2.10, thanks Joseph.

Paolo

      reply	other threads:[~2017-08-08  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08  0:43 [Qemu-devel] [PATCH] target/i386: set rip_offset for some SSE4.1 instructions Joseph Myers
2017-08-08  7:05 ` Paolo Bonzini [this message]

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=4d5f4788-9be3-e42c-3c82-0ba56d021399@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.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).