From nobody Sun May 12 09:51:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1561816218; cv=none; d=zoho.com; s=zohoarc; b=f7MMXjsLqRlTB1M8qd76c/t+mwHEuavWpScrsQJjJb6d7RUsyrlOFw1LT3UreJPi7lPho3fSsWRfPl4YQRp60j3OS77o9Ayb5/9D6DVV3If4zEjEo8yNaZIIWhAeidQScE0d/czhIg0zrO4B5B83CVQPyQ7KjLMWopkMF0XiJ9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561816218; h=Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=uJnhNMoGL8yFyTGzU7fmju13WdcLl6dc7pthg5EJAo8=; b=HeLiv+qw1bRuQG9CrQASmlAABRbX5qlbGr9bHbAkQ6uqh0ztILOIoHAKRq9SKmEzss+OaKsDA424Y/tLft06e01Z1wusC1NkSHgkU4JhkwRE1uD8Ixe7qIkl8RIwTiLZD/F6BPp2XHWrvoQv3nDZ63EX8ujphZpOTxBHy+Zksug= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561816218743486.58929675387674; Sat, 29 Jun 2019 06:50:18 -0700 (PDT) Received: from localhost ([::1]:39756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhDjp-0006N3-12 for importer@patchew.org; Sat, 29 Jun 2019 09:49:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49494) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhDih-0005fj-JS for qemu-devel@nongnu.org; Sat, 29 Jun 2019 09:48:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhDif-0000x3-JS for qemu-devel@nongnu.org; Sat, 29 Jun 2019 09:48:47 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhDic-0000iO-3O for qemu-devel@nongnu.org; Sat, 29 Jun 2019 09:48:45 -0400 Received: by mail-wr1-x442.google.com with SMTP id n9so9110235wru.0 for ; Sat, 29 Jun 2019 06:48:41 -0700 (PDT) Received: from localhost.localdomain (93-34-153-63.ip50.fastwebnet.it. [93.34.153.63]) by smtp.gmail.com with ESMTPSA id c1sm10435114wrh.1.2019.06.29.06.48.39 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=uJnhNMoGL8yFyTGzU7fmju13WdcLl6dc7pthg5EJAo8=; b=h9HiZzCTr3WRg3uUU1pdE16zH9zq7/JxKsSRldOByR1j/6CuvuA5sA6hxeFH3zAoPG D8nrE+x+XxcbJD41CQ/AvAsLStJ3KSIHQ8Q4yglEtLJ5/hc0m/Tv3R7GzQRxhlDZ9uqL js6GFG+52y2wxBTBAmI5wDZnAYIcxy2PE3cWxXn8Nb1R9ZwHcW7WuhkfmPka2bKfu7aS jOxENb20/PSm3h6wUIPVa9uKuLZBv99cVo68TGEuwUW6WkmTMYC8aSWTl0fX4rJTHHmT Fs1JDA/8tG9eoJ4YKpO7zCUQ6gPJaZk306MBFF3CoACvF+1LAtoLkMA8lAgaEeCeFptw kn5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=uJnhNMoGL8yFyTGzU7fmju13WdcLl6dc7pthg5EJAo8=; b=fhJDBtXvT2nyzX8GaRJQoxZcJuJ2rI5AWA47kKfAB5gc6HlJiqBuSzW/ULoAJ3PeDn Wda8W+mn0szPcIXSMaLve6gNamvgJx0P9drnrO6Un+brLQnB01/n0uyMU2s6CqvLs22n NZge5PyjXg8gcpz6j6JDli5W2Z1P1Ywjpmd7D94KLlW/cHPJX1RE3j30Fj31AiauAGlz /aPBUx9FjGWhh3zFhU7WkxP8NvCqG2NxhTWSt3JsB4ihTDpskZcQmaxWMaCWgPPhI46/ QLAy3kQ/jePh9U2y7JmCwkvTTkVLxpf2cvtOen4mUnz8jkSZjcBErX8xbYPeZJDDA0ZT u28w== X-Gm-Message-State: APjAAAXvMqGsUNHof0yLkfXRJ7aX1UiS9/IlK2Ek2ySkkWR1klEcF1OF HpEpWDURXqKoA4BPpQXg4kyskZhQIHJpfQ== X-Google-Smtp-Source: APXvYqwtA4mqTadK4Mno3T8QliuEwxAKcMSCJGQugO1h0Iin2iWK+w2VHmbSwYTPAQUBTUjdRP/P3A== X-Received: by 2002:adf:b605:: with SMTP id f5mr12534454wre.305.1561816119938; Sat, 29 Jun 2019 06:48:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 29 Jun 2019 15:48:38 +0200 Message-Id: <20190629134838.5490-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH] 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- While expanding the AA64 vector ORC, Altivec needs a bare NOT operation. This failure does not appear for aa64 or power8 hosts because we have a native vector orc and so do not go down this path. It also does not appear for x86_64 because we don't have a native vector not, and so go down a different path to expand not via xor with -1. r~ --- tcg/tcg-op-vec.c | 6 ++++++ 1 file changed, 6 insertions(+) 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_ve= c a, TCGOpcode opc) =20 void tcg_gen_not_vec(unsigned vece, TCGv_vec r, TCGv_vec a) { + const TCGOpcode *hold_list =3D tcg_swap_vecop_list(NULL); + if (!TCG_TARGET_HAS_not_vec || !do_op2(vece, r, a, INDEX_op_not_vec)) { TCGv_vec t =3D 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); } =20 void tcg_gen_neg_vec(unsigned vece, TCGv_vec r, TCGv_vec a) --=20 2.17.1