qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 3/4] target/i386: implement F16C instructions
Date: Thu, 20 Oct 2022 12:31:06 +1000	[thread overview]
Message-ID: <417905fd-a2a4-25f8-31fe-fabaf3e809a3@linaro.org> (raw)
In-Reply-To: <20221019150616.929463-4-pbonzini@redhat.com>

On 10/20/22 01:06, Paolo Bonzini wrote:
> F16C only consists of two instructions, which are a bit peculiar
> nevertheless.
> 
> First, they access only the low half of an YMM or XMM register for the
> packed-half operand; the exact size still depends on the VEX.L flag.
> This is similar to the existing avx_movx flag, but not exactly because
> avx_movx is hardcoded to affect operand 2.  To this end I added a "ph"
> format name; it's possible to reuse this approach for the VPMOVSX and
> VPMOVZX instructions, though that would also require adding two more
> formats for the low-quarter and low-eighth of an operand.
> 
> Second, VCVTPS2PH is somewhat weird because it*stores*  the result of
> the instruction into memory rather than loading it.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   target/i386/cpu.c                |  5 ++---
>   target/i386/cpu.h                |  3 +++
>   target/i386/ops_sse.h            | 29 +++++++++++++++++++++++++++++
>   target/i386/ops_sse_header.h     |  6 ++++++
>   target/i386/tcg/decode-new.c.inc |  8 ++++++++
>   target/i386/tcg/decode-new.h     |  2 ++
>   target/i386/tcg/emit.c.inc       | 17 ++++++++++++++++-
>   tests/tcg/i386/test-avx.c        | 17 +++++++++++++++++
>   tests/tcg/i386/test-avx.py       |  8 ++++++--
>   9 files changed, 89 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2022-10-20  2:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 15:06 [PATCH 0/4] target/i386: support x86_64-v3 for user mode applications Paolo Bonzini
2022-10-19 15:06 ` [PATCH 1/4] target/i386: decode-new: avoid out-of-bounds access to xmm_regs[-1] Paolo Bonzini
2022-10-19 19:47   ` Philippe Mathieu-Daudé
2022-10-20  2:21   ` Richard Henderson
2022-10-19 15:06 ` [PATCH 2/4] target/i386: introduce function to set rounding mode from FPCW or MXCSR bits Paolo Bonzini
2022-10-19 19:41   ` Philippe Mathieu-Daudé
2022-10-20  2:22   ` Richard Henderson
2022-10-19 15:06 ` [PATCH 3/4] target/i386: implement F16C instructions Paolo Bonzini
2022-10-20  2:31   ` Richard Henderson [this message]
2022-10-19 15:06 ` [PATCH 4/4] target/i386: implement FMA instructions Paolo Bonzini
2022-10-20  3:02   ` Richard Henderson
2022-10-20 13:23     ` 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=417905fd-a2a4-25f8-31fe-fabaf3e809a3@linaro.org \
    --to=richard.henderson@linaro.org \
    --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 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).