From patchwork Mon May 30 16:06:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577287 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp455326mag; Mon, 30 May 2022 10:55:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEyyjqlboUe3xE+n5niTDwJrODNZmZElkhh4pDz89GZQvUOYCEszCEdnHFjTjqR3VSnGqn X-Received: by 2002:a05:6214:2305:b0:432:f1d4:6177 with SMTP id gc5-20020a056214230500b00432f1d46177mr47324652qvb.107.1653933341969; Mon, 30 May 2022 10:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653933341; cv=none; d=google.com; s=arc-20160816; b=eXe96EmmLhsucb7hacIF7n2W5r/EKAAiopqn4ruqbei3FixYGSa3rxSuP8uwWGuYsX Q/6Tdbq702x1oNf8qau+coECED3LyKOBHl5EQ3W++td0PwozV1FNyOyYsKZejCwFKhQn eFYaMU2MbxsDNFPZ8WW89oqTKO3MAVfieZT9k8zgRAEt8fx4QBBnghIy/PebEOigW+mN poZMcHHvYoZo0hvVRKzCf2TCkP6UqFIWxX6KKCU6AlvhKJvREVZHPZ1whQtfWWl2Wkfo E2BLjVhxxWvkkmPNbHznvU7Ne/i+MEJl2je6Cbq6Mh7DmpHzuYAYZgT9bR9hM90mLKsA IuhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=FxzHVzxVkAxcyI8QXKeeoZG6KAKGnqDgd9OEcCOgJmAKxa0OBTV4Tkjkxs2xSEmtnm ehnJWwziWAk6smOfEhSN1xbI5E7RXg6FqpxWtL3GoJBF8J9dnLkcJjNC3Oxo3BoozA0J RAita7YZIXs4MSYMH9vetBIP+7/LHOAEVP1CC11f0NpFjyMV1hEet9DyOYV53S+o7X6g lv4kRl/9LqrwFvCeJ+2OdfBKd++68jARZYy6HYKamT2KH6JPV+DYZq19SSB+qbv+Stg7 y2KIWXTdw3vhTs/W0dLx4iZhrDZqoas9l04Fuu7ov8Yjoel3KBuSr9AqabyUIXR4Khk8 LTeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ap26YMBt; 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 h9-20020a05620a284900b0069f38f14eb8si8185335qkp.84.2022.05.30.10.55.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 10:55:41 -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=ap26YMBt; 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]:46512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjcD-00052v-Gm for patch@linaro.org; Mon, 30 May 2022 13:55:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwf-0004Db-Uj for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0007Aj-IG for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: by mail-wr1-x42b.google.com with SMTP id e2so15314489wrc.1 for ; Mon, 30 May 2022 09:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=ap26YMBtCQ2ftZKvNv2zQrQcmKGZ54Qeyn3lNLRTbWjhSP5C/hQ/oBSqxwbWkjckaz UF3T53K/IrFm7XAKqwBnRYEk0cqAX0uKXxLUQ0pIlHk4VziJIgL0KbuEywbmbx6ehib7 NMpIOFE1EY+3NdhCBzwH3D1mRnnNZRbXT3wtTalAtXYxqvSEdV9sl0tEmbTlFZ2OmVCD gqip2BUe87hdgIwNmXqZbu3lGhLtHy9+8VRHaXat2pF9+PXb/bru238nqJiNwQp5Q8k6 tJu6FwG5bGL+54Tq1EiWt7IKcOKiye7XoDnHPAtLMGGfXqn7zhRyw95JzI81T4Y3MjQ5 kcGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=4UB+/NMe7gyxniP3XjJG393ISbvjnfotM4EvW0s80eAVlBmccjSOgKpvwQ9bXndU7E V/rIiBXSb2RAzyXdtjwP/3/cUo21iWs2hKdUB6iLkFm38klI6ZlPV3W7nbJtiXTvUuad cl2tOAcLNExzhmc3Vu650VH7vsl0LuHD/qmiQpo+SMTtumgAIljDo+tc0h3uvA2wueTE 2yn4IiKdC5dV4n728LRfyS3wWTRw/hzC+k5C+S7XXoh1IdVfMqZ4L3fQqiFeiP5XPYtL 1M1VU7CCIBDjcmQ9RoTCHHERLZxgUUbRQl3sQAIAiP/DksY5Y7FlDUI+lIwCiy+glsup /iXw== X-Gm-Message-State: AOAM530Zg6nAlujrqD9Md5TnUbAj4TzoEOFrLxmtNReyHf+mpoVJWgEy 32NLmVXI9mGI1S6xn06/MZV8xFhzgzm7qA== X-Received: by 2002:a05:6000:3c1:b0:210:2e6d:86cd with SMTP id b1-20020a05600003c100b002102e6d86cdmr7214844wrg.335.1653926905683; Mon, 30 May 2022 09:08:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.08.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:25 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 082/117] target/arm: Move sve check into gen_gvec_fn_ppp Date: Mon, 30 May 2022 17:06:33 +0100 Message-Id: <20220530160708.726466-83-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Combined with the check already present in gen_mov_p, we can simplify some special cases in trans_AND_pppp and trans_BIC_pppp. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-80-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 364e419f3eb..f33bc9d480b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -370,13 +370,16 @@ static void do_dupi_z(DisasContext *s, int rd, uint64_t word) } /* Invoke a vector expander on three Pregs. */ -static void gen_gvec_fn_ppp(DisasContext *s, GVecGen3Fn *gvec_fn, +static bool gen_gvec_fn_ppp(DisasContext *s, GVecGen3Fn *gvec_fn, int rd, int rn, int rm) { - unsigned psz = pred_gvec_reg_size(s); - gvec_fn(MO_64, pred_full_reg_offset(s, rd), - pred_full_reg_offset(s, rn), - pred_full_reg_offset(s, rm), psz, psz); + if (sve_access_check(s)) { + unsigned psz = pred_gvec_reg_size(s); + gvec_fn(MO_64, pred_full_reg_offset(s, rd), + pred_full_reg_offset(s, rn), + pred_full_reg_offset(s, rm), psz, psz); + } + return true; } /* Invoke a vector move on two Pregs. */ @@ -1317,19 +1320,13 @@ static bool trans_AND_pppp(DisasContext *s, arg_rprr_s *a) }; if (!a->s) { - if (!sve_access_check(s)) { - return true; - } if (a->rn == a->rm) { if (a->pg == a->rn) { - do_mov_p(s, a->rd, a->rn); - } else { - gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->pg); + return do_mov_p(s, a->rd, a->rn); } - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->pg); } else if (a->pg == a->rn || a->pg == a->rm) { - gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->rm); - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->rm); } } return do_pppp_flags(s, a, &op); @@ -1358,10 +1355,7 @@ static bool trans_BIC_pppp(DisasContext *s, arg_rprr_s *a) }; if (!a->s && a->pg == a->rn) { - if (sve_access_check(s)) { - gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->rn, a->rm); - } - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->rn, a->rm); } return do_pppp_flags(s, a, &op); }