From patchwork Tue Apr 26 16:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566041 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3765681map; Tue, 26 Apr 2022 09:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEN/RmEDcY6ZEsfZy/995lW//zy3wkjJmMLdP3ZSYpsaJ8isC/dn76NvaQCRx+ppGWF0q9 X-Received: by 2002:a25:6d85:0:b0:645:192e:31ed with SMTP id i127-20020a256d85000000b00645192e31edmr21089393ybc.16.1650992010047; Tue, 26 Apr 2022 09:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650992010; cv=none; d=google.com; s=arc-20160816; b=XKzh0Xuw0JVun8+J2cd8F6cIGJSGqRSDNenQJ9gBTRBF9x79HcmBmFCb+WGfC2tkyy ETg8T3nEXhv3zcBxb8zn4S62GQndIsY6iHhtLoUQ/O8dfuvM3tzJ616EJcqLQwnLmS72 1eCetL+7ZYwBPDmL/r6hl2Ej3kEVzrxbqmKnate4JQcsGaCddEk9zQFi6TeEPEgApBzs v4g0dPnwhXfyov7dXk2XF3yup2hWuZxNq4cNCyJS/eaEJR/sRsC4P2m5AA8kDWFKditl pYw6ljYOTfhnkrVK6PDDQpnPZ5KeU4KZDBCl41QH8SpCgws+D0kTzFRivrg/cFLleaQ+ Nkdg== 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=jXIwkULLtYjwWB5mFtKYDvoLy2jORO/B+nK9qMPIgn4=; b=MBZTmvaUxZu4FoPs6WvsBczOVuchh21J1Vt7X5Z7vFZDX4H7IPzsM3kGMAox9FFZYB bLxfm9V4TXibDmDBLEBzj4D7YYgIBFCWucd66cUnBh7CUBkM3fuwev/+QcaarTKyY96T wCBNyjovIXUqixactXiCvsXRfeRK6F278eRwsAN47p7bFUATrysdmpuvWkvjRCt+2b3N K3KTJtAOy2x9RFrJls/JDggBDsEHB5LWDZoE8sZeb/vmHekAKBreGUcvL7sUW2DkncpC wmFwND9gnIoDX62wSoSJNTKGfKzIe2n2RFcnS1oEre1KisAt7ADDcvCXSHcpoerMTHFr WODA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AkGzlSGR; 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 s124-20020a255e82000000b00633994043c6si15697574ybb.48.2022.04.26.09.53.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:53:30 -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=AkGzlSGR; 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]:33658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njORN-0005bd-Jn for patch@linaro.org; Tue, 26 Apr 2022 12:53:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO62-0003B6-1q for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:39 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:38611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5z-0003yi-5X for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:24 -0400 Received: by mail-pf1-x42b.google.com with SMTP id b15so18448131pfm.5 for ; Tue, 26 Apr 2022 09:31:21 -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=jXIwkULLtYjwWB5mFtKYDvoLy2jORO/B+nK9qMPIgn4=; b=AkGzlSGRdiI8w8LDdwpf3Hy7O6+ahwsuolzdl/QMo17NPsAYbmaYf15o8YGl0JSdw+ guxcg5FqYC7TV26gNC9aBtZkNhuhmUB4nHUaRZ+W5zQPVHpd8A4O9M0XpnWHOvr0J5Gj tBG2uriwZYbP/h+Zpn/VQfcPTsk1YqlpYTFqyrf/k91/flg8OjCSUGklyq6AZQfNotuN 1GtCskwkT0RCUY8VJwQauRfQT5EjLoVpuBoFqxmo4pVOqY2MMDOCo3Qljr5bisIqQayk UG3iF4cg+qn10uVNR5y06EmUWmV59GXC4zD//RSQF9Fj6N6zW8ESxKsXLpn/wJZOvgz+ cvgQ== 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=jXIwkULLtYjwWB5mFtKYDvoLy2jORO/B+nK9qMPIgn4=; b=4bXT4TRXbUrn2K6efswNaF+K2E6E1ZaAcHwzFMFkpoAjFDws2qWktICztRg5CiEFoy USS23ZrzCCpb3Bm4CrO/30R9hVPrr/vrg1jImWrYmAexXLeycTDv/sBTCPzSaWb5mcjY v9q8ovo8cnEtN6Rfr4Vqd1GU4S/aEUuWXgFiaTwHoEu2WjLUcdUItjhA4aXD2lV5YdP4 iuCi7S3MdmY/ba0jYfH5lezl+xSJOEXNA2yJoS5QlRroephvrAdqAt3IkTWxRigoF5Js GluvUQWZ2mh/9NktjDVIvCN6wB36FrvnscLk7kF/ml6h422Vk9TRSIxWXkbVkXPxPCOf ZN7A== X-Gm-Message-State: AOAM5315byG7+JXzpEzgFTjvU3g+0SYzp3x6vo3RyTu8kw0N6IEWFE1P d7LSHwmmqoS1rV7Q9dwtQs02HlRsG2bLaA== X-Received: by 2002:a63:2acd:0:b0:3aa:86eb:3dc with SMTP id q196-20020a632acd000000b003aa86eb03dcmr20090038pgq.441.1650990681104; Tue, 26 Apr 2022 09:31:21 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 39/47] target/arm: Use tcg_constant in {incr, wrap}_last_active Date: Tue, 26 Apr 2022 09:30:35 -0700 Message-Id: <20220426163043.100432-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index ef57d3a2b4..c3d3f301c9 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2793,11 +2793,9 @@ static void incr_last_active(DisasContext *s, TCGv_i32 last, int esz) if (is_power_of_2(vsz)) { tcg_gen_andi_i32(last, last, vsz - 1); } else { - TCGv_i32 max = tcg_const_i32(vsz); - TCGv_i32 zero = tcg_const_i32(0); + TCGv_i32 max = tcg_constant_i32(vsz); + TCGv_i32 zero = tcg_constant_i32(0); tcg_gen_movcond_i32(TCG_COND_GEU, last, last, max, zero, last); - tcg_temp_free_i32(max); - tcg_temp_free_i32(zero); } } @@ -2809,11 +2807,9 @@ static void wrap_last_active(DisasContext *s, TCGv_i32 last, int esz) if (is_power_of_2(vsz)) { tcg_gen_andi_i32(last, last, vsz - 1); } else { - TCGv_i32 max = tcg_const_i32(vsz - (1 << esz)); - TCGv_i32 zero = tcg_const_i32(0); + TCGv_i32 max = tcg_constant_i32(vsz - (1 << esz)); + TCGv_i32 zero = tcg_constant_i32(0); tcg_gen_movcond_i32(TCG_COND_LT, last, last, zero, max, last); - tcg_temp_free_i32(max); - tcg_temp_free_i32(zero); } }