From nobody Wed Nov 27 19:47:07 2024 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=1697834898; cv=none; d=zohomail.com; s=zohoarc; b=k3Fa2GCdU6K/QwiD/2ohT5z5myoIMd1HIat/hQlxFKM0FHsJstNs+BIEPEghKGN+QeazGnlJCm2T6YvFybk16cY/iKMUyCB19RUhKcyWxNT4dseLF3AwRu+CVJKpjHcdhrCQRg2IEIfbXY/sEuGosGAmTnM4X8d/mv0NH+8d/v4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697834898; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cad+KwQheUGAcPjvv3O2I1LwfS0pIqR17J6IWZnIATQ=; b=fu5tINITsm+MF7qIgOYz8zYAY2sOgbfXXYf8Xgcfgp4Xgo0+OEddP+c4eCRW9hiF7DeC3wUSm9MYbPvmbd0UuH3fLoGbGIpi+esJ81TXEe+8ugcDgUKtjPuKX0gGKR7+0jtt3K38ihfXY+nv6YlID7SiX1JwmC0TyBlZo2a8ATc= 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 1697834898878259.46576570742377; Fri, 20 Oct 2023 13:48:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtwLT-0007iY-Qe; Fri, 20 Oct 2023 16:43:48 -0400 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 1qtwLM-0007gV-DY for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:43:40 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtwLK-00088d-Nn for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:43:40 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6b77ab73c6fso996524b3a.1 for ; Fri, 20 Oct 2023 13:43:38 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id k15-20020aa7998f000000b00688965c5227sm1944975pfh.120.2023.10.20.13.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 13:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697834617; x=1698439417; darn=nongnu.org; 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=cad+KwQheUGAcPjvv3O2I1LwfS0pIqR17J6IWZnIATQ=; b=yrLd8elnFUXOPkMWbt7snigo7S8/mpPGXZad+c4iuMVkhqRUTENPF2vKEvl4tjGCry 2n7SRxex6CoPTmXwo5WMnyhhcmmUpR5OMOaxD0wxwQOuMPPiWtI3DhYos9d9tV/jardS 0tI3eRNSNyD2MTN3AFwBceYkk1FdpPvFlZiF6AxmMbu9MuJyGMea1+ScVB1rN9y5MwuH vafhPBL7/fEt+QJq62M2iOxvhH3qouARVbcVfDOT/ywvAFYV3m9jH59Ajk7D79encrv2 ZDb+C+unTvHHVfQvFiOXhwyQ+W1/e+zcD0ABkO9ToNfCKiHSrWGjMuJwn1CqwTpQpse0 6W8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697834617; x=1698439417; 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=cad+KwQheUGAcPjvv3O2I1LwfS0pIqR17J6IWZnIATQ=; b=TRy2IkE9v3W+Kgr8SZgqm3zgpxrAaoBx+a0fgdXYuoe/YaQIe9yomuKfuLQHmU36bn /7aRsxmQ6wMCzrr04/nl1W++2SWW72rxr3zkIj6Few5yNKHlAipgCUEGOiEkKfQLzKEz vFYo/6gE3h1xwyp8/JTrspgjbgeYLlsFTqDSJ/M+Ay31NkTweVQ+1UN4wz7wOLmN4MaD uS2fZZxBVN/oaEy0o8WH2Yx+Q0YKR+EX3l2P4gbUFlP30lhBfIQiur3v8afbRyx20/wR AjBl66P2/3TItTgR/8UKr7CF/1dbqbRCngJIj/yzOZ7Gz8FUvoWX/EqMIVSs6CyetArw W/Yg== X-Gm-Message-State: AOJu0YzKCkwy4BF6efVy0WhVqpmBL4J4JXPWvfikuwT0XkqTXpNhKSLi 2XopIZ46E1onWTUqXiQ/j21b0MPFg1sGDwgKAMI= X-Google-Smtp-Source: AGHT+IEpELimzyakNmbobOsPfsNo4t6ny6h8iQF5fJ6ErPUND8CVBNMIlycwWvxhNf9peNjxV/nJ2Q== X-Received: by 2002:a05:6a20:e125:b0:f0:50c4:4c43 with SMTP id kr37-20020a056a20e12500b000f050c44c43mr4314914pzb.5.1697834617169; Fri, 20 Oct 2023 13:43:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 04/65] target/hppa: Remove get_temp_tl Date: Fri, 20 Oct 2023 13:42:30 -0700 Message-Id: <20231020204331.139847-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020204331.139847-1-richard.henderson@linaro.org> References: <20231020204331.139847-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::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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: 1697834900645100007 Replace with tcg_temp_new_tl without recording into ctx. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/hppa/translate.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 3065fbf625..5302381a56 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -254,9 +254,6 @@ typedef struct DisasContext { target_ureg iaoq_n; TCGv_reg iaoq_n_var; =20 - int ntempl; - TCGv_tl templ[4]; - DisasCond null_cond; TCGLabel *null_lab; =20 @@ -491,15 +488,6 @@ static void cond_free(DisasCond *cond) } } =20 -#ifndef CONFIG_USER_ONLY -static TCGv_tl get_temp_tl(DisasContext *ctx) -{ - unsigned i =3D ctx->ntempl++; - g_assert(i < ARRAY_SIZE(ctx->templ)); - return ctx->templ[i] =3D tcg_temp_new_tl(); -} -#endif - static TCGv_reg load_const(DisasContext *ctx, target_sreg v) { TCGv_reg t =3D tcg_temp_new(); @@ -1374,7 +1362,7 @@ static TCGv_i64 space_select(DisasContext *ctx, int s= p, TCGv_reg base) if (sp < 0) { sp =3D ~sp; } - spc =3D get_temp_tl(ctx); + spc =3D tcg_temp_new_tl(); load_spr(ctx, spc, sp); return spc; } @@ -1384,7 +1372,7 @@ static TCGv_i64 space_select(DisasContext *ctx, int s= p, TCGv_reg base) =20 ptr =3D tcg_temp_new_ptr(); tmp =3D tcg_temp_new(); - spc =3D get_temp_tl(ctx); + spc =3D tcg_temp_new_tl(); =20 tcg_gen_shri_reg(tmp, base, TARGET_REGISTER_BITS - 5); tcg_gen_andi_reg(tmp, tmp, 030); @@ -1420,7 +1408,7 @@ static void form_gva(DisasContext *ctx, TCGv_tl *pgva= , TCGv_reg *pofs, #ifdef CONFIG_USER_ONLY *pgva =3D (modify <=3D 0 ? ofs : base); #else - TCGv_tl addr =3D get_temp_tl(ctx); + TCGv_tl addr =3D tcg_temp_new_tl(); tcg_gen_extu_reg_tl(addr, modify <=3D 0 ? ofs : base); if (ctx->tb_flags & PSW_W) { tcg_gen_andi_tl(addr, addr, 0x3fffffffffffffffull); @@ -4080,9 +4068,6 @@ static void hppa_tr_init_disas_context(DisasContextBa= se *dcbase, CPUState *cs) /* Bound the number of instructions by those left on the page. */ bound =3D -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4; ctx->base.max_insns =3D MIN(ctx->base.max_insns, bound); - - ctx->ntempl =3D 0; - memset(ctx->templ, 0, sizeof(ctx->templ)); } =20 static void hppa_tr_tb_start(DisasContextBase *dcbase, CPUState *cs) @@ -4111,7 +4096,6 @@ static void hppa_tr_translate_insn(DisasContextBase *= dcbase, CPUState *cs) DisasContext *ctx =3D container_of(dcbase, DisasContext, base); CPUHPPAState *env =3D cpu_env(cs); DisasJumpType ret; - int i, n; =20 /* Execute one insn. */ #ifdef CONFIG_USER_ONLY @@ -4150,12 +4134,6 @@ static void hppa_tr_translate_insn(DisasContextBase = *dcbase, CPUState *cs) } } =20 - /* Forget any temporaries allocated. */ - for (i =3D 0, n =3D ctx->ntempl; i < n; ++i) { - ctx->templ[i] =3D NULL; - } - ctx->ntempl =3D 0; - /* Advance the insn queue. Note that this check also detects a priority change within the instruction queue. */ if (ret =3D=3D DISAS_NEXT && ctx->iaoq_b !=3D ctx->iaoq_f + 4) { --=20 2.34.1