From patchwork Tue Apr 26 16:30:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566057 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3781552map; Tue, 26 Apr 2022 10:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0HeBDjiwQ1EIHQ9f1+pigoTOim9pUt1BI8uGE+69M4Iyv1vIW7/gEYy+eVpMGlZgPEPhr X-Received: by 2002:a25:9845:0:b0:628:99a6:55ed with SMTP id k5-20020a259845000000b0062899a655edmr21572782ybo.221.1650993135148; Tue, 26 Apr 2022 10:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650993135; cv=none; d=google.com; s=arc-20160816; b=xwSvxPGGzED0lZgw/6Ui3JwATp7aCOkKyNIWXYGK/lfeuku+S0dKudrv4EuYUyGtn4 JhW+7sS5pb3Tc56hL0a2EeRwH5Ep9UO/6R3RGJoOML4lN9g3DZr91XnIjK3SwEEqArY7 pKILdS4n4mF3pDGcWKDVOTFKIhsOT1H2pIoBVBMkHsw59ES9TZZJzMK6icjlXhlmQUsE 9sfMCUiHOaeF7nDGD7M/aGq0qDSDuYasKIaimupR6NMQTI+qPJND25owpfHWxRC4VWdo 5ZKUhl7GeQCiRNOe1na9O237ZLFNCYhAapcNx5voQtX5m578YHKv/qgSZKHfUPbr+CVo s6XQ== 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=YpVs0/2D2cp0hUUGtxDD8k8vZGg2jdZBOZb+I5K1m6k=; b=uGiEPCla8eiFI1/LwCRbGiPKSUk3XaKAq/MqHMwKmuWwa+ZptgMGiNVUhFXLFPBgMI Iy9JTgxOiodFuXw2EwBfOeJzN9wmKJrYh0wrpIqEei9+B2X1e1hwxzqhKAq96XIagCGb CNBlvK4gqQWxim6aevqQiz/MfL5Lfz6uNhKKsu/fsfspkKSIMkBvsQlpTEw6tmqvg2NY 1cxMkf2Y9lcVlBneXZqHZeu9/0nnH3JXYzXWo4OqFxZZ2ya5L7xLFzTVyRmy8veA1VEw M84tr9DVxBueQkSxxwNYAMe8WtWj/ewrCm8onsKMujYJ/Ufgx7B3E+jiHOAB4qN3zuXs xQ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jB0PpkXV; 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 s63-20020a815e42000000b002ef21e2e4edsi15413245ywb.205.2022.04.26.10.12.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 10:12:15 -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=jB0PpkXV; 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]:51488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOjW-0003Wq-K6 for patch@linaro.org; Tue, 26 Apr 2022 13:12:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5z-00039H-Mz for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:27 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:33018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5t-0003uQ-L7 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:20 -0400 Received: by mail-pj1-x102b.google.com with SMTP id cu23-20020a17090afa9700b001d98d8e53b7so2308268pjb.0 for ; Tue, 26 Apr 2022 09:31:14 -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=YpVs0/2D2cp0hUUGtxDD8k8vZGg2jdZBOZb+I5K1m6k=; b=jB0PpkXVDcFxRznSedfvgGZQIOEZ8l5W9TfuJgkltcOVu44+0DDGnwnHqOCMffWBpC I/gFzzD/G0Pk9jLDA0bbJIQVOhpG2NgkOuOLSgyEFLp3HmlXRnIcC3rq8evOEiww+CLF z598SFi1H3th36EmHMLZ5zDdP5w8XnCTPKLJNMj8QJmuny8wgQkNe8IWExfhvSnu6Ipr Mi23yiFsabWmVbO8jNbkHyqG3XPEd1nFVjmPuEOS97XYRJV0qeiUAgHNvzOMa6BPwBCX VayifpSJCCQ/ZC0T7AcfLM9AW+MA4YOjKDanhf57elLPz0SfuI7nVofuxy1Xj5Q/VxQ9 6SrA== 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=YpVs0/2D2cp0hUUGtxDD8k8vZGg2jdZBOZb+I5K1m6k=; b=trfb8cG+M2+QshUsYppDUuWEIhM5CgPOqNqZFIuT1PERGB28WwY28o4wPAfrr6hJRu 7sNGILFG6S5ui/k8t1P5eU7nHAfQoRyxwiBfVP4BSRDy2AjyiS30kKfAcZpDa7xM27j+ QIDVxZdixYqPkZYaDwauvB3IrnqlZioKJ6QHE/tDRVQZLRgRK/v5zv0ba6yUq6ZvGiJ2 QwSh1kp+yoATiXESVa4TpIS7TF6/19Z3xpoDCOF/MoT0V640oXw8EV1R/ae4bRTRU8mt lqV53hU0bq4AyvDdQo5TUq5jara3kth3DDdcsnVYgk2Sz59iBpENBWAZhqBo9B9VikfW jtEw== X-Gm-Message-State: AOAM530oDN+z+N3AlrApXrefNtwP151l04pWZCR5Up3UHYCLyR4JUc6j taqF7FI+YDtJg1zpUx6Yk3DezvlVJQrcuA== X-Received: by 2002:a17:90b:4c46:b0:1d9:f9e1:254 with SMTP id np6-20020a17090b4c4600b001d9f9e10254mr1634983pjb.24.1650990673596; Tue, 26 Apr 2022 09:31:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 31/47] target/arm: Use tcg_constant for TT, SAT, SMMLA Date: Tue, 26 Apr 2022 09:30:27 -0700 Message-Id: <20220426163043.100432-32-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::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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=unavailable 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.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index b604a820c0..24e522e1d6 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -6596,8 +6596,8 @@ static bool trans_TT(DisasContext *s, arg_TT *a) } addr = load_reg(s, a->rn); - tmp = tcg_const_i32((a->A << 1) | a->T); - gen_helper_v7m_tt(tmp, cpu_env, addr, tmp); + tmp = tcg_temp_new_i32(); + gen_helper_v7m_tt(tmp, cpu_env, addr, tcg_constant_i32((a->A << 1) | a->T)); tcg_temp_free_i32(addr); store_reg(s, a->rd, tmp); return true; @@ -7564,7 +7564,7 @@ static bool trans_PKH(DisasContext *s, arg_PKH *a) static bool op_sat(DisasContext *s, arg_sat *a, void (*gen)(TCGv_i32, TCGv_env, TCGv_i32, TCGv_i32)) { - TCGv_i32 tmp, satimm; + TCGv_i32 tmp; int shift = a->imm; if (!ENABLE_ARCH_6) { @@ -7578,9 +7578,7 @@ static bool op_sat(DisasContext *s, arg_sat *a, tcg_gen_shli_i32(tmp, tmp, shift); } - satimm = tcg_const_i32(a->satimm); - gen(tmp, cpu_env, tmp, satimm); - tcg_temp_free_i32(satimm); + gen(tmp, cpu_env, tmp, tcg_constant_i32(a->satimm)); store_reg(s, a->rd, tmp); return true; @@ -7915,9 +7913,7 @@ static bool op_smmla(DisasContext *s, arg_rrrr *a, bool round, bool sub) * a non-zero multiplicand lowpart, and the correct result * lowpart for rounding. */ - TCGv_i32 zero = tcg_const_i32(0); - tcg_gen_sub2_i32(t2, t1, zero, t3, t2, t1); - tcg_temp_free_i32(zero); + tcg_gen_sub2_i32(t2, t1, tcg_constant_i32(0), t3, t2, t1); } else { tcg_gen_add_i32(t1, t1, t3); }