From patchwork Tue Jul 2 15:05:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 168334 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4378064ilk; Tue, 2 Jul 2019 08:26:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG/Q4vZS+JW3T92f9aKQFyhsx89aUzzN9AYxmeXxGqAGq9MwW4n+gasGLT9tK2l/i02w6X X-Received: by 2002:a17:906:2b47:: with SMTP id b7mr19264614ejg.117.1562081198227; Tue, 02 Jul 2019 08:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562081198; cv=none; d=google.com; s=arc-20160816; b=CsoN+0t9IV45Bah4DeKi7K/ivGuZeGDtqI8yslHZw/pzIjEtMp2TXEAvkTAcD7k2+Q a7QHBFGhKfM00e9wQiz/yfxXXgqum0pqmYrDUBIu0tSMEyWqFdbltdvivzpbueH0OHmV 76z48dB7SZRlrg/HxK85RW4DAcolwV6Ju7F72GnmZZdZzFuoeU5JgV3gY93RSgNU5qa8 q+7x2gNj+BtCS4JLBhX6V+QRWkgAOtZlXvqi42vMr28Cek7KBZwcexsr3+zH0rLdvlMw RCaVwJqVl0+AIQbmlBk1zDYyuwEq0oDfce1pX1B86oySlZefWGdtX64xxxSzjzKahX0u flJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=ty0ceSlhLSlZJKGDv3kDThADamDPPm/37CRvid7ZnoA=; b=nIMZTD/SPL6orgj25yQOblzrT8uewpl5K/r9h4pwPOtL+X2iDvyxN1PK0u3rudYy77 UGAT5ZwhkV6czqmc8C9J4m1BU1NEU+KB/WmjmTAAw2CHBAYhzwE4qUDse6omarK6hPwJ CMHl7Db/grVbTa04VvDMshhbiaRLRWK2ujcP3A2b4CVEaWDt38qMur9jbyy53tcZhGdY g5jDaR1sOF0+YJeefiHmR/ImGFNWTmcyl9cWxydrB2rOmi8jDDD3hf82DZnh2PmLY1Pp M/UUQKShr3BRC4+uvT0i11IlybOKNKzshyxkkOfxL71FtNvix5c7FT+6R60uU2pDq+/f huuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Rz9NQKhr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x18si13220214edd.17.2019.07.02.08.26.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2019 08:26:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Rz9NQKhr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiKg1-0001bq-6n for patch@linaro.org; Tue, 02 Jul 2019 11:26:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58029) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiKLz-0004wA-BZ for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:06:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiKLv-0007aW-Jv for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:05:53 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:51215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiKLt-0007YG-Pq for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:05:51 -0400 Received: by mail-wm1-x342.google.com with SMTP id 207so1202762wma.1 for ; Tue, 02 Jul 2019 08:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ty0ceSlhLSlZJKGDv3kDThADamDPPm/37CRvid7ZnoA=; b=Rz9NQKhrlQwy/RsupH8RGg0IpFk7hNbm+LIaBM8RjeI/5x5jZXfN1JX046AL0djN54 1CjQgOWqxIwFlqjTRkEV/gr5qPbdj+W5E4H5/c+/9taxurNW0DdnmDa3+ffhRE8It+gV KxMnhEB9aAOC25XmPu6H4+viyZqrNzPnsDCJn4v4MBc+WouC341cbQQWcG+LlMOxXgTU S1VCW79oNSa6H2hoId8AKk561lr5dWig7f5E6T0GQp8MromrS3C5JWPsHF11z1nbsAoM lC42dSt/wv3zyrnoydpsUddRAjmmGF4yAsupwU6Oxvabpt5jIK5HqQdYCt3NcPNvWJB2 9w8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ty0ceSlhLSlZJKGDv3kDThADamDPPm/37CRvid7ZnoA=; b=dnBjFTb6VMd1nBpM2xAhPz90UPKO8vvnxA8+AppTNmKdfNKuRP3ssPfRMbTNAnHDy/ k8cqPyi/Qr+VWnJipWllwiFh5RLiTMi34so6ea4BOq4RWklMFbuo+rqQIbttzl/hTzTL HWPMLda9wdt0or4hUNZBF6SkPAdOzHjS3PWMtfdaokxmlsOdmtfdXVi5pwoGYfgy0ft9 MnmYe0FGJ/aQzEeEMvrZeTy+bn5TXkWydEvFmbJz0qkmB5Yfh0tDfleojvsBV5uVFH9U p4Vlk22+AR8RSI2LBxqGewN8ccQ4WzWw4cMGZ7YkPBfT+i5UAD5BuyiCGTxyQUdLxt3y zxOg== X-Gm-Message-State: APjAAAUiSadKvlDjw/2HZ7lo2dIqpl5wYfKP+2NzLDn9rirBMZici5Zo L7uHyc6TiBZpFNG/NNkCeEzpUzTvHLdEgw== X-Received: by 2002:a1c:39d6:: with SMTP id g205mr3552458wma.85.1562079947701; Tue, 02 Jul 2019 08:05:47 -0700 (PDT) Received: from localhost.localdomain (93-34-153-63.ip50.fastwebnet.it. [93.34.153.63]) by smtp.gmail.com with ESMTPSA id w10sm12975657wru.76.2019.07.02.08.05.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 08:05:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 17:05:42 +0200 Message-Id: <20190702150542.12008-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190702150542.12008-1-richard.henderson@linaro.org> References: <20190702150542.12008-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PULL 3/3] tcg: Fix expansion of INDEX_op_not_vec X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This operation can always be emitted, even if we need to fall back to xor. Adjust the assertions to match. Signed-off-by: Richard Henderson --- tcg/tcg-op-vec.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c index c8fdc24f56..6714991bf4 100644 --- a/tcg/tcg-op-vec.c +++ b/tcg/tcg-op-vec.c @@ -90,6 +90,9 @@ bool tcg_can_emit_vecop_list(const TCGOpcode *list, case INDEX_op_bitsel_vec: /* These opcodes are mandatory and should not be listed. */ g_assert_not_reached(); + case INDEX_op_not_vec: + /* These opcodes have generic expansions using the above. */ + g_assert_not_reached(); default: break; } @@ -438,11 +441,14 @@ static bool do_op2(unsigned vece, TCGv_vec r, TCGv_vec a, TCGOpcode opc) void tcg_gen_not_vec(unsigned vece, TCGv_vec r, TCGv_vec a) { + const TCGOpcode *hold_list = tcg_swap_vecop_list(NULL); + if (!TCG_TARGET_HAS_not_vec || !do_op2(vece, r, a, INDEX_op_not_vec)) { TCGv_vec t = tcg_const_ones_vec_matching(r); tcg_gen_xor_vec(0, r, a, t); tcg_temp_free_vec(t); } + tcg_swap_vecop_list(hold_list); } void tcg_gen_neg_vec(unsigned vece, TCGv_vec r, TCGv_vec a)