From nobody Fri Dec 19 04:32:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1651157881; cv=none; d=zohomail.com; s=zohoarc; b=lG7ZcVd0x1IRJ6mlR1Q4vDhtOH8bibvtAm/bAmkPm55qh8nxngCZjuYdBHMuyeLY71DEUGI05a1OFxTUsi2gMbUj9CbhI9pGpgGm1PZn5cjJo8r1e61xMyZPI2CP4HPGLKXAs8FDZhTKC+1RxoalfyX4EHQd9yX1xXSMrYkcCZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651157881; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TToOuQ00Opv88KW2xx2NAPX9wVF7lWH1d++1SoemDaM=; b=MYAXHNSzqOSsa6mJAMJPtIqjDx07nyz4Ob/lXJ6wZ3ivuStpcPINfF+OSy7gjbWcU2PtLkEL03AUy8V8w57yO/USZ+K5nx78U2IyyYvV/k99yidLwmD4NIl/oZqI7q8enFRlPcgEaMAor9M61y2DZFUirYiIS3pRJndQr7YfU4g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165115788164432.392246888712634; Thu, 28 Apr 2022 07:58:01 -0700 (PDT) Received: from localhost ([::1]:49420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nk5ai-0007JB-Kz for importer@patchew.org; Thu, 28 Apr 2022 10:58:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nk5JQ-00051q-42 for qemu-devel@nongnu.org; Thu, 28 Apr 2022 10:40:09 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:40900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nk5JO-0006CH-FV for qemu-devel@nongnu.org; Thu, 28 Apr 2022 10:40:07 -0400 Received: by mail-wr1-x42a.google.com with SMTP id e2so7081006wrh.7 for ; Thu, 28 Apr 2022 07:40:06 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bh26-20020a05600c3d1a00b003928db85759sm130221wmb.15.2022.04.28.07.40.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 07:40:04 -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=TToOuQ00Opv88KW2xx2NAPX9wVF7lWH1d++1SoemDaM=; b=Rx7twn9sY5TvYgAGIE1bwamKqLQMepvZtdhK56iXJweHPdteBGFW5ffF6zQbkEpz6/ jFGgb2n3ptWnZbiuiki3acY1RNhhpnmRNDL7ulmYDfhv+7HXdl8tj0eGl+6+EI4kGAbP /pkrs1rcG1UO9PUs9PJle+V+fOcX/wCUb1qADIK7Mz2oSBsA/m5LZ+0F/VMAPA9fHLB+ T+Cg82PpPqXP802hksT4Y3MNbnr6FJQy3wl1EewpGvYAp7fBR2gyO2zzKe2MV6HhU+/Z UDxkDnZupwMUo70gZadPsMf64jcfGrSOIxC9LDM/UffRcpbgoS0o58w+Ug0vRFikGoBX sRVg== 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=TToOuQ00Opv88KW2xx2NAPX9wVF7lWH1d++1SoemDaM=; b=jadKNwBSv4A4fjmnj72QeaiOTRhmBdbmFVr5eL0p2d0NUSod3Ix8eRpKPUCNzWAfJj ld9JbZTg1fj3psnvFj7azD/ThNmpdjs7ZLObi64PuNSUPsHk/YNH2IOlP9K2gI33M10/ VoKobtAulKpEcO9mvyeq4LgY7KFHzmKIDH4XLPdkGVnzkw5mv2sna04L5ojKg5vkHxLm KKKuzy2lfeo1HItG//RVe0XAzQeyFbU9v9IgzUKPUPr0OiSn6cWBVgofiSMrdJEabOXG +GVNXrxUMqp0CG3rcF2YMCh1ZcRIjFmVZGAL0kjm4sImayWgLNK2A5rAE2yFPkAQBHKN o2tQ== X-Gm-Message-State: AOAM533ggcTYLtm6Y5Ggp1mosE1N3TWfkLxuUsfytlwTYX8w7+cRiBIv MxBdmJfHMzc0jgA0R4Ef9ULtzVYYFHJwXg== X-Google-Smtp-Source: ABdhPJwLcopbo5ueeU1c6qTiIfRtU0Q/VQfHwdE6tY3Bm5D3omVKPCxp7m+uFII0JF5vCXC2y+Vx3A== X-Received: by 2002:a05:6000:1814:b0:20a:cb21:8781 with SMTP id m20-20020a056000181400b0020acb218781mr24883929wrh.488.1651156805037; Thu, 28 Apr 2022 07:40:05 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/54] target/arm: Use tcg_constant in gen_adc_CC Date: Thu, 28 Apr 2022 15:39:08 +0100 Message-Id: <20220428143958.2451229-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220428143958.2451229-1-peter.maydell@linaro.org> References: <20220428143958.2451229-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1651157882247100001 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Note that tmp was doing double-duty as zero and then later as a temporary in its own right. Split the use of 0 to a new variable 'zero'. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20220426163043.100432-5-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index b0b5e8b26d2..5c0fd897d6c 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -814,15 +814,15 @@ static void gen_adc(int sf, TCGv_i64 dest, TCGv_i64 t= 0, TCGv_i64 t1) static void gen_adc_CC(int sf, TCGv_i64 dest, TCGv_i64 t0, TCGv_i64 t1) { if (sf) { - TCGv_i64 result, cf_64, vf_64, tmp; - result =3D tcg_temp_new_i64(); - cf_64 =3D tcg_temp_new_i64(); - vf_64 =3D tcg_temp_new_i64(); - tmp =3D tcg_const_i64(0); + TCGv_i64 result =3D tcg_temp_new_i64(); + TCGv_i64 cf_64 =3D tcg_temp_new_i64(); + TCGv_i64 vf_64 =3D tcg_temp_new_i64(); + TCGv_i64 tmp =3D tcg_temp_new_i64(); + TCGv_i64 zero =3D tcg_constant_i64(0); =20 tcg_gen_extu_i32_i64(cf_64, cpu_CF); - tcg_gen_add2_i64(result, cf_64, t0, tmp, cf_64, tmp); - tcg_gen_add2_i64(result, cf_64, result, cf_64, t1, tmp); + tcg_gen_add2_i64(result, cf_64, t0, zero, cf_64, zero); + tcg_gen_add2_i64(result, cf_64, result, cf_64, t1, zero); tcg_gen_extrl_i64_i32(cpu_CF, cf_64); gen_set_NZ64(result); =20 @@ -838,15 +838,15 @@ static void gen_adc_CC(int sf, TCGv_i64 dest, TCGv_i6= 4 t0, TCGv_i64 t1) tcg_temp_free_i64(cf_64); tcg_temp_free_i64(result); } else { - TCGv_i32 t0_32, t1_32, tmp; - t0_32 =3D tcg_temp_new_i32(); - t1_32 =3D tcg_temp_new_i32(); - tmp =3D tcg_const_i32(0); + TCGv_i32 t0_32 =3D tcg_temp_new_i32(); + TCGv_i32 t1_32 =3D tcg_temp_new_i32(); + TCGv_i32 tmp =3D tcg_temp_new_i32(); + TCGv_i32 zero =3D tcg_constant_i32(0); =20 tcg_gen_extrl_i64_i32(t0_32, t0); tcg_gen_extrl_i64_i32(t1_32, t1); - tcg_gen_add2_i32(cpu_NF, cpu_CF, t0_32, tmp, cpu_CF, tmp); - tcg_gen_add2_i32(cpu_NF, cpu_CF, cpu_NF, cpu_CF, t1_32, tmp); + tcg_gen_add2_i32(cpu_NF, cpu_CF, t0_32, zero, cpu_CF, zero); + tcg_gen_add2_i32(cpu_NF, cpu_CF, cpu_NF, cpu_CF, t1_32, zero); =20 tcg_gen_mov_i32(cpu_ZF, cpu_NF); tcg_gen_xor_i32(cpu_VF, cpu_NF, t0_32); --=20 2.25.1