From patchwork Thu Jun 18 04:25:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 190983 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1061810ilo; Wed, 17 Jun 2020 21:31:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPaSBZ1fg6yLDbdoza89xRqk9Y2+Ei/uhIe2FmcfHT9QKSjIUB4NF/IODkTRIlHe3XHwP4 X-Received: by 2002:a25:328b:: with SMTP id y133mr3638942yby.468.1592454714150; Wed, 17 Jun 2020 21:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592454714; cv=none; d=google.com; s=arc-20160816; b=TzsJpviAIr/uhJJzi0JP/I/0iPhG7dPhVTta3hLbWvucwI9+rUMKHmrq82CedxeuaU oIzaN0L4TJIL/f2gbHULbLm8zcWZ5i8m3cyO5d2siok7zTb3u+myOrWJ6O/yTD29Kimr 4YFmfX3Sopfxa2rBSjvSYADF6bxZy985tdrOOvAbGvPyDNauSeLxfGA7fIzlEWyATx6p 3voe8uwPy3wk/lITDi2JavRxW8gpq6xf6jo6E4+mUrR0hQpoBy+/tMHzgOnBBfePaRMI OktibYkJboRyZTK3btj8J6RtcPfiugomcJQQWGQrkoSDeFzMtyCpJg4Cz8Tff8NuL4kT zkeA== 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=b3K+zIM1Nh7bQpMoCRdNNiakP69Zq16vTWuZo+DM7NE=; b=ZM40cDK+iXA+L7WdGzZvP73fwESvThuy+Ku8ebVK73OZYy2EJwZnkgb2Ka8BS35sY1 uvtY2hpzKGMPCYAJzWXOpUE3mBqylQGDD1uP8JMRRCk7wQ9ywTtd679HVtiflTWVJRSr 9iVOhpKJXkBRSFKzzTU2iFvKcTVW9c6l27eYGdg3/j0VI6jEILKNrj2mYmKvn1gUfGcJ GzwaXmaI9s+pvGcMR1uEjj8hs7omg9F6F5VjgGEVZOlxxwQKAUv2Whh/cN4bq6m6GrG2 AkSFk1Xtr1FCPQ1j3TYKbgs6g8gMwokqevk4b8XXECB9pckr5ZqG4QERB3F58AK5GCST zn6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EQxNxuLM; 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 j81si1503919ybg.136.2020.06.17.21.31.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 21:31:54 -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=EQxNxuLM; 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]:44008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlmDR-0002SV-ID for patch@linaro.org; Thu, 18 Jun 2020 00:31:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlm8c-0001i1-K1 for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:26:54 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:41560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlm8a-0002Fz-Cf for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:26:54 -0400 Received: by mail-pf1-x442.google.com with SMTP id 10so2185893pfx.8 for ; Wed, 17 Jun 2020 21:26:51 -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=b3K+zIM1Nh7bQpMoCRdNNiakP69Zq16vTWuZo+DM7NE=; b=EQxNxuLMUVLpSKljQbbj/LFwkmPkawLgGeHmeEy0Q3tRdJsXR68E383Q+mPRUGMVAk 7/T85EA2JIxwHY0o++KAeReI/8x0htVgo3A8umD0IPkNEvjQbJlpdNc1KGK1wLxfceG9 rpgIkt9jGh5VMcG5Pdt1eF3ioZFrJTBWYkxToLqaZv82o8N2R8A0uv4T4SH2aYV8tQWg 0DXN6JOkwLHfuwZywfIoxpQrkpHQ9fH4zx7Drj5oZnjJx//Fp1PA0d6NsWuwh+5JU3/z TAm2q0NMfQSN67QBlREJH+HXOUvzM3LQPoEzr5PTEoCrNDWPOuOGCOo8DUQvDeVFu8g/ 4CWQ== 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=b3K+zIM1Nh7bQpMoCRdNNiakP69Zq16vTWuZo+DM7NE=; b=LVgfVUhU/5QKUlLcemFO/GskXWkT9IbJLaxNhHN8LmeouQmSdffXbmuKjramHaVZRd oEFwIsdBK69njDu0237CsgbWzjP9u7PhRfZdCv8sf1RtinkCNW3zYFC/Nt8yd41GuwHF LsZCS8tEk5y/wAU3ewcV5S49c84oq5BTJVQztZsoRNSx4e9zgMfA8u9V3J8RsUtXAZrB izbGCo7JAN9alXamK41VNW1gaxBmeQCTSaTMbeLxMjKl0AXE4i9Od/jwSvFaQZq2kB2k VIBJyQCMvkDUVIlVxO+4HVYjoqjhn0Q90uOPjXRTHnYUEr7AbW1GtPgpSu1CVnU9VYxT hIiQ== X-Gm-Message-State: AOAM531AYLcbekpD57VIKQv3Dmb0HTsggkILQNTJXgSEFY0EWOjFBmsj dbC8IFTtm/UfYtySo88mbkLk0APwDWo= X-Received: by 2002:a62:1917:: with SMTP id 23mr1935522pfz.272.1592454410476; Wed, 17 Jun 2020 21:26:50 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id o16sm1162035pgg.57.2020.06.17.21.26.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 21:26:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 003/100] target/arm: Split out gen_gvec_fn_zz Date: Wed, 17 Jun 2020 21:25:07 -0700 Message-Id: <20200618042644.1685561-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200618042644.1685561-1-richard.henderson@linaro.org> References: <20200618042644.1685561-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x442.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=_AUTOLEARN 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: qemu-arm@nongnu.org, steplong@quicinc.com 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 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index ac7b3119e5..bc286331cb 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. */