From patchwork Thu Mar 3 20:59:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 547822 Delivered-To: patch@linaro.org Received: by 2002:ac0:f585:0:0:0:0:0 with SMTP id s5csp983426imq; Thu, 3 Mar 2022 13:10:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxX9Lylh3te4PFGCQTmrgBMqmabKXbWGNtA5aXJ/FBxRYGF7bBbz0nzmflbFSSTSZXtHlzQ X-Received: by 2002:a25:c687:0:b0:628:7dc2:c20 with SMTP id k129-20020a25c687000000b006287dc20c20mr13395453ybf.409.1646341841296; Thu, 03 Mar 2022 13:10:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646341841; cv=none; d=google.com; s=arc-20160816; b=XSGO4bvInr/yfA2B0xPrERcb6EsJhTQV6B+IRI6zxUugp8Fotg+98R6IeMXurKrQsH HiqKImQNSsxahDIM3AZAF0GVnmZbfzqAEF/5Ys0hxOoZX2r/2aq/IKHKEQD878TlN5fq 2h0NLpjNyEUYHMaRAKqqzbkLNkDuUICU2YhnqddrlltIHzc2AJbMuxzDuK4UB0BDeuw+ BeYUyPu61xoM65kmpdFWf75GwFiZ3Tc/h3B5ygQ4bIgdzVi9yCzyFJtx6nwzbfL6ELb+ PVsZm3YvHok5epApJK3bV/DcZq4AR7rlQ0XvWtdR4dW+LCkfTBPs1Mwu5gZPTe+aXzT6 MyAA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Iz3qFqZ6syttnMIonSrIWrfGNkbxAI11UgZmBPXKCFo=; b=pi7ocA4HPFx4M3GNdW+nYpKtLs3PrpEd7Dup3hFBcF2ZiwudYZuaqeKAzxHrPvLAeZ xOwjJ+PCaEsZPLGdFPIsWPdnITlo3wD/C/z8xcZ79q8re3cEOZMZi1c+bX7gP3260Ze/ nAzhA32TE3+O6rbbqnyx2+hjOTqy5211+AkHOKTMj2s4HnKxl2LnLvaU8ZQX7b1gKK2s y01KIbVN7Q7ha1JzGEwITxf/P0MmdOojrTnhbJDhY0TodjV/X8jepoIFTP8JRiykRCnB 51bdD5O5pchOPTmSBoIRcyM5T2Z6uA5c6ROsYs+Pa/PayY2LfgoOAYF1Z1lD6ovAmeix PnPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gdx+4k1J; 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=pass (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 w123-20020a254981000000b006195db09008si2508155yba.210.2022.03.03.13.10.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Mar 2022 13:10:41 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=Gdx+4k1J; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPsie-00077k-PS for patch@linaro.org; Thu, 03 Mar 2022 16:10:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPsYH-0005Si-TB for qemu-devel@nongnu.org; Thu, 03 Mar 2022 15:59:57 -0500 Received: from [2607:f8b0:4864:20::42e] (port=42978 helo=mail-pf1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPsYG-00043L-CB for qemu-devel@nongnu.org; Thu, 03 Mar 2022 15:59:57 -0500 Received: by mail-pf1-x42e.google.com with SMTP id a5so5785989pfv.9 for ; Thu, 03 Mar 2022 12:59:55 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=Iz3qFqZ6syttnMIonSrIWrfGNkbxAI11UgZmBPXKCFo=; b=Gdx+4k1JY98lKYzFkNjiuBtdwtPoNBd9q9nGj8DmCaCz4M0Bb/7Iy6K8JK4X9c0ZzH Ly5BW6XubrDpWKEm3bg7kFUoJtjdlRbB6J9GZkSPgmY0666BI16/akGZ6wBWjF20JgTh 3WJNVHkaywfnpB7Jqql18nLrLT0iRjK8HN3JbWrBr/rfZoRAltGYq8hSp/bvoTXwug3o c6Y9OELtk3xJVVCsiViNh15bhy7kCrn6KnaqKDNyIUkHbu3vaITAqX8BM7/yFMwpOuB2 9TFCsOc/i9y4wF02RMHgSYdDtTJhciECnKWyI9gx5bzr3AxiS/1qBpScb37fCkZDda9S tvUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Iz3qFqZ6syttnMIonSrIWrfGNkbxAI11UgZmBPXKCFo=; b=WsXomDVs0M7ODtvGv5Znpv2/w/jtGrlbHuVSnAYkPjDYxw33IP0OrBx9UvnKeZv0xM TaZs9YeubRmC4xoSMKcfevUZSaJGnydqf+tI5h0Ct7ub3xWppApHNT7RvW4r9lFsuimj p3OPG1U4CTXbcNF/DYSIEWPw9IOXmmDVZwGIu3H3HejIu0E88MWossvk77T4KOr/vf0d 3HKhCu5L+P7wJQLmDVPRjc6ZMTtymR8ZXbksAmJTtNTABlO6nDQRlDMDfoNTnVW5ujmy Hoe1FaHGrZDGZ3s7o1QYdYpGV67ee3vOwzKWDDYsg3+vkDR/x6AlFoIQ/MJ2wAxwhyab UZFw== X-Gm-Message-State: AOAM533TElqDz6tRuOfJwjnsgZ3mJhTSCOzjQ9ejXXnE3F4XQbCoWOyx IwjRLbHe8Kr4xPYigPNLE5whMkX3J3iQVA== X-Received: by 2002:a05:6a00:1795:b0:4e1:6e1f:5aed with SMTP id s21-20020a056a00179500b004e16e1f5aedmr39799685pfg.70.1646341195050; Thu, 03 Mar 2022 12:59:55 -0800 (PST) Received: from localhost.localdomain (2603-800c-1201-c600-119c-490c-a4ee-08e8.res6.spectrum.com. [2603:800c:1201:c600:119c:490c:a4ee:8e8]) by smtp.gmail.com with ESMTPSA id t8-20020a6549c8000000b00372eb3a7fb3sm2729934pgs.92.2022.03.03.12.59.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 12:59:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 05/30] tcg/s390x: Implement vector NAND, NOR, EQV Date: Thu, 3 Mar 2022 10:59:19 -1000 Message-Id: <20220303205944.469445-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220303205944.469445-1-richard.henderson@linaro.org> References: <20220303205944.469445-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::42e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 6 +++--- tcg/s390x/tcg-target.c.inc | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/tcg/s390x/tcg-target.h b/tcg/s390x/tcg-target.h index 94ccb179b8..23e2063667 100644 --- a/tcg/s390x/tcg-target.h +++ b/tcg/s390x/tcg-target.h @@ -145,9 +145,9 @@ extern uint64_t s390_facilities[3]; #define TCG_TARGET_HAS_andc_vec 1 #define TCG_TARGET_HAS_orc_vec HAVE_FACILITY(VECTOR_ENH1) -#define TCG_TARGET_HAS_nand_vec 0 -#define TCG_TARGET_HAS_nor_vec 0 -#define TCG_TARGET_HAS_eqv_vec 0 +#define TCG_TARGET_HAS_nand_vec HAVE_FACILITY(VECTOR_ENH1) +#define TCG_TARGET_HAS_nor_vec 1 +#define TCG_TARGET_HAS_eqv_vec HAVE_FACILITY(VECTOR_ENH1) #define TCG_TARGET_HAS_not_vec 1 #define TCG_TARGET_HAS_neg_vec 1 #define TCG_TARGET_HAS_abs_vec 1 diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index d56c1e51e4..6e65828c09 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -290,7 +290,9 @@ typedef enum S390Opcode { VRRc_VMXL = 0xe7fd, VRRc_VN = 0xe768, VRRc_VNC = 0xe769, + VRRc_VNN = 0xe76e, VRRc_VNO = 0xe76b, + VRRc_VNX = 0xe76c, VRRc_VO = 0xe76a, VRRc_VOC = 0xe76f, VRRc_VPKS = 0xe797, /* we leave the m5 cs field 0 */ @@ -2805,6 +2807,15 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, case INDEX_op_xor_vec: tcg_out_insn(s, VRRc, VX, a0, a1, a2, 0); break; + case INDEX_op_nand_vec: + tcg_out_insn(s, VRRc, VNN, a0, a1, a2, 0); + break; + case INDEX_op_nor_vec: + tcg_out_insn(s, VRRc, VNO, a0, a1, a2, 0); + break; + case INDEX_op_eqv_vec: + tcg_out_insn(s, VRRc, VNX, a0, a1, a2, 0); + break; case INDEX_op_shli_vec: tcg_out_insn(s, VRSa, VESL, a0, a2, TCG_REG_NONE, a1, vece); @@ -2901,7 +2912,10 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece) case INDEX_op_and_vec: case INDEX_op_andc_vec: case INDEX_op_bitsel_vec: + case INDEX_op_eqv_vec: + case INDEX_op_nand_vec: case INDEX_op_neg_vec: + case INDEX_op_nor_vec: case INDEX_op_not_vec: case INDEX_op_or_vec: case INDEX_op_orc_vec: @@ -3246,6 +3260,9 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) case INDEX_op_or_vec: case INDEX_op_orc_vec: case INDEX_op_xor_vec: + case INDEX_op_nand_vec: + case INDEX_op_nor_vec: + case INDEX_op_eqv_vec: case INDEX_op_cmp_vec: case INDEX_op_mul_vec: case INDEX_op_rotlv_vec: