From nobody Thu Apr 10 10:48:34 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=1678212602; cv=none; d=zohomail.com; s=zohoarc; b=R+vWRYdwKIahFmmOc1GN2fyEV15j4Bb98ejlqIgrVGut/G7ZXEhzCYb/pOxwW83muBX3ertcOcSU437N4iFKMVPY/o0vGSQZSmtsGSnY1AltInFp7aVjZMRpN01CLax72w42K6hEHoXiR/Ea1EnFCOzAaPqtNR3BrB2DMJI7AK8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678212602; 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=jJzdHK1Fs1NaHPQI0ScuWXrQe88rSwHY7MmaoPNCyJA=; b=CZG8WelXGXbsS4Bfk23PZH72PnbfVviMNcc9Zr5eMK5fqR43Z/Y5U6KWIsCFCL+T4bNRa+x1IySuCNQ2MOzHBt1jTIysKGa42cUR9yy8P1bi7L6Lh2JXOhVKgSMQNYVcyZZtQz6Q61MmXgqburJIrBExp2P95kK3x9Ugy8HjOEw= 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 1678212602718795.2023645753053; Tue, 7 Mar 2023 10:10:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZbe7-0003dJ-AN; Tue, 07 Mar 2023 13:02:43 -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 1pZbe5-0003Gc-6V for qemu-devel@nongnu.org; Tue, 07 Mar 2023 13:02:41 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZbe3-00018b-CO for qemu-devel@nongnu.org; Tue, 07 Mar 2023 13:02:40 -0500 Received: by mail-pj1-x1030.google.com with SMTP id p3-20020a17090ad30300b0023a1cd5065fso12685778pju.0 for ; Tue, 07 Mar 2023 10:02:38 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:b1e0:bfd9:8b1a:efeb]) by smtp.gmail.com with ESMTPSA id z4-20020a63e544000000b00502fd70b0bdsm8080441pgj.52.2023.03.07.10.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 10:02:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678212158; 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=jJzdHK1Fs1NaHPQI0ScuWXrQe88rSwHY7MmaoPNCyJA=; b=SEM/CoZM0m+9x4MGNEyELpPSo9buj6/qeOnOU1C/lkfdFWVWOGGOqn9vk4nH74LaIS Zi3ouMYVnVqAlkmYRY7+Y3+SYr1IrSkih9BxDhXFKqOPkyq9JZAWh9UzvSflKFHB/tCK bD98/HMX1F0bgTiPj0ZA3XqqaCcoKoP/R4Y+dKuByIkHpw82GVBD/mF/Oy+7qUznmtO6 RVbKdwJ8ILpQ1IgwtcT9ZFLR09CBKZ/mwmePb5XOsgHLDk5MxN4oNQdF2f4TEu/zjTww JYg7cls+rBd45GYaNuzx2PhbQF3Mjp1Cvmr7x7vnQSMdL0o2x8Cl76CzoX81ZJDDcP4j kA6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678212158; 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=jJzdHK1Fs1NaHPQI0ScuWXrQe88rSwHY7MmaoPNCyJA=; b=r8sCDSmQobe7wWHNmtJG7obrTXhq46BfuhB1SVbmg0vWZPoepEnJZXnh+MMsr6hWaJ ToCojgT0W7lQMimhiHInMzInRMb8d719s8zf8OGx+wVhKc9+jvC8jVd3zwJjrOJYX5cE 0lGLohjz2fvMMToRGoC6p+7TlVDlW0RdpM4H5kxs1LSVnh1uTfH4M1pfnsjZSYTJznr0 D2Md5XDmZZT+wW6qT8dg9YZL2+/pzZWTSNAdU7jxLEz2mMlk4tLRQOl6YVTEfzGHxQrB xg5p/yVHEmiPDzTh8XSXURqVxTP43kkutROUwNuDKocJBdFsMr/rl1hf5jyXBMwTx7Qh iIRw== X-Gm-Message-State: AO0yUKXZP1rlqSoUfYjNj77aw5F4ADxY5wfF/NvF0uXi2P+luP9d1WxM gIKUMMLYAeDuKCLcUCAdSfSJbDp5G4snQwLl9uI= X-Google-Smtp-Source: AK7set9XDNRvWNztmuJsTlqcdEDO7c2CkSpB6Cq0JMsZXwAdqor7yX8vvdm+KcG0W7fe7JUORHTqIA== X-Received: by 2002:a05:6a20:6996:b0:cc:70df:ae20 with SMTP id t22-20020a056a20699600b000cc70dfae20mr13220980pzk.0.1678212157976; Tue, 07 Mar 2023 10:02:37 -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 60/67] target/sh4: Avoid tcg_const_i32 Date: Tue, 7 Mar 2023 09:58:41 -0800 Message-Id: <20230307175848.2508955-61-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307175848.2508955-1-richard.henderson@linaro.org> References: <20230307175848.2508955-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::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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: 1678212604807100013 All remaining uses are strictly read-only. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/sh4/translate.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 70a45c26e8..97da8bce48 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -526,13 +526,13 @@ static void _decode_opc(DisasContext * ctx) return; case 0x9000: /* mov.w @(disp,PC),Rn */ { - TCGv addr =3D tcg_const_i32(ctx->base.pc_next + 4 + B7_0 * 2); + TCGv addr =3D tcg_constant_i32(ctx->base.pc_next + 4 + B7_0 * = 2); tcg_gen_qemu_ld_i32(REG(B11_8), addr, ctx->memidx, MO_TESW); } return; case 0xd000: /* mov.l @(disp,PC),Rn */ { - TCGv addr =3D tcg_const_i32((ctx->base.pc_next + 4 + B7_0 * 4)= & ~3); + TCGv addr =3D tcg_constant_i32((ctx->base.pc_next + 4 + B7_0 *= 4) & ~3); tcg_gen_qemu_ld_i32(REG(B11_8), addr, ctx->memidx, MO_TESL); } return; @@ -694,7 +694,7 @@ static void _decode_opc(DisasContext * ctx) case 0x300e: /* addc Rm,Rn */ { TCGv t0, t1; - t0 =3D tcg_const_tl(0); + t0 =3D tcg_constant_tl(0); t1 =3D tcg_temp_new(); tcg_gen_add2_i32(t1, cpu_sr_t, cpu_sr_t, t0, REG(B7_4), t0); tcg_gen_add2_i32(REG(B11_8), cpu_sr_t, @@ -754,7 +754,7 @@ static void _decode_opc(DisasContext * ctx) TCGv t0 =3D tcg_temp_new(); TCGv t1 =3D tcg_temp_new(); TCGv t2 =3D tcg_temp_new(); - TCGv zero =3D tcg_const_i32(0); + TCGv zero =3D tcg_constant_i32(0); =20 /* shift left arg1, saving the bit being pushed out and insert= ing T on the right */ @@ -849,7 +849,7 @@ static void _decode_opc(DisasContext * ctx) return; case 0x600a: /* negc Rm,Rn */ { - TCGv t0 =3D tcg_const_i32(0); + TCGv t0 =3D tcg_constant_i32(0); tcg_gen_add2_i32(REG(B11_8), cpu_sr_t, REG(B7_4), t0, cpu_sr_t, t0); tcg_gen_sub2_i32(REG(B11_8), cpu_sr_t, @@ -913,7 +913,7 @@ static void _decode_opc(DisasContext * ctx) case 0x300a: /* subc Rm,Rn */ { TCGv t0, t1; - t0 =3D tcg_const_tl(0); + t0 =3D tcg_constant_tl(0); t1 =3D tcg_temp_new(); tcg_gen_add2_i32(t1, cpu_sr_t, cpu_sr_t, t0, REG(B7_4), t0); tcg_gen_sub2_i32(REG(B11_8), cpu_sr_t, @@ -1242,7 +1242,7 @@ static void _decode_opc(DisasContext * ctx) TCGv imm; CHECK_NOT_DELAY_SLOT gen_save_cpu_state(ctx, true); - imm =3D tcg_const_i32(B7_0); + imm =3D tcg_constant_i32(B7_0); gen_helper_trapa(cpu_env, imm); ctx->base.is_jmp =3D DISAS_NORETURN; } @@ -1709,8 +1709,8 @@ static void _decode_opc(DisasContext * ctx) CHECK_FPU_ENABLED CHECK_FPSCR_PR_1 { - TCGv m =3D tcg_const_i32((ctx->opcode >> 8) & 3); - TCGv n =3D tcg_const_i32((ctx->opcode >> 10) & 3); + TCGv m =3D tcg_constant_i32((ctx->opcode >> 8) & 3); + TCGv n =3D tcg_constant_i32((ctx->opcode >> 10) & 3); gen_helper_fipr(cpu_env, m, n); return; } @@ -1722,7 +1722,7 @@ static void _decode_opc(DisasContext * ctx) if ((ctx->opcode & 0x0300) !=3D 0x0100) { goto do_illegal; } - TCGv n =3D tcg_const_i32((ctx->opcode >> 10) & 3); + TCGv n =3D tcg_constant_i32((ctx->opcode >> 10) & 3); gen_helper_ftrv(cpu_env, n); return; } @@ -1926,7 +1926,7 @@ static void decode_gusa(DisasContext *ctx, CPUSH4Stat= e *env) } op_dst =3D B11_8; op_opc =3D INDEX_op_xor_i32; - op_arg =3D tcg_const_i32(-1); + op_arg =3D tcg_constant_i32(-1); break; =20 case 0x7000 ... 0x700f: /* add #imm,Rn */ @@ -1934,7 +1934,7 @@ static void decode_gusa(DisasContext *ctx, CPUSH4Stat= e *env) goto fail; } op_opc =3D INDEX_op_add_i32; - op_arg =3D tcg_const_i32(B7_0s); + op_arg =3D tcg_constant_i32(B7_0s); break; =20 case 0x3000: /* cmp/eq Rm,Rn */ @@ -1980,7 +1980,7 @@ static void decode_gusa(DisasContext *ctx, CPUSH4Stat= e *env) goto fail; } op_opc =3D INDEX_op_setcond_i32; - op_arg =3D tcg_const_i32(0); + op_arg =3D tcg_constant_i32(0); =20 NEXT_INSN; if ((ctx->opcode & 0xff00) !=3D 0x8900 /* bt label */ --=20 2.34.1