[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 08/16] tcg/i386: Support vector comparison select
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 08/16] tcg/i386: Support vector comparison select value |
Date: |
Thu, 30 May 2019 12:26:05 +0100 |
On Wed, 22 May 2019 at 23:28, Richard Henderson
<address@hidden> wrote:
>
> We already had backend support for this feature. Expand the new
> cmpsel opcode using vpblendb. The combination allows us to avoid
> an extra NOT for some comparison codes.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> tcg/i386/tcg-target.h | 2 +-
> tcg/i386/tcg-target.inc.c | 39 +++++++++++++++++++++++++++++++++++----
> 2 files changed, 36 insertions(+), 5 deletions(-)
>
> diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
> index 16a83a7f7b..928e8b87bb 100644
> --- a/tcg/i386/tcg-target.h
> +++ b/tcg/i386/tcg-target.h
> @@ -191,7 +191,7 @@ extern bool have_avx2;
> #define TCG_TARGET_HAS_sat_vec 1
> #define TCG_TARGET_HAS_minmax_vec 1
> #define TCG_TARGET_HAS_bitsel_vec 0
> -#define TCG_TARGET_HAS_cmpsel_vec 0
> +#define TCG_TARGET_HAS_cmpsel_vec -1
This is the only place where we define a TCG_TARGET_HAS_* macro
to something other than 0 or 1, which means that Coverity
complains (CID 1401702) when we use it in a logical boolean expression
return have_vec && TCG_TARGET_HAS_cmpsel_vec;
later on.
Should it really be -1, or is this a typo for 1 ?
thanks
-- PMM
- [Qemu-devel] [PULL 00/16] tcg queued patches, Richard Henderson, 2019/05/22
- [Qemu-devel] [PULL 01/16] tcg/i386: Fix dupi/dupm for avx1 and 32-bit hosts, Richard Henderson, 2019/05/22
- [Qemu-devel] [PULL 02/16] tcg: Fix missing checks and clears in tcg_gen_gvec_dup_mem, Richard Henderson, 2019/05/22
- [Qemu-devel] [PULL 04/16] tcg: Add support for vector compare select, Richard Henderson, 2019/05/22
- [Qemu-devel] [PULL 03/16] tcg: Add support for vector bitwise select, Richard Henderson, 2019/05/22
- [Qemu-devel] [PULL 06/16] tcg: Expand vector minmax using cmp+cmpsel, Richard Henderson, 2019/05/22
- [Qemu-devel] [PULL 08/16] tcg/i386: Support vector comparison select value, Richard Henderson, 2019/05/22
- Re: [Qemu-devel] [PULL 08/16] tcg/i386: Support vector comparison select value,
Peter Maydell <=
[Qemu-devel] [PULL 05/16] tcg: Introduce do_op3_nofail for vector expansion, Richard Henderson, 2019/05/22
[Qemu-devel] [PULL 07/16] tcg: Add TCG_OPF_NOT_PRESENT if TCG_TARGET_HAS_foo is negative, Richard Henderson, 2019/05/22
[Qemu-devel] [PULL 14/16] tcg/aarch64: Build vector immediates with two insns, Richard Henderson, 2019/05/22
[Qemu-devel] [PULL 09/16] tcg/i386: Remove expansion for missing minmax, Richard Henderson, 2019/05/22
[Qemu-devel] [PULL 10/16] tcg/i386: Use umin/umax in expanding unsigned compare, Richard Henderson, 2019/05/22
[Qemu-devel] [PULL 13/16] tcg/aarch64: Use MVNI in tcg_out_dupi_vec, Richard Henderson, 2019/05/22