From patchwork Sat Aug 15 01:31:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 247757 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp1244356ilo; Sat, 15 Aug 2020 08:35:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf58oXLBXFOSoMWZ4Xnz1LY2bt0CDoA7CK7x0vpOuCn0VOGMvAS7JAO3TDF6WkhB3E8vKN X-Received: by 2002:a25:2057:: with SMTP id g84mr9872637ybg.169.1597505724031; Sat, 15 Aug 2020 08:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597505724; cv=none; d=google.com; s=arc-20160816; b=r7MdJYYU53V8Zhp+GA6YWRSBhm6ctCqEKHiBW+kYpDIBwPVK4YKiDjMIflAiVcNlZL xQRAXWgrvxbR30nfh30eLAs01Q68hsgxB/4gtmiF3ZYRmXZIDR3QmoQss6rSM3Zx8+Jq JfgqFzv0AXlApYrefKiudZG+Rn+eRLmzXuN3M1c1aQ3atZRlpzfOcEFsf6HrPYHitrN7 /LlF/mgue3Z8kPEuApPQWbKIEyXPNU9CUGtT/dBY3AsYuo3abPB+PiLrIMv7dvGpk53s J/SiWG+RMuZ/6DzGqI00joP80g/hVJHnpiTFEcXt7MBbrVXVkkRKwN+gTsmHEpR+lE7Z a8ZA== 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=R/VNIRE45vthmnotX1ygL9JJ9jQ4MS1MvprbVVBA5VY=; b=on+T9Be10tC75Aa5obaoTCkL+w/+nbMgVc9Y6ADEL/Y74ubiVoV+Te+9/UilirbtKq 8JS3Wvv652PSgXOSs5+mdcaJNcLSgBmZMI/iQgFLNuzJIDaJ1sFWD2LT9n/opedVnHaT zmb6Qt0+0Ft0pZmNFlUtN88PZ+9JfdSG1hJIKBU4brWAUiSoFIkKjD7QBCCEsc7Ux8+z SXfKu09OFAjlqIsNlNMiwRLizmdtnGaQNkviSXVd4dA6BwfcCelSI5LvgKD8pHFCvO+i 1lURx3fS/MBWrX2PqzmzOSAWTbBQ7s9NpibOMAZNmgZGXwEgi1p69ZSAM7/utpKLQa8K Jf5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gvH5QVMb; 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 s141si11003883ybc.165.2020.08.15.08.35.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Aug 2020 08:35:24 -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=pass header.i=@linaro.org header.s=google header.b=gvH5QVMb; 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]:35894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6yDL-0003cn-7u for patch@linaro.org; Sat, 15 Aug 2020 11:35:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6yD6-0003ba-Mv for qemu-devel@nongnu.org; Sat, 15 Aug 2020 11:35:08 -0400 Received: from mail-oi1-x242.google.com ([2607:f8b0:4864:20::242]:43365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6yD4-0005Ax-Tj for qemu-devel@nongnu.org; Sat, 15 Aug 2020 11:35:08 -0400 Received: by mail-oi1-x242.google.com with SMTP id l84so10859090oig.10 for ; Sat, 15 Aug 2020 08:35:06 -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 :mime-version:content-transfer-encoding; bh=R/VNIRE45vthmnotX1ygL9JJ9jQ4MS1MvprbVVBA5VY=; b=gvH5QVMbEqOryeyl9dG5muTYrPA1X2ec1UBGAhHofCPrkxEnLB55P0VmV3lO1s7Dz6 5YUqrqkk8aPxtJ5reUm2bYEjkLjopYVbu6zY9rHkn5XpDoemaYNWhi3M3ENIvQVS7mlJ edLQWGaSawykGX1hDuSifoX/pm2ML0IxlxR46maSiafZIl3TAs9goZu9tx54n7bIsZbE Zm2fZSkf2VaHsmwWSn0tFP8WSzU8OLpyFUSb3iE/qOovcwe2AN8bcD0Z6tfNp6nON3SL rxfKDgZjqahjtzITSDdHb2zrrp1qhnV1taJNMVwdbTgaoSTajeE2xyiOIslEaairMxsq HoTw== 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:mime-version:content-transfer-encoding; bh=R/VNIRE45vthmnotX1ygL9JJ9jQ4MS1MvprbVVBA5VY=; b=rvfxWqYk3TGWQ5nqDciYmWmUXUdLYjLcR6ih03VEM8xKWMWeRw5Tg5cqIJ2O5wT2cV rs1xqoQl7PW2T8bz+n6vITlZLc7C3XmH3A0cE8CDAlzZoBZdpUtyTo3OwydFa0FmfpT0 a5fCxhmRChxOl2JjjqDhW0/iARwKGOWwu0YUEiOo+Aq0AHQqeiuGcgyCAM0VDe2UHXvh 8xjaREmUgbc9bOLYYzesGxkLg2gPzWp8F5KtFnZB7Hk69hWLhpSEyydS2VWDCNdZvsNX 7ik6LDki5KHZAqFlPXDOse7EbPbkN8SHWj+r+zuR5J1hUkOYh2PIP2rT76rBxoH+qcDs xmuQ== X-Gm-Message-State: AOAM532W+9kJTNJ3gnIQjAKhNIBqYGn/pYATaJMl1YKgEwXIQ3PF+0i8 leeR1yAwg6PuFbMLy2ss3yZBydOFpiBtIA== X-Received: by 2002:a17:90a:ac0b:: with SMTP id o11mr4547374pjq.191.1597455117508; Fri, 14 Aug 2020 18:31:57 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id y196sm10625528pfc.202.2020.08.14.18.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 18:31:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/20] target/arm: Use tcg_gen_gvec_bitsel for trans_SEL_pppp Date: Fri, 14 Aug 2020 18:31:32 -0700 Message-Id: <20200815013145.539409-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200815013145.539409-1-richard.henderson@linaro.org> References: <20200815013145.539409-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::242; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x242.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" The gvec operation was added after the initial implementation of the SEL instruction and was missed in the conversion. Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 13a0194d59..aa7ed070e3 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -1188,34 +1188,19 @@ static bool trans_EOR_pppp(DisasContext *s, arg_rprr_s *a) return do_pppp_flags(s, a, &op); } -static void gen_sel_pg_i64(TCGv_i64 pd, TCGv_i64 pn, TCGv_i64 pm, TCGv_i64 pg) -{ - tcg_gen_and_i64(pn, pn, pg); - tcg_gen_andc_i64(pm, pm, pg); - tcg_gen_or_i64(pd, pn, pm); -} - -static void gen_sel_pg_vec(unsigned vece, TCGv_vec pd, TCGv_vec pn, - TCGv_vec pm, TCGv_vec pg) -{ - tcg_gen_and_vec(vece, pn, pn, pg); - tcg_gen_andc_vec(vece, pm, pm, pg); - tcg_gen_or_vec(vece, pd, pn, pm); -} - static bool trans_SEL_pppp(DisasContext *s, arg_rprr_s *a) { - static const GVecGen4 op = { - .fni8 = gen_sel_pg_i64, - .fniv = gen_sel_pg_vec, - .fno = gen_helper_sve_sel_pppp, - .prefer_i64 = TCG_TARGET_REG_BITS == 64, - }; - if (a->s) { return false; } - return do_pppp_flags(s, a, &op); + if (sve_access_check(s)) { + unsigned psz = pred_gvec_reg_size(s); + tcg_gen_gvec_bitsel(MO_8, pred_full_reg_offset(s, a->rd), + pred_full_reg_offset(s, a->pg), + pred_full_reg_offset(s, a->rn), + pred_full_reg_offset(s, a->rm), psz, psz); + } + return true; } static void gen_orr_pg_i64(TCGv_i64 pd, TCGv_i64 pn, TCGv_i64 pm, TCGv_i64 pg)