From nobody Mon Apr 7 19:17:47 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=1678392661; cv=none; d=zohomail.com; s=zohoarc; b=ErighnF+zL5nrvx6NZWdiP5FHk9Hc5nAiMyXzwkWDaADje0yQ27xR9/H8KEXu7ewCbn2oQ1XF/dSjR9cSuEzh1IY77GXlff8tWKAKXjAUcTdZMteDvmWlFJ//nhOHFK3RvDB8PcEnA50ThpCITfO+0cxHXdWridT22igAm7B8+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678392661; h=Content-Type:Content-Transfer-Encoding:Cc: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=AhVatxhyEldE+yYtq9OhUIXdN3LtIGdHxXg5mFLB9H0=; b=Iqx1ylO7BKi9w39HeiPAHKoo7+EEf6gT2F57dNkagDSO2m+LsmY5XRqp1vLhLpsIQDtU1g7WGOJLJbThGiUdKBAkZCZeCsmAqvPOSxWIE9HC6kCh5RYeL09R3VdHN3R+yCFX/IjFcDBeQvU0/TIThCY3AyCiMddpnpbDPkuouCM= 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 1678392661481807.0173772442195; Thu, 9 Mar 2023 12:11:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paMa1-0003XC-8D; Thu, 09 Mar 2023 15:09:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paMZx-0003Ft-84 for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:09:33 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paMZv-0001V9-I2 for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:09:32 -0500 Received: by mail-pl1-x629.google.com with SMTP id i3so3213342plg.6 for ; Thu, 09 Mar 2023 12:09:31 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:bf7f:79a0:a976:bdaf]) by smtp.gmail.com with ESMTPSA id c2-20020a170902aa4200b001991e4e0bdcsm43797plr.233.2023.03.09.12.09.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 12:09:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678392570; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AhVatxhyEldE+yYtq9OhUIXdN3LtIGdHxXg5mFLB9H0=; b=yvpync0BOdY6b474bVQSKKzLuW/NLcKAhz9gCr1FWnTqGdofysBuYHBAx4zrfchbPI oNA54PEfT+qGV/HaElvcJdlSFtZaNiNNGDivCAsY9oXrZZiRIvwQyj0JbIaxNkGjr9tJ goT8aVkhLbPw0BfJFF21F+d8JR4Gse0a8H38ZFNcFRq1h6VSFml63g+VRevRLfOSAP1F U6En3uBXJbtfIWPWEynOJfFuAVBpE4cl4t8dY2dbN9RbF6WSuCz8stdyeC9K1weYgcZw l49fiQtNiEa0MsD58x7p9U5/DoeevfcRuF2Ode/WVroXEALlRoP/cvuZgLw9qUFu9qBr n5Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678392570; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AhVatxhyEldE+yYtq9OhUIXdN3LtIGdHxXg5mFLB9H0=; b=2G8KDy0vtR3CIj8sfufrJUgDMdWDW2cL9wf0mUeWcU2w3d9iGDijR7vv8UJAUuyy4T B8JizwMwp6hhRjyUob9bxTegNn7tXnM26jXRrYBY8ZZsyf3cdDXdGMXIfQf5mpc1nhah ffFBZieyeaFXdC2IvId++1GWqkl+RxvXhDZSujx6Um3vHUNUpnWAVgqZMX53udWijvhe 2yZ+UrYP5HaQkeLxvgpkpBECuZUu9DJQ2UXQ7GcHExJA8kZ2ZiJU67p+9GfT25+H5gd/ 5Jmvt1Uz3fOPePGkPUdBH6p63B3lI9TtrJUNJeasEk8uN1owO+wG46nsR7KNNxXekBGO 2shg== X-Gm-Message-State: AO0yUKVembhNtU6+vbm9UlccEPqFkUsFeMXIqW5gUpqxrSl/YvBsNXs0 ewJmJAobEaxU/GYC5lFltoQtFIBBa0rdCOjndG8= X-Google-Smtp-Source: AK7set9SH33risq78fSCIK/I517gwECeLHQmfSbPe0bRVDOsKt+ceHCiJsrLIgSad4+znFsWnbDnaQ== X-Received: by 2002:a17:903:11c4:b0:19e:f315:98d with SMTP id q4-20020a17090311c400b0019ef315098dmr8388644plh.43.1678392570300; Thu, 09 Mar 2023 12:09:30 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL v2 43/91] target/hppa: Avoid use of tcg_const_i32 throughout Date: Thu, 9 Mar 2023 12:05:02 -0800 Message-Id: <20230309200550.3878088-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309200550.3878088-1-richard.henderson@linaro.org> References: <20230309200550.3878088-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1678392661834100001 All uses were read-write, so replace with a new allocation and initialization. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/hppa/translate.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 3ea50d0cec..6a3154ebc6 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -135,8 +135,6 @@ #define tcg_gen_extract_reg tcg_gen_extract_i64 #define tcg_gen_sextract_reg tcg_gen_sextract_i64 #define tcg_gen_extract2_reg tcg_gen_extract2_i64 -#define tcg_const_reg tcg_const_i64 -#define tcg_const_local_reg tcg_const_local_i64 #define tcg_constant_reg tcg_constant_i64 #define tcg_gen_movcond_reg tcg_gen_movcond_i64 #define tcg_gen_add2_reg tcg_gen_add2_i64 @@ -228,8 +226,6 @@ #define tcg_gen_extract_reg tcg_gen_extract_i32 #define tcg_gen_sextract_reg tcg_gen_sextract_i32 #define tcg_gen_extract2_reg tcg_gen_extract2_i32 -#define tcg_const_reg tcg_const_i32 -#define tcg_const_local_reg tcg_const_local_i32 #define tcg_constant_reg tcg_constant_i32 #define tcg_gen_movcond_reg tcg_gen_movcond_i32 #define tcg_gen_add2_reg tcg_gen_add2_i32 @@ -574,7 +570,9 @@ static TCGv_i32 load_frw_i32(unsigned rt) static TCGv_i32 load_frw0_i32(unsigned rt) { if (rt =3D=3D 0) { - return tcg_const_i32(0); + TCGv_i32 ret =3D tcg_temp_new_i32(); + tcg_gen_movi_i32(ret, 0); + return ret; } else { return load_frw_i32(rt); } @@ -582,15 +580,15 @@ static TCGv_i32 load_frw0_i32(unsigned rt) =20 static TCGv_i64 load_frw0_i64(unsigned rt) { + TCGv_i64 ret =3D tcg_temp_new_i64(); if (rt =3D=3D 0) { - return tcg_const_i64(0); + tcg_gen_movi_i64(ret, 0); } else { - TCGv_i64 ret =3D tcg_temp_new_i64(); tcg_gen_ld32u_i64(ret, cpu_env, offsetof(CPUHPPAState, fr[rt & 31]) + (rt & 32 ? LO_OFS : HI_OFS)); - return ret; } + return ret; } =20 static void save_frw_i32(unsigned rt, TCGv_i32 val) @@ -613,7 +611,9 @@ static TCGv_i64 load_frd(unsigned rt) static TCGv_i64 load_frd0(unsigned rt) { if (rt =3D=3D 0) { - return tcg_const_i64(0); + TCGv_i64 ret =3D tcg_temp_new_i64(); + tcg_gen_movi_i64(ret, 0); + return ret; } else { return load_frd(rt); } @@ -3330,7 +3330,8 @@ static bool do_depw_sar(DisasContext *ctx, unsigned r= t, unsigned c, /* Convert big-endian bit numbering in SAR to left-shift. */ tcg_gen_xori_reg(shift, cpu_sar, TARGET_REGISTER_BITS - 1); =20 - mask =3D tcg_const_reg(msb + (msb - 1)); + mask =3D tcg_temp_new(); + tcg_gen_movi_reg(mask, msb + (msb - 1)); tcg_gen_and_reg(tmp, val, mask); if (rs) { tcg_gen_shl_reg(mask, mask, shift); --=20 2.34.1