From patchwork Tue Nov 7 03:02:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741776 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1418881wrr; Mon, 6 Nov 2023 19:05:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIgJ86Xu8pUi3AzyRBfYV7vXb67dJGVPolrsVlcq8aEJb5h11QTa55wSkNfI/lhtINYt1z X-Received: by 2002:ad4:5f0f:0:b0:66f:bc0c:a9e5 with SMTP id fo15-20020ad45f0f000000b0066fbc0ca9e5mr38778853qvb.25.1699326300829; Mon, 06 Nov 2023 19:05:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699326300; cv=none; d=google.com; s=arc-20160816; b=hunyJ9eIR+rter37d8bbcMQesrjSvn4CN8fVRHItU7KXbLaCK20HnqK+uGV0emSka2 p3EszZQHnTCFt/VU1A/VKcrXW2db4IJew9tTPoWOdvSNe9AyYl39mS00q0VOz6n6sSC2 mIcpVY2HIs9JZsP1inQltokVEn6+LWGcfXlWXFBPZFtl6LDKNLORllMqIKHtbFJbhioJ 8td8Su2bKFdBfa1piDVx4mvn2S6dxJcnfXHndq5/FTX6tPIeXDQtHYiKOvywNy33fTHP HP+ZQ1gG+JyFI8lYip/nQPc2CRtPIpcSkcJgm7tqYUQvT59gRAuHCzLt7wJ/nHV+0kcv ll7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=bvXYKg4Es3NrG6eHMj0weL8uuUejOJtJKCTcJARULmU=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=okXVkuW/x6k+c4Zu7pIK5cMgagOnqPxZ/VDVi8csSB4gdR7LqkiU6+fspDF8C6KUSd TYIJGFwabikGvqF1waYF5U//UbO0Vzo5do+2u1WiYAL4aYnUH53y3V3h/mSE2jPm1UH3 Zn5t49QMhXa2C2zrWyemwoxWkN1ht0ziQi/YJn4jVavEWZLJrTPdG/5qDOcCRDGTVGpa wzFrmOfagi6kZIK2wIIhSxZhCPzKCNQTIXRL6bg6LFVrb/D6++zHiNyN4ZJa9ilv1b4f nrcpr9GDEP4pRx9CyIWqkU3cLeAW4YDQGy+JyAk/hSmNhIIxbm1IeAhuBKKaEoboEUUw lMLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H0Z+YM9m; 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 o8-20020a0cecc8000000b0065cffde415bsi6542777qvq.542.2023.11.06.19.05.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 19:05:00 -0800 (PST) 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=H0Z+YM9m; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0COG-0006WR-Bk; Mon, 06 Nov 2023 22:04:32 -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 1r0CO4-0006Li-8r for qemu-devel@nongnu.org; Mon, 06 Nov 2023 22:04:20 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0CO0-0000dj-PW for qemu-devel@nongnu.org; Mon, 06 Nov 2023 22:04:19 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1cc316ccc38so42290965ad.1 for ; Mon, 06 Nov 2023 19:04:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699326255; x=1699931055; 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=bvXYKg4Es3NrG6eHMj0weL8uuUejOJtJKCTcJARULmU=; b=H0Z+YM9m8+UdOTPcrnjE18vN8pS46LXs4xRiG2i12uTacvkZrwCXaBihx+npvpAvVI T6xh3UnyjWkt4WT8u9IAlDUqzCzVzjLwGnVnhDff2ka0JNkUnhHnVirmGfhPsb2xi9rE RDDYqgjN9mHwgSpGC4k6mYy8MU5kKGN7WJDgz0h9e1IP7tYenBnaQsZf7mCQ8UfAJ/0t O2dmRKjZsALi1q3xGrT/g8FBg33ReKpA/s0tMFpodUM0k3vorD1fsz/u0eEL/FZmR2jW jEoeOFjBBwtMTDzE4nP8hy7k/G1RXfAxP1akzV5vYJiITZnZSxBNz8PbaKIx/+Nkdcec DFFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699326255; x=1699931055; 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=bvXYKg4Es3NrG6eHMj0weL8uuUejOJtJKCTcJARULmU=; b=kt2aXTNiwj3eBjXar4ATztHAUzXN0ylvVPitjIWHZON270twtjSp0Wtvy/XPsLY1v+ SI3gVk3G+qeL/sQm1m+NSaqPFFUgF4ZPE4fhdlLRGJT5qVa1Uc9GXVApxZzba+BDEM7r 7AFZADGpDrz1ZOTRsX0c4w0POXU17nCvcLSVKnZEZ19p3EXkISlEtV2y7E1BpYhfDb4b FMf8TP1VbzoX1Edm1XPerCVXnY1J20QOZtSbB+KoQajLua6EJWmko3s7Ab9/NuboKY6z X1mtj/RQrmc+8rJRSpDfJh/KixguwGaiijkV4CUabVNoBWQUJSUCr5eBVS7U5uJHWJKU KUcQ== X-Gm-Message-State: AOJu0Yw07ZS/KDIfJEMU8rwfTwQkNzUvQrMiyXVhgWRHre/vkLha0Pi0 gIcBtmXujE0+mNBxG9nxWdSOP9CdfWMSQhGjxOk= X-Received: by 2002:a17:903:18b:b0:1cc:665d:f818 with SMTP id z11-20020a170903018b00b001cc665df818mr19007921plg.68.1699326254702; Mon, 06 Nov 2023 19:04:14 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id u9-20020a17090282c900b001c72d5e16acsm6518012plz.57.2023.11.06.19.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 19:04:14 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 08/85] target/hppa: Remove get_temp_tl Date: Mon, 6 Nov 2023 19:02:50 -0800 Message-Id: <20231107030407.8979-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231107030407.8979-1-richard.henderson@linaro.org> References: <20231107030407.8979-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Replace with tcg_temp_new_tl without recording into ctx. Reviewed-by: Philippe Mathieu-Daudé 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 99b9fc0561..3c4a759628 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; - int ntempl; - TCGv_tl templ[4]; - DisasCond null_cond; TCGLabel *null_lab; @@ -491,15 +488,6 @@ static void cond_free(DisasCond *cond) } } -#ifndef CONFIG_USER_ONLY -static TCGv_tl get_temp_tl(DisasContext *ctx) -{ - unsigned i = ctx->ntempl++; - g_assert(i < ARRAY_SIZE(ctx->templ)); - return ctx->templ[i] = tcg_temp_new_tl(); -} -#endif - static TCGv_reg load_const(DisasContext *ctx, target_sreg v) { TCGv_reg t = tcg_temp_new(); @@ -1374,7 +1362,7 @@ static TCGv_i64 space_select(DisasContext *ctx, int sp, TCGv_reg base) if (sp < 0) { sp = ~sp; } - spc = get_temp_tl(ctx); + spc = tcg_temp_new_tl(); load_spr(ctx, spc, sp); return spc; } @@ -1384,7 +1372,7 @@ static TCGv_i64 space_select(DisasContext *ctx, int sp, TCGv_reg base) ptr = tcg_temp_new_ptr(); tmp = tcg_temp_new(); - spc = get_temp_tl(ctx); + spc = tcg_temp_new_tl(); 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 = (modify <= 0 ? ofs : base); #else - TCGv_tl addr = get_temp_tl(ctx); + TCGv_tl addr = tcg_temp_new_tl(); tcg_gen_extu_reg_tl(addr, modify <= 0 ? ofs : base); if (ctx->tb_flags & PSW_W) { tcg_gen_andi_tl(addr, addr, 0x3fffffffffffffffull); @@ -4081,9 +4069,6 @@ static void hppa_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) /* Bound the number of instructions by those left on the page. */ bound = -(ctx->base.pc_first | TARGET_PAGE_MASK) / 4; ctx->base.max_insns = MIN(ctx->base.max_insns, bound); - - ctx->ntempl = 0; - memset(ctx->templ, 0, sizeof(ctx->templ)); } static void hppa_tr_tb_start(DisasContextBase *dcbase, CPUState *cs) @@ -4112,7 +4097,6 @@ static void hppa_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) DisasContext *ctx = container_of(dcbase, DisasContext, base); CPUHPPAState *env = cpu_env(cs); DisasJumpType ret; - int i, n; /* Execute one insn. */ #ifdef CONFIG_USER_ONLY @@ -4151,12 +4135,6 @@ static void hppa_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) } } - /* Forget any temporaries allocated. */ - for (i = 0, n = ctx->ntempl; i < n; ++i) { - ctx->templ[i] = NULL; - } - ctx->ntempl = 0; - /* Advance the insn queue. Note that this check also detects a priority change within the instruction queue. */ if (ret == DISAS_NEXT && ctx->iaoq_b != ctx->iaoq_f + 4) {