From patchwork Sat Aug 15 01:31:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 247750 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp1229136ilo; Sat, 15 Aug 2020 08:09:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmlqDjKH4j782t7+6zN4JR/oG9ynIFqlx4VMOmns6H/42lrEd+E0lNRLAqTExRgrQa5z4E X-Received: by 2002:a25:dc4b:: with SMTP id y72mr10174892ybe.197.1597504197638; Sat, 15 Aug 2020 08:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597504197; cv=none; d=google.com; s=arc-20160816; b=YgeZmaeSuAzeOFnFiQuiE7fYXmCH3c/vjNhHcuJ3mTqsz3WDdYLxRR7FgNk9D647RW 6ZgR4mFS4ixepG07jHM00Ce1Abq0al4UcYXT6yND0VBATlxuwqODm+WVKzHPO+PiuL/w E/iIKsEragxvsp7qSXtuhYKs0wsVbhPQkdlNgZT8rx9Zo0Zb6kYenlksP7wVzi0kdOOc Y+rdduqogx7mtBogM/6ova2xdy4qUceCi2NdAJTcs0Bdgv6PC64RphlHg2wbKI9Z0cp8 IqOQwstk5ZFiDKZOnsrkErM5J1nAYCfnJHJdnMSLl5S5QgcpbTGOn8xZhja4lWSdUgz9 ou1A== 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=dBiawe791lYoIBQCs7QK6giwbxNTYFLKTnDb5R8dqS0=; b=bs9jfTH0L9RDIJbNRCNBHucyx2UYnuhRJbJHsYBj05QEJZGUfQhdfAJ48oWWpgT1La 0NisiMdTCXyt9ksT0j4vWHKK1VI/tDBsps+GvH5ArncW5BvX4KFvqKAOHGxnV5kjPK4e Qm28oC3k57w/5R8lKLkrKuQRHtMyIWzTNQpVT8NjPsTHX7IiIfMJ6Vz75kqM0h3KI8Sr Z9In1OF5gUcKbBaiq2XoqCVxlzhNykh4kXD26YcyAO1PnyNrONIoosGsDGVKR88WoC21 OOTA8UYdOmSUn8BAGqNS0NVH6jWCnrdgnLUlf8woAwOD0X6yqUW6tihRsPa9NEJAvENX tZMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y0OZ8All; 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 w141si12580199ybg.104.2020.08.15.08.09.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Aug 2020 08:09:57 -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=Y0OZ8All; 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]:56534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6xoj-00078f-4w for patch@linaro.org; Sat, 15 Aug 2020 11:09:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6xjr-0000Ce-O9 for qemu-devel@nongnu.org; Sat, 15 Aug 2020 11:04:55 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:41004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6xjq-00070q-2Y for qemu-devel@nongnu.org; Sat, 15 Aug 2020 11:04:55 -0400 Received: by mail-pf1-x443.google.com with SMTP id a79so5956340pfa.8 for ; Sat, 15 Aug 2020 08:04:52 -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=dBiawe791lYoIBQCs7QK6giwbxNTYFLKTnDb5R8dqS0=; b=Y0OZ8AllOD5DujnIV1vAfAMUQ+nhueZA2VLFJ7lFAqqwprfXOJ3CMGbLgVJm1KYndn RB0QLVMaNMcYtErlMaDlWSCeUutVOH5UPT3C0UmYaqMejq3UoBV4S0SlOxvKe0OiqMoW BG36Y4smEucuvgfSeQFzUFh4kk6wMMFKFpV/c9RfGnk7X5CsQdyjAXAds27zC0WAYJwI l9tdVKMM1KP5XWY4O4n7/dn51kaTAt3o9WBVOR7xUYCHsLwRAIuqlruY+RlbMkLA/zz7 1pwvLMZlxiosFl0cbBFA/T1BQ66CfC81ZbsC3bKXIcmm5kJovYwVMcVWxfPZ/W7+m5ex U9rw== 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=dBiawe791lYoIBQCs7QK6giwbxNTYFLKTnDb5R8dqS0=; b=HODZmntwTbtPT92wKI10f78cDM2IMyvAWPNYUoUhIYPBXB3YndYb7+Hr2a+c6S/1P2 9E6JSzYkqY3+OjPtp/QpQ1mGwwsBqMIvI/vkKBRGY/2la3scNz3eHutDfmFC4ySeCe6w 3ZcqbRfgG/T9qjLJbtEQ5HjFfmDr/1ItJNjts9mhiWfdeFchaf03n8L2lv/xukcCNvJh lfSpCsDqGWmfGBSo00U6hv00N3U672fsoH9eFy45IHXtUlyJhoxPqjljoJR7ky9IxZmg 6V79RDwARqcXBboALiDp7h6wefh9sKuvQB3Z8fZOHtqzH+gZMOhJTqvVdaPIWFizLkCa A4XA== X-Gm-Message-State: AOAM531EU2NLDNOTofUGwRKmDq46svszAOg/TOoA3DEmSf+WunXqrsCt 33oAikPl1JGrCMD0PO2DwOznMW4O+4IpOg== X-Received: by 2002:aa7:8f0d:: with SMTP id x13mr3684359pfr.193.1597455110749; Fri, 14 Aug 2020 18:31:50 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id y196sm10625528pfc.202.2020.08.14.18.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 18:31:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/20] target/arm: Split out gen_gvec_fn_zz Date: Fri, 14 Aug 2020 18:31:27 -0700 Message-Id: <20200815013145.539409-3-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::443; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x443.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" Model the new function on gen_gvec_fn2 in translate-a64.c, but indicating which kind of register and in which order. Since there is only one user of do_vector2_z, fold it into do_mov_z. Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 88a2fb271d..28e27c55b5 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -143,15 +143,13 @@ static int pred_gvec_reg_size(DisasContext *s) } /* Invoke a vector expander on two Zregs. */ -static bool do_vector2_z(DisasContext *s, GVecGen2Fn *gvec_fn, - int esz, int rd, int rn) + +static void gen_gvec_fn_zz(DisasContext *s, GVecGen2Fn *gvec_fn, + int esz, int rd, int rn) { - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - gvec_fn(esz, vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), vsz, vsz); - } - return true; + unsigned vsz = vec_full_reg_size(s); + gvec_fn(esz, vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), vsz, vsz); } /* Invoke a vector expander on three Zregs. */ @@ -170,7 +168,10 @@ static bool do_vector3_z(DisasContext *s, GVecGen3Fn *gvec_fn, /* Invoke a vector move on two Zregs. */ static bool do_mov_z(DisasContext *s, int rd, int rn) { - return do_vector2_z(s, tcg_gen_gvec_mov, 0, rd, rn); + if (sve_access_check(s)) { + gen_gvec_fn_zz(s, tcg_gen_gvec_mov, MO_8, rd, rn); + } + return true; } /* Initialize a Zreg with replications of a 64-bit immediate. */