From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677478708; cv=none; d=zohomail.com; s=zohoarc; b=dEjkYTuCQu7fY+JGQptsMOagVRp+QTo6dMt7KDHyQaJMxPYPAbpEZ7dRdmyA9mhSnas0Kzbb+GI98ipGr/hPP2zyrcD4XrmPWmCHzAwFGP+QWqnj4xh2ABfwntG7Sx9lOFkolFP2jDfxtrmHbaMcCTkgQLUAZ3owZvpkMRIMRcU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677478708; 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=oMu/UfowZNJPZ+Z1nOXWigHv/O+5gtKWuTrVMk/F7g0=; b=NbIQtU3MseKXnq0b7aYeHF35olv+07zK+j1q/3mijRaaOVppM7Llw8PxXw09MYQLUGPsFYr20rBCEcgziUe6gmGb5QD56u5ylMalJ0HgEZ/LccZMUFvso7f0geMJOcLllkvkh9QwBTIglaAlwweA3sBFaPs9Ia3sSU8+1Wq8IGI= 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+importer2=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 SMTP id 1677478708918337.12207818435536; Sun, 26 Feb 2023 22:18:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWCH-0001VH-Ac; Mon, 27 Feb 2023 00:37:13 -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 1pWWCF-0001Ph-P1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:11 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCD-0002Qe-Va for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:11 -0500 Received: by mail-pl1-x62a.google.com with SMTP id ky4so5570113plb.3 for ; Sun, 26 Feb 2023 21:37:09 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=oMu/UfowZNJPZ+Z1nOXWigHv/O+5gtKWuTrVMk/F7g0=; b=GbCQgYK4QIDZXquSfLjwaM8VLvXl3NZfdSR+K7f4x6xbPqUXXCA7G0bJ/NSehLc62F Dy5dzfvd7MGIk11q4Zuo2ARMpBsf5HOCeOKtL7EiqrvpHOHfpZ6n8m/eoSwQrDAZfzH8 z7dfJ7ANSSe17QNY6USFGaRnwqmUfNfvsgJXZFbEnW7oAeKL+pO6eXmppdbmPMcvaoWd Cz4Li5wfB1zJX2lWXlBWeE0b6JgXpkmfaW+XPsmts/oNfe0cwg9UOqa2xI5pCYF6Lm5j ej8L+aEYGRfwoAC/Bqt5rbu/+bT+SNFs51Vu1wBFFYpk0u01qzrr4EB4ibkCNENBN1Rj bNaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=oMu/UfowZNJPZ+Z1nOXWigHv/O+5gtKWuTrVMk/F7g0=; b=vKo40GW1pIeQzj3FqszG4IFpqJEuKiwsMKMf3AISguD1P6y4qBVCDfn0j6m8DWT02l mp9t6NqRKv3irgzgilQQYAUlBzWHlfFnWLZ0gav2aiZTh0fODcNY3zvERwU20bneVBBS 6zCpD0RsV4Obdf57Wn721DXCLYwBtC2EedGMiGuXuUqdw9m0DAAlpY0iGC1XMOSeSwkT GtsH6UzLSeCu/MqWCm5hmU+3nSLHeGbterRgKgKq4j63aCny+2e/RvwGNoojrk+EsGdN AGSv+xTUEObf4tprGeMkcTQmoNT6PTcZyaGCGfJITOfaRKTyq1XGK9wAKV0cYecGILoZ cfwA== X-Gm-Message-State: AO0yUKUtDgN8HT201UQ3DWJrrsqZQlEm0qs8IjevLsoyo1D4SuEZ3ZoG s9npmEwfRzpomz7ZfY5fRpsy4PwUezrNR4CHMdk= X-Google-Smtp-Source: AK7set+X6twf+6dc+BmF+qyH9KhM7twYjroLflo/66HPIlYF8hVCb75WwFCJOiKmB0ZbSPkeELL6Kg== X-Received: by 2002:a05:6a21:869d:b0:cb:fe3e:e20 with SMTP id ox29-20020a056a21869d00b000cbfe3e0e20mr12752517pzb.42.1677476228549; Sun, 26 Feb 2023 21:37:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 01/31] tcg: Adjust TCGContext.temps_in_use check Date: Sun, 26 Feb 2023 19:36:31 -1000 Message-Id: <20230227053701.368744-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677478731305100001 Change the temps_in_use check to use assert not fprintf. Move the assert for double-free before the check for count, since that is the more immediate problem. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- tcg/tcg.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index a4a3da6804..06209e6160 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1375,16 +1375,14 @@ void tcg_temp_free_internal(TCGTemp *ts) g_assert_not_reached(); } =20 -#if defined(CONFIG_DEBUG_TCG) - s->temps_in_use--; - if (s->temps_in_use < 0) { - fprintf(stderr, "More temporaries freed than allocated!\n"); - } -#endif - tcg_debug_assert(ts->temp_allocated !=3D 0); ts->temp_allocated =3D 0; =20 +#if defined(CONFIG_DEBUG_TCG) + assert(s->temps_in_use > 0); + s->temps_in_use--; +#endif + idx =3D temp_idx(ts); k =3D ts->base_type + (ts->kind =3D=3D TEMP_NORMAL ? 0 : TCG_TYPE_COUN= T); set_bit(idx, s->free_temps[k].l); --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677486317; cv=none; d=zohomail.com; s=zohoarc; b=UjD1lyIMDwLMPFgLLwsoITXThuxmYMqrbR/boAek/VSwOOrM2msFzGQpWZDsQTHEDGzAqDVp29fu4o/5eweao4TBPBMCSCLLbMAeXMn4/4puv0j1hPvfeqSBCJcEgFbuu7wSZpZ/DQP0tRC4OPSChA7v5SwrEKfKId+k65OlJG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677486317; 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=zkW1vaFC0G371o+4EsH00qoff6qPS79ROCERJ+YGb8E=; b=D+O3yHv9D6dd85uLcvj9x+EGgZVzw27IYMhDLrL/+2mp0PPriB8KWE6Bip7C6Njtrk3Sps5gZpf1m6uhriLDV2jq9enj/l6zlv3mnvyyJ2+ztooWupDMrB3HO3KJSDwPrWXsWk6Ldee7Jq+T8iy/Pv0S8xoiQraSZ900jyvs5V0= 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+importer2=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 1677486317596707.1173145791306; Mon, 27 Feb 2023 00:25:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWCK-0001cR-Gn; Mon, 27 Feb 2023 00:37:16 -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 1pWWCJ-0001aV-9q for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:15 -0500 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCG-0002SP-SL for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:14 -0500 Received: by mail-pg1-x52a.google.com with SMTP id bn17so2827748pgb.10 for ; Sun, 26 Feb 2023 21:37:12 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=zkW1vaFC0G371o+4EsH00qoff6qPS79ROCERJ+YGb8E=; b=zWvedsiJ+09mRVomDBsFdL1z5cbEa+ajs7w69se50ZNMtGEICKnh4LEMgZr+CEiK1M IkDZ2YpovJiNUB3NdnpRv8yyj2QFHCiq7uLnQDRwf0p5XEALcCjMN+JEHmWTmjPNO3aA TYOLl0jx+2SCDwo0LXD87FLXEJA0w979n11Ottv2vSq7166mqtJlbVCXqv8sUrnOkspn pP07/KWmb+Jq6FT+eAJFHlrqUF+UHJLHZpIjbYVvDbPnOFfXJULyc85RGP96StYK+IY8 1NdgRDOlU71+e8dm5nsTOcK+jddg/WtiFws3x4V5GR7l4wS+AE+xe5iBt9g/+lGKKmom Fqag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=zkW1vaFC0G371o+4EsH00qoff6qPS79ROCERJ+YGb8E=; b=6RXqDvPNsP0Eb+Jab9lE9LfnJe1LYu9rgH4R8zmlxvD67Jf4x+VQNOXKIjjPGSuESr hQTc9JpVPne3iKF7jISDISswrpSB8i1X+ybFzwaDfgs914GADbpJYSCVo89jdX+NNkDx pfyTP+koayQx8yuwIcuY91D77Bo1ROkA/rSvSegD2VIyfSm9qc25eDtS7KwqA5YQ+5PV DNyzX9WXMBS1GgUcJreh8mY0o4oTZjbY1A3Ex6eLkRO+yjmWSOkeXVl/Ja0q4NfAqZec /bKSdxfrve6mndayTwC3FRXjCSd9pmhxsao26OIG24IXFBXM5okiFp6fGdI4PLjscFYX o3Gw== X-Gm-Message-State: AO0yUKU1IWpbXSod/ZMOAk9yTta1E0JHLFD36X/PZ1+o4oVxj7moBJEX t5oGNRByYJ/BtUcaBak1bpa5tw1dGeYPc/nN3tM= X-Google-Smtp-Source: AK7set+9l4JKCJRNEobOrO+Pub7GXnE9epP/h15UvRn2lCABGpLUIbSqU6TBHaEviLxi9QFzRuEfIA== X-Received: by 2002:aa7:888f:0:b0:5a8:c699:3eaa with SMTP id z15-20020aa7888f000000b005a8c6993eaamr8269593pfe.9.1677476231486; Sun, 26 Feb 2023 21:37:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 02/31] accel/tcg: Pass max_insn to gen_intermediate_code by pointer Date: Sun, 26 Feb 2023 19:36:32 -1000 Message-Id: <20230227053701.368744-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677486318211100001 In preparation for returning the number of insns generated via the same pointer. Adjust only the prototypes so far. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/exec/translator.h | 4 ++-- accel/tcg/translate-all.c | 2 +- accel/tcg/translator.c | 4 ++-- target/alpha/translate.c | 2 +- target/arm/translate.c | 2 +- target/avr/translate.c | 2 +- target/cris/translate.c | 2 +- target/hexagon/translate.c | 2 +- target/hppa/translate.c | 2 +- target/i386/tcg/translate.c | 2 +- target/loongarch/translate.c | 2 +- target/m68k/translate.c | 2 +- target/microblaze/translate.c | 2 +- target/mips/tcg/translate.c | 2 +- target/nios2/translate.c | 2 +- target/openrisc/translate.c | 2 +- target/ppc/translate.c | 2 +- target/riscv/translate.c | 2 +- target/rx/translate.c | 2 +- target/s390x/tcg/translate.c | 2 +- target/sh4/translate.c | 2 +- target/sparc/translate.c | 2 +- target/tricore/translate.c | 2 +- target/xtensa/translate.c | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index af2ff95cd5..8b36690e80 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -37,7 +37,7 @@ * This function must be provided by the target, which should create * the target-specific DisasContext, and then invoke translator_loop. */ -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_in= sns, +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_i= nsns, target_ulong pc, void *host_pc); =20 /** @@ -146,7 +146,7 @@ typedef struct TranslatorOps { * - When single-stepping is enabled (system-wide or on the current vCPU). * - When too many instructions have been translated. */ -void translator_loop(CPUState *cpu, TranslationBlock *tb, int max_insns, +void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, target_ulong pc, void *host_pc, const TranslatorOps *ops, DisasContextBase *db); =20 diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 9e925c10f3..b7b361959e 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -281,7 +281,7 @@ static int setjmp_gen_code(CPUArchState *env, Translati= onBlock *tb, tcg_func_start(tcg_ctx); =20 tcg_ctx->cpu =3D env_cpu(env); - gen_intermediate_code(env_cpu(env), tb, *max_insns, pc, host_pc); + gen_intermediate_code(env_cpu(env), tb, max_insns, pc, host_pc); assert(tb->size !=3D 0); tcg_ctx->cpu =3D NULL; *max_insns =3D tb->icount; diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 1cf404ced0..fac1e8c465 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -42,7 +42,7 @@ bool translator_use_goto_tb(DisasContextBase *db, target_= ulong dest) return ((db->pc_first ^ dest) & TARGET_PAGE_MASK) =3D=3D 0; } =20 -void translator_loop(CPUState *cpu, TranslationBlock *tb, int max_insns, +void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, target_ulong pc, void *host_pc, const TranslatorOps *ops, DisasContextBase *db) { @@ -55,7 +55,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb,= int max_insns, db->pc_next =3D pc; db->is_jmp =3D DISAS_NEXT; db->num_insns =3D 0; - db->max_insns =3D max_insns; + db->max_insns =3D *max_insns; db->singlestep_enabled =3D cflags & CF_SINGLE_STEP; db->host_addr[0] =3D host_pc; db->host_addr[1] =3D NULL; diff --git a/target/alpha/translate.c b/target/alpha/translate.c index f9bcdeb717..716b083f39 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -3043,7 +3043,7 @@ static const TranslatorOps alpha_tr_ops =3D { .disas_log =3D alpha_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_in= sns, +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_i= nsns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/arm/translate.c b/target/arm/translate.c index c23a3462bf..92955d505c 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9970,7 +9970,7 @@ static const TranslatorOps thumb_translator_ops =3D { }; =20 /* generate intermediate code for basic block 'tb'. */ -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_in= sns, +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_i= nsns, target_ulong pc, void *host_pc) { DisasContext dc =3D { }; diff --git a/target/avr/translate.c b/target/avr/translate.c index 2bed56f135..e40d8e9681 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -3049,7 +3049,7 @@ static const TranslatorOps avr_tr_ops =3D { .disas_log =3D avr_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext dc =3D { }; diff --git a/target/cris/translate.c b/target/cris/translate.c index fbc3fd5865..905d01288e 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -3286,7 +3286,7 @@ static const TranslatorOps cris_tr_ops =3D { .disas_log =3D cris_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 75f28e08ad..fc3061a540 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -962,7 +962,7 @@ static const TranslatorOps hexagon_tr_ops =3D { .disas_log =3D hexagon_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 981f8ee03d..0102cf451b 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -4359,7 +4359,7 @@ static const TranslatorOps hppa_tr_ops =3D { .disas_log =3D hppa_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 9d9392b009..a47d60f057 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -7158,7 +7158,7 @@ static const TranslatorOps i386_tr_ops =3D { }; =20 /* generate intermediate code for basic block 'tb'. */ -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_in= sns, +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_i= nsns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/loongarch/translate.c b/target/loongarch/translate.c index 72a6275665..2a43ab0201 100644 --- a/target/loongarch/translate.c +++ b/target/loongarch/translate.c @@ -245,7 +245,7 @@ static const TranslatorOps loongarch_tr_ops =3D { .disas_log =3D loongarch_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 31178c3b1d..157c2cbb8f 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -6393,7 +6393,7 @@ static const TranslatorOps m68k_tr_ops =3D { .disas_log =3D m68k_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_in= sns, +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_i= nsns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 974f21eb31..037a652cb9 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1849,7 +1849,7 @@ static const TranslatorOps mb_tr_ops =3D { .disas_log =3D mb_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_in= sns, +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_i= nsns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index aa12bb708a..bd70fcad25 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -16159,7 +16159,7 @@ static const TranslatorOps mips_tr_ops =3D { .disas_log =3D mips_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 7aee65a089..140bc31017 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -1037,7 +1037,7 @@ static const TranslatorOps nios2_tr_ops =3D { .disas_log =3D nios2_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 2f3d7c5fd1..b8cd8e0964 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1705,7 +1705,7 @@ static const TranslatorOps openrisc_tr_ops =3D { .disas_log =3D openrisc_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 1c17d5a558..5fe6aa641e 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7707,7 +7707,7 @@ static const TranslatorOps ppc_tr_ops =3D { .disas_log =3D ppc_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 772f9d7973..f9d5d1097e 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -1309,7 +1309,7 @@ static const TranslatorOps riscv_tr_ops =3D { .disas_log =3D riscv_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/rx/translate.c b/target/rx/translate.c index 87a3f54adb..af23876cb3 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -2363,7 +2363,7 @@ static const TranslatorOps rx_tr_ops =3D { .disas_log =3D rx_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index ac5bd98f04..339c1672e9 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6759,7 +6759,7 @@ static const TranslatorOps s390x_tr_ops =3D { .disas_log =3D s390x_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext dc; diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 7db3468b01..23563024e0 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -2374,7 +2374,7 @@ static const TranslatorOps sh4_tr_ops =3D { .disas_log =3D sh4_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 150aeecd14..3b0044aa66 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -5904,7 +5904,7 @@ static const TranslatorOps sparc_tr_ops =3D { .disas_log =3D sparc_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext dc =3D {}; diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 7ac34efd76..176ea96b2b 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -8881,7 +8881,7 @@ static const TranslatorOps tricore_tr_ops =3D { }; =20 =20 -void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_ins= ns, +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_in= sns, target_ulong pc, void *host_pc) { DisasContext ctx; diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 77bcd71030..8d7bf566de 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1279,7 +1279,7 @@ static const TranslatorOps xtensa_translator_ops =3D { .disas_log =3D xtensa_tr_disas_log, }; =20 -void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_in= sns, +void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int *max_i= nsns, target_ulong pc, void *host_pc) { DisasContext dc =3D {}; --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677486031; cv=none; d=zohomail.com; s=zohoarc; b=mJ+UOdstHEGv8BwT25fcTpLIkZdRpArFkY8oe81Lztp+CHBOwu8hOYr/ozOAbgQWw3RZ3Xx3+YljbWAhrKIfIqrYdi6bV3yr7W29oWQw5XpvJZiNZYmH5HnECl1ZRvea6i9Gblz5P4bQ/9D1KKfoh6vJA1bYJ8QUElTI9ejaJI8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677486031; 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=q/lxx08bzggLpozZyWgUkQK1Gl9+CtNC5ZWpyB9XF2A=; b=mRgY1t/xdXxlIW8rMTQdxC3aY8OZm0lm/eyUJzpgHbSBzo5WkrqbVsTHvuAevvzLXS8mWxOFg+HRuPRzi2K6T457F0qoU6Ko3SvS2ls4kjoqrDEh9uVy6dMCynfjbhNi8wqFfr4tnDly/8xPipfDLbEZ+BBX3lJxsp8GZd4gbOw= 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+importer2=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 1677486031870800.9030653210555; Mon, 27 Feb 2023 00:20:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWCN-0001jJ-Hh; Mon, 27 Feb 2023 00:37:19 -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 1pWWCL-0001dx-EK for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:17 -0500 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCJ-0002Sz-Md for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:17 -0500 Received: by mail-pg1-x52b.google.com with SMTP id y19so2846523pgk.5 for ; Sun, 26 Feb 2023 21:37:15 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=q/lxx08bzggLpozZyWgUkQK1Gl9+CtNC5ZWpyB9XF2A=; b=fDTS2qEINKy3aUYhbGyyb3cTTRA+LaP8OUjR077xcgm70NnBJE0ZlG2JFoFOJqSfAA YyzCCpbE3OqEZRYaRY+PR1OoT154nRv6eCQRHszDgt3Bmi/9IeLNduJu9GHmQshoqKmx 4UyiH/cE6bBgKvBJnmEzLJI//On2QxWK33UmzXj6Z4fh4gE2gdri2i0pz9y6iGjC4l7U F6Ri+c3qNFTro83TaxjwL7eoANxFdbYeXnNyBWVqSUt0IXEau63rYI/dEDafSOCDS6wR N0tq9zJbGQmPMlyasqtgXCzP5NrsPqohRxZhpS1jkKg18CSoLUK7wNR7hqg+mgbtT3ue FNlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=q/lxx08bzggLpozZyWgUkQK1Gl9+CtNC5ZWpyB9XF2A=; b=2xDsrN5pugsYfRYldd/yaP+2CjbdbKTKxXgqaDEe9MnA2GKUYU3/2E72NDiRugwyRX qrFfYmjdgf6TJhd3IRiNRutnRGQWM/D/fTA10WO6PAKuFn+SlXjD2TS0HXDzxd25ZOLC ceenj8zs3e34Ffy9uUkZATLe1OchqMFcDfrG9IDatYSQPzXOrkUcDNCa9239Q0JpG59n TcpDFBJBDTr4Dqe2MK+X8AVl9C3i420jklxgEJIJdMwO59b0sNWQWInESWqEaT6SUdvx IRFk+5hoOylIDIlyuVx1UFmnjOdAEDh9cOAfjbLM6T+jskc0wYuNkyr5IRpwI5ylVmXK LuIQ== X-Gm-Message-State: AO0yUKWQlk7FckzqWfaqcAXNrGZXmR6YG0ZzsNb/XMIHjaybruZCZMaD /tM4Mwd5kY4oFcyU8p5P3MuDr85Q+LcmHOCCoWM= X-Google-Smtp-Source: AK7set897NRT/ggZaYPUWz2zorRJaS96l6SLv3OTJNeMT9kzTyutccj7UkPd/z1PD5OihrWAw8r72A== X-Received: by 2002:a62:62c6:0:b0:5a8:47e5:bbb2 with SMTP id w189-20020a6262c6000000b005a847e5bbb2mr20581675pfb.0.1677476234281; Sun, 26 Feb 2023 21:37:14 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 03/31] accel/tcg: Use more accurate max_insns for tb_overflow Date: Sun, 26 Feb 2023 19:36:33 -1000 Message-Id: <20230227053701.368744-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677486034062100003 Write back the number of insns that we attempt to translate, so that if we longjmp out we have a more accurate limit for the next attempt. This results in fewer restarts when some limit is consumed by few instructions. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index fac1e8c465..62e8f28025 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -78,7 +78,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb,= int *max_insns, plugin_enabled =3D plugin_gen_tb_start(cpu, db, cflags & CF_MEMI_ONLY); =20 while (true) { - db->num_insns++; + *max_insns =3D ++db->num_insns; ops->insn_start(db, cpu); tcg_debug_assert(db->is_jmp =3D=3D DISAS_NEXT); /* no early exit = */ =20 --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476571; cv=none; d=zohomail.com; s=zohoarc; b=h17vEG904gmnzKXCO86hK3aAZKSm0JAAcN+nJVfMEb3ad1iVYMnyg+e/GUBMBJn0fUeNlTt7DlRdESa3ENjCRWgzYHGo3Ht7/eJc3foA5kwvdbX9/K1025MCikJm108pBMVyi9FFjSYED6vItunHfg+hZAzyXyNRkIcHqO94YJ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476571; 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=KgU8jRRsy/4dDTOMKHuklv2pdjkeQjC0sYzVe39pJ+4=; b=G2ri3srr0330gTcxgyubwueuqzhoSyQI679QJPsc631XbrCpd81TaW+tuKSE5wth0o19rk+B/NXJoNEKk+WlbEpwqQsEjEE7KO7vHhRYMbbuQ6/lmdwYArNIEQ5MgU9NCcJ1RWWLjq+PCrvukMP2nuQRd0LTMnB/H/hetQfMCLY= 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+importer2=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 1677476571132515.6077357500716; Sun, 26 Feb 2023 21:42:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWCQ-00020z-G5; Mon, 27 Feb 2023 00:37:22 -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 1pWWCO-0001lL-DD for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:20 -0500 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCM-0002V6-Iu for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:19 -0500 Received: by mail-pg1-x530.google.com with SMTP id q23so2840419pgt.7 for ; Sun, 26 Feb 2023 21:37:18 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=KgU8jRRsy/4dDTOMKHuklv2pdjkeQjC0sYzVe39pJ+4=; b=K27SV84hKrTbD8r5jyUHbFYzZ1QW4nNBFe3C8WNwO+s+rkS2YM8VE+cHKng4vSF6xT KC7+l5ygc4GOFMd1R2lzxF9/VmaIgG2VXYACnpgeLPl4B6lxZvZdS9wmuVMU+9BLbIRQ rbfuJY3OAavb7U7CtNCO27nYA50rznphYgSZgFg3qu0nBZpglBfO8Q4F2KNu+ykFQ+hm TegEEqCunmyMoo8h4wo0tqlda7s6VBCkeb056zsGZ3rHoJnDm6xhTdIScZDq2IVWVf6C dPEqQle/AMC0AQWB1UI8mpQmTU1DGfy8vIQHe5g/6uNuOZZcaCWAG31lU9ysgTl6qEjR knJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=KgU8jRRsy/4dDTOMKHuklv2pdjkeQjC0sYzVe39pJ+4=; b=M8nk2f8XXc6dOeFnbaiVaeIj2clqNcIl/BBo0JxUWDoXL9Y1dwGbL5XZlX58Eu4p6E jB+v95CQ7/5djy2YC3OiwZvPnI8ROIP453scFRz9dfPDA1uM0MRiGgIIDPkG76QFzLWp oMRiHCGO06PzG3qEN8iHcsaanifZinbm3vEnBLjk5EsybpbOAAQlo/6sSS0AI06iaOUH nVxAkTs+tG++2a/Gz13CFaNMuefN+gidfbMZF/PbgdAPjCeve5bqIofmxu96cDlnvCsT 52EMg6ZUecGbIo7Tn7Otu5nW3UGkpZeerfKCAL2ONSZOZBZQdAGsKSILb5X3h0lQ5br0 EDgw== X-Gm-Message-State: AO0yUKUCcRPmo+DzbOhpWrl1lXFkNKR6KEaoTbfOyfDHhjPe/neIZDLL VNDWfnMAiAaR49PtE1xUXPUUDRLm61nVW7qy+yw= X-Google-Smtp-Source: AK7set9XAOOJH/T2M1vxOCmeGWKkNrDid9mJ+NtmuFADNBmiq2ZgvAT5d+MM9alXLUreq1LAvF8HGQ== X-Received: by 2002:a62:1d4b:0:b0:5a8:a250:bc16 with SMTP id d72-20020a621d4b000000b005a8a250bc16mr18135051pfd.3.1677476237140; Sun, 26 Feb 2023 21:37:17 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 04/31] tcg: Remove branch-to-next regardless of reference count Date: Sun, 26 Feb 2023 19:36:34 -1000 Message-Id: <20230227053701.368744-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476572828100003 Just because the label reference count is more than 1 does not mean we cannot remove a branch-to-next. By doing this first, the label reference count may drop to 0, and then the label itself gets removed as before. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- tcg/tcg.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 06209e6160..0992fb4f31 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2638,7 +2638,7 @@ TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_= op, /* Reachable analysis : remove unreachable code. */ static void reachable_code_pass(TCGContext *s) { - TCGOp *op, *op_next; + TCGOp *op, *op_next, *op_prev; bool dead =3D false; =20 QTAILQ_FOREACH_SAFE(op, &s->ops, link, op_next) { @@ -2648,6 +2648,22 @@ static void reachable_code_pass(TCGContext *s) switch (op->opc) { case INDEX_op_set_label: label =3D arg_label(op->args[0]); + + /* + * Optimization can fold conditional branches to unconditional. + * If we find a label which is preceded by an unconditional + * branch to next, remove the branch. We couldn't do this when + * processing the branch because any dead code between the bra= nch + * and label had not yet been removed. + */ + op_prev =3D QTAILQ_PREV(op, link); + if (op_prev->opc =3D=3D INDEX_op_br && + label =3D=3D arg_label(op_prev->args[0])) { + tcg_op_remove(s, op_prev); + /* Fall through means insns become live again. */ + dead =3D false; + } + if (label->refs =3D=3D 0) { /* * While there is an occasional backward branch, virtually @@ -2661,21 +2677,6 @@ static void reachable_code_pass(TCGContext *s) /* Once we see a label, insns become live again. */ dead =3D false; remove =3D false; - - /* - * Optimization can fold conditional branches to unconditi= onal. - * If we find a label with one reference which is preceded= by - * an unconditional branch to it, remove both. This neede= d to - * wait until the dead code in between them was removed. - */ - if (label->refs =3D=3D 1) { - TCGOp *op_prev =3D QTAILQ_PREV(op, link); - if (op_prev->opc =3D=3D INDEX_op_br && - label =3D=3D arg_label(op_prev->args[0])) { - tcg_op_remove(s, op_prev); - remove =3D true; - } - } } break; =20 --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476522; cv=none; d=zohomail.com; s=zohoarc; b=mNxQxSX3AHXJAT8f6zNcYyF2y5NvjzzgCv8Je9ZqwhcvTLfI5tP168XGU3fwCmQfs+PGM0KFnmiMF2iMb3VbugtZ4V97EcOwfiPEQnlT/P6M6wPG4NcZeODg+RJj0i207v4Qg/jSuL3u3UrlePi8XMy16ibsKvWcgKosVOO3aDQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476522; 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=Me3y4NGZuYmWF3kVGO2rrjiIggu4967Ajmd6fpL1eaM=; b=Cd5nQ2p30wNuhs3v7bYnlHFatO5ip58IguzxPWd0qevJfNsXO5dQyXM8QfUoSYYdnGIJEUqmd6IcTivy381t/DDozEdPkiQDChS3lMnuBa8ukOUnUXjpVjWiydPngZiVOXKju0VyWM2DW7Law/pcNLRGtIqulWZmRVcu23jNoqY= 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+importer2=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 1677476522279404.7674163524596; Sun, 26 Feb 2023 21:42:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWCU-0002IG-Ml; Mon, 27 Feb 2023 00:37:26 -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 1pWWCR-00027u-K2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:24 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCP-0002Wa-Gv for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:23 -0500 Received: by mail-pl1-x62b.google.com with SMTP id y11so1401933plg.1 for ; Sun, 26 Feb 2023 21:37:20 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=Me3y4NGZuYmWF3kVGO2rrjiIggu4967Ajmd6fpL1eaM=; b=eZ1VDAE0A4B68/UvZiQsA3HbY5a8VnVVkkO3IvXh9L7Yj+6d7kZT/GB8CvbBXRI/8K PQ7k4TgglZPwAq/WeFaKWdUe3cvpvgmmz66Ojsb/weewFhWyvrrlngxjSfZadTgTOl0g JjETL/kEFWEFMSZ7T1U5h4ac+3sao2AzuEKSsG3ZhqMGCFW73oTh1LH5Si5h6WDuRRXa awL4cxUDpaSSyJ6+2USLEz3TfGcQ3ZwvfXUvaRwQZ0G8oYQf25h8Lo2vrZH++doCPZVt hCDKhFPf1lrKNvr6W6DwXpda7ZPs0vFvK2nPSPP35EQjMDiVQ1CkECCJVYNMA6A1hOnp AEdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Me3y4NGZuYmWF3kVGO2rrjiIggu4967Ajmd6fpL1eaM=; b=NYQ8JALfBaXWJUeDgj88C9MNjrh743sl2DpCgkWYvOASof4SQllud6wx6dEdcy8ezN AFz9IXhZuiDGWhapUIRvDW0UAoRZJZJNV399jwJ7Opm9Niksi1pnBGskuleKuCz3wDvZ t8Swva8Jay7AND1k+0ueC+5Lq7/ADxCrUcClaqw0BjnuqU1jFwHwWyXHWceXo7sqSiZP qWhE5in6DyP5QRqDXMM40AP2YrOrahQP3eoxZUzEHAA0YpRImzYylG0ueNKET7SjrV82 0NePUXwHdWi+4oan0LOwzBPqdZAMJq8XjzslAE0yBEnQ/RuUY+q/y1mn53Z2VvtD5pWJ G7pw== X-Gm-Message-State: AO0yUKWimm1gpz5m+T/lxddssjKTH7YYNMflaicOsab6W8bzlTiKqdZj HcedXNjJk/8a+3wPUf1kveZo1Scon/aBt9HpXLI= X-Google-Smtp-Source: AK7set9ejX/AAfB0TyN98cgEy+QrZl2XFkz5Nwb7RHBq931+BTfn6n1t+ckRCJyg+jHNnMAd1S2spg== X-Received: by 2002:a05:6a20:7351:b0:cc:c5db:ea4a with SMTP id v17-20020a056a20735100b000ccc5dbea4amr7662597pzc.33.1677476239768; Sun, 26 Feb 2023 21:37:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 05/31] tcg: Rename TEMP_LOCAL to TEMP_TB Date: Sun, 26 Feb 2023 19:36:35 -1000 Message-Id: <20230227053701.368744-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476522521100005 Use TEMP_TB as that is more explicit about the default lifetime of the data. While "global" and "local" used to be contrasting, we have more lifetimes than that now. Do not yet rename tcg_temp_local_new_*, just the enum. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 12 ++++++++---- tcg/optimize.c | 2 +- tcg/tcg.c | 18 +++++++++--------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 59854f95b1..2010e746ca 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -433,11 +433,15 @@ typedef enum TCGTempVal { typedef enum TCGTempKind { /* Temp is dead at the end of all basic blocks. */ TEMP_NORMAL, - /* Temp is live across conditional branch, but dead otherwise. */ + /* + * Temp is dead at the end of the extended basic block (EBB), + * the single-entry multiple-exit region that falls through + * conditional branches. + */ TEMP_EBB, - /* Temp is saved across basic blocks but dead at the end of TBs. */ - TEMP_LOCAL, - /* Temp is saved across both basic blocks and translation blocks. */ + /* Temp is live across the entire translation block, but dead at end. = */ + TEMP_TB, + /* Temp is live across the entire translation block, and between them.= */ TEMP_GLOBAL, /* Temp is in a fixed register. */ TEMP_FIXED, diff --git a/tcg/optimize.c b/tcg/optimize.c index 763bca9ea6..ce05989c39 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -190,7 +190,7 @@ static TCGTemp *find_better_copy(TCGContext *s, TCGTemp= *ts) } else if (i->kind > ts->kind) { if (i->kind =3D=3D TEMP_GLOBAL) { g =3D i; - } else if (i->kind =3D=3D TEMP_LOCAL) { + } else if (i->kind =3D=3D TEMP_TB) { l =3D i; } } diff --git a/tcg/tcg.c b/tcg/tcg.c index 0992fb4f31..bf2af8b0fe 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1258,7 +1258,7 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, TC= Gv_ptr base, TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local) { TCGContext *s =3D tcg_ctx; - TCGTempKind kind =3D temp_local ? TEMP_LOCAL : TEMP_NORMAL; + TCGTempKind kind =3D temp_local ? TEMP_TB : TEMP_NORMAL; TCGTemp *ts; int idx, k; =20 @@ -1369,7 +1369,7 @@ void tcg_temp_free_internal(TCGTemp *ts) */ return; case TEMP_NORMAL: - case TEMP_LOCAL: + case TEMP_TB: break; default: g_assert_not_reached(); @@ -1915,7 +1915,7 @@ static void tcg_reg_alloc_start(TCGContext *s) case TEMP_EBB: val =3D TEMP_VAL_DEAD; /* fall through */ - case TEMP_LOCAL: + case TEMP_TB: ts->mem_allocated =3D 0; break; default: @@ -1937,7 +1937,7 @@ static char *tcg_get_arg_str_ptr(TCGContext *s, char = *buf, int buf_size, case TEMP_GLOBAL: pstrcpy(buf, buf_size, ts->name); break; - case TEMP_LOCAL: + case TEMP_TB: snprintf(buf, buf_size, "loc%d", idx - s->nb_globals); break; case TEMP_EBB: @@ -2759,7 +2759,7 @@ static void la_bb_end(TCGContext *s, int ng, int nt) switch (ts->kind) { case TEMP_FIXED: case TEMP_GLOBAL: - case TEMP_LOCAL: + case TEMP_TB: state =3D TS_DEAD | TS_MEM; break; case TEMP_NORMAL: @@ -2804,7 +2804,7 @@ static void la_bb_sync(TCGContext *s, int ng, int nt) int state; =20 switch (ts->kind) { - case TEMP_LOCAL: + case TEMP_TB: state =3D ts->state; ts->state =3D state | TS_MEM; if (state !=3D TS_DEAD) { @@ -3497,7 +3497,7 @@ static void temp_free_or_dead(TCGContext *s, TCGTemp = *ts, int free_or_dead) case TEMP_FIXED: return; case TEMP_GLOBAL: - case TEMP_LOCAL: + case TEMP_TB: new_type =3D TEMP_VAL_MEM; break; case TEMP_NORMAL: @@ -3785,7 +3785,7 @@ static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRe= gSet allocated_regs) TCGTemp *ts =3D &s->temps[i]; =20 switch (ts->kind) { - case TEMP_LOCAL: + case TEMP_TB: temp_save(s, ts, allocated_regs); break; case TEMP_NORMAL: @@ -3822,7 +3822,7 @@ static void tcg_reg_alloc_cbranch(TCGContext *s, TCGR= egSet allocated_regs) * Keep tcg_debug_asserts for safety. */ switch (ts->kind) { - case TEMP_LOCAL: + case TEMP_TB: tcg_debug_assert(ts->val_type !=3D TEMP_VAL_REG || ts->mem_coh= erent); break; case TEMP_NORMAL: --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476473; cv=none; d=zohomail.com; s=zohoarc; b=P+v83adDKsLT0Y3LAGftLQbGp97k3+yPsHAv7STOMKs1zI5NXBW3jTz9LQgckgOtdShY2UkeDzFWWiWFjgLQo9SDkDW58mP7wiYsA6AselTFBhCPiAQIS8JJjZ1+bWilTvYadkRayb+BFN+v6FfqvsQ/86klNOjHBnA/FCAu7IA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476473; 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=XU8chpWpCvoR0LbgkNVM0m0xLd7d7yoa5DmO6k+5Uys=; b=fmr96s3Vx7JpM52HtVcKaV084hZ0LyKTwM37/ykOSM1dQ+nVibuxwbKOWGaJzbwV9xRFanCOwx35H575b/2j3F7zMzq1eNOg08zo5pyrlTDoi+uAqqno1Y+BR7Heg8gH7zyLnOj8nzeOz3EZbMS4A9a/HPxtSf7bcM6TnC+iO4E= 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+importer2=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 1677476473962192.4748165738016; Sun, 26 Feb 2023 21:41:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWCY-0002gj-Ep; Mon, 27 Feb 2023 00:37:30 -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 1pWWCV-0002O8-Jz for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:27 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCS-0002YR-94 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:27 -0500 Received: by mail-pj1-x102d.google.com with SMTP id x20-20020a17090a8a9400b00233ba727724so10693032pjn.1 for ; Sun, 26 Feb 2023 21:37:23 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=XU8chpWpCvoR0LbgkNVM0m0xLd7d7yoa5DmO6k+5Uys=; b=jGR7UdKMY/UbA5lgVk7nCTF7YagWYPZsq3IB/OyPg75G5Iks5qjF26nYjASzUTvW3Z HW9W3eNtoisAl3ao2DLpvh1QZ/O7lEyVbHoeZHeiE74oBxW69xV7zqvHjTiaGR2GlR2d M5j17PG0OZ2W/S4q92AoxxPunwUmozd3VL8LdKut0nmx+Tk0QXep1mLf0uAKHfMapa2d FOu8jiYFGAC3U7dO3UiJyL0mZS1SnLsTGzs9jkUwzxiQ6Yvk27WQ8ZwTwFIfvLZ5/WzR 8FUMYYXZzPEJeUV+XS1OXyB0Nt+3WVqHkOROj4WJXoN7px8HlZ3K1iXZLYBxvbwl1hBl aBPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=XU8chpWpCvoR0LbgkNVM0m0xLd7d7yoa5DmO6k+5Uys=; b=DAsU8pt8T2PJ4WbKwNcNPxAYICoN7W3I5fwYodKsxevQu5Vopks0EUOQFwXlS8ZHuw G7uDsuDNJY5gyQkyMfvO+iVlW9NubIrqb1vMRB1woQ2Vai1jAaETktiHczMvXwYYbbxx 0Rf1dGqLVIVGCNSM7X3ne+WAM+cI+sNoPaVSC2WNv21Z9dD1uBz5hVMsyo8gWc/C3wT5 6nShiZd/NRITy5bi7poayDI8xH8bn840eaS6DP2rO2JTq9IfgyGtm6P9wNdBczNmar4X R0LVdwd0APb0HFdpl/UdsNKWt8R46Eo7NI5DAlicYHCzqbQ8J3BDnN1cuZtfPK4YQTPW anNw== X-Gm-Message-State: AO0yUKULmHe0hJJngSWeRRU/ZsKflYQskFhh3CG73tVjLH5UvdwTT46V tVmntjwtKYTn7YzPAkY2epJg8Nt4VmCKy/BJMEA= X-Google-Smtp-Source: AK7set/zfjscwDuGYzZMIbEI/EKUD7R49MaabrWJq3sfdtD/qcIfKXYjraOr2QNTxJ3SG/td2Et5DQ== X-Received: by 2002:a05:6a20:6a1d:b0:be:e0c3:5012 with SMTP id p29-20020a056a206a1d00b000bee0c35012mr7245340pzk.1.1677476242617; Sun, 26 Feb 2023 21:37:22 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PATCH v4 06/31] tcg: Use noinline for major tcg_gen_code subroutines Date: Sun, 26 Feb 2023 19:36:36 -1000 Message-Id: <20230227053701.368744-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476476380100007 This makes it easier to assign blame with perf. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tcg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index bf2af8b0fe..7ee935701a 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2636,7 +2636,8 @@ TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_= op, } =20 /* Reachable analysis : remove unreachable code. */ -static void reachable_code_pass(TCGContext *s) +static void __attribute__((noinline)) +reachable_code_pass(TCGContext *s) { TCGOp *op, *op_next, *op_prev; bool dead =3D false; @@ -2860,7 +2861,8 @@ static void la_cross_call(TCGContext *s, int nt) /* Liveness analysis : update the opc_arg_life array to tell if a given input arguments is dead. Instructions updating dead temporaries are removed. */ -static void liveness_pass_1(TCGContext *s) +static void __attribute__((noinline)) +liveness_pass_1(TCGContext *s) { int nb_globals =3D s->nb_globals; int nb_temps =3D s->nb_temps; @@ -3200,7 +3202,8 @@ static void liveness_pass_1(TCGContext *s) } =20 /* Liveness analysis: Convert indirect regs to direct temporaries. */ -static bool liveness_pass_2(TCGContext *s) +static bool __attribute__((noinline)) +liveness_pass_2(TCGContext *s) { int nb_globals =3D s->nb_globals; int nb_temps, i; --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476560; cv=none; d=zohomail.com; s=zohoarc; b=XR55vol2JO9engr27VreHhWvprADYAe+zYzAXKXPwDfYhWtlbK3HEFMMTc8UmxGTqaL6svQKC8kE31qhhbnKcTHYvoLUzLKt11mszgfJHYixiBZmY2tWawLhwjQSR/8eOc5EKtT3itJeKl3nBs1QeC9T9E+FxPKEBYPWNgx2ST8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476560; h=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=z2yx2ICVs1zB6ngtjHL2Am0/1UDD6BkdCpu6nOfJ5a4=; b=JMxX+0cyGkxxPphjwdHLrnwVWKZcL+Gr0cqnT2G28UhCZv9Sx4qaIPv6ONLsLQQV95UzhmTRI4ald2xNory9CcADi0Q8pAyX/fQv3bJbUSyyNOXVRIXyEOqjCaR56jbXLsmKYSJVW1NtqlrlTBNiPn5imlpC9/IPKouAY8PxoWE= 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+importer2=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 1677476560943749.6155925970812; Sun, 26 Feb 2023 21:42:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWCr-0003CU-SI; Mon, 27 Feb 2023 00:37:58 -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 1pWWCX-0002ZB-4V for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:29 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCV-0002aF-8T for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:28 -0500 Received: by mail-pf1-x42d.google.com with SMTP id g12so2832958pfi.0 for ; Sun, 26 Feb 2023 21:37:26 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=z2yx2ICVs1zB6ngtjHL2Am0/1UDD6BkdCpu6nOfJ5a4=; b=y99zt4oaIdGSFxgTnRbqMaQNSMHu3V9TkK4/lrhBhyM9ixnNM7WLXvwqkP9v2Z1ip/ GqngGiSAjitx4fbgTDzL2d1HBjWMjR9IrRBnTuHpw98gpR2tYE0oLkf+RfkE5YNxQdzW oj/9zwOtWnryCwsRh2TaJRImktZC5IC3C7SKE74nFfUqslYEpqwU9/YRhvMhyYa4zx7Z arerNif6+5Fxl92NPcuQbOY3Zt6OxG0LIo4Mwy06nX3LDh19OpR/TX6BGdCXR+o6TFRE ajoA1XtzwnRQsYHtODhYoF5wx+WBoSNeSHavq7ceYQfGp6jJHzn4lAEsAN7itLWC/nRX HxaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=z2yx2ICVs1zB6ngtjHL2Am0/1UDD6BkdCpu6nOfJ5a4=; b=IDPgqtkrN8FO8gTCvdLbE9WaoUYiCmiP1w7zxA/Hy/ZzJsHevJoi8x0yH/UC+XSW66 94LasV07IcTEa5Ljn7SU6QSNgkg4wcq7Zg/sPrBzofx80HnzCMmF3+FyKPP/K0aBuhxa MZM5nJGV5Y16bxCHwjaoYBCsG5vbyldRHiEip5r2YHID2MDCvdA5peURYEYzv3dMUsCs w99XiregIKrHU1H0RVDaTiAJ6tbMXaJAf50AR/kCBhJP96W8Be4pxPCMM9C/tbLpDPeF HVy0tDCuK/8hSrb5rrxgL5xwqyx2nJKmxi67auEONCMk1UHo+50i1bew+2H5JqEEA+yZ ve9Q== X-Gm-Message-State: AO0yUKXdkI5etRAGbH6PuCx10OnUsBvz5jIKCIgwlC91LWAy9HEg8aob Lz7pDeU254Pz0yp23h50QwiCI7zO41U6XferSdY= X-Google-Smtp-Source: AK7set9I0oPNr+2dSXzXrqx2AIX03HdrMSqTFwqKLfgD1t8s58t4S4SiDayXAqZADoyc6erCBTDyAA== X-Received: by 2002:a05:6a00:47:b0:5cd:d766:8a2b with SMTP id i7-20020a056a00004700b005cdd7668a2bmr18687656pfk.6.1677476245649; Sun, 26 Feb 2023 21:37:25 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com Subject: [PATCH v4 07/31] tcg: Add liveness_pass_0 Date: Sun, 26 Feb 2023 19:36:37 -1000 Message-Id: <20230227053701.368744-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-1-richard.henderson@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476562735100003 Content-Type: text/plain; charset="utf-8" Attempt to reduce the lifetime of TEMP_TB. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- tcg/tcg.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index 7ee935701a..6646770268 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2858,6 +2858,75 @@ static void la_cross_call(TCGContext *s, int nt) } } =20 +/* + * Liveness analysis: Verify the lifetime of TEMP_TB, and reduce + * to TEMP_EBB, if possible. + */ +static void __attribute__((noinline)) +liveness_pass_0(TCGContext *s) +{ + void * const multiple_ebb =3D (void *)(uintptr_t)-1; + int nb_temps =3D s->nb_temps; + TCGOp *op, *ebb; + + for (int i =3D s->nb_globals; i < nb_temps; ++i) { + s->temps[i].state_ptr =3D NULL; + } + + /* + * Represent each EBB by the op at which it begins. In the case of + * the first EBB, this is the first op, otherwise it is a label. + * Collect the uses of each TEMP_TB: NULL for unused, EBB for use + * within a single EBB, else MULTIPLE_EBB. + */ + ebb =3D QTAILQ_FIRST(&s->ops); + QTAILQ_FOREACH(op, &s->ops, link) { + const TCGOpDef *def; + int nb_oargs, nb_iargs; + + switch (op->opc) { + case INDEX_op_set_label: + ebb =3D op; + continue; + case INDEX_op_discard: + continue; + case INDEX_op_call: + nb_oargs =3D TCGOP_CALLO(op); + nb_iargs =3D TCGOP_CALLI(op); + break; + default: + def =3D &tcg_op_defs[op->opc]; + nb_oargs =3D def->nb_oargs; + nb_iargs =3D def->nb_iargs; + break; + } + + for (int i =3D 0; i < nb_oargs + nb_iargs; ++i) { + TCGTemp *ts =3D arg_temp(op->args[i]); + + if (ts->kind !=3D TEMP_TB) { + continue; + } + if (ts->state_ptr =3D=3D NULL) { + ts->state_ptr =3D ebb; + } else if (ts->state_ptr !=3D ebb) { + ts->state_ptr =3D multiple_ebb; + } + } + } + + /* + * For TEMP_TB that turned out not to be used beyond one EBB, + * reduce the liveness to TEMP_EBB. + */ + for (int i =3D s->nb_globals; i < nb_temps; ++i) { + TCGTemp *ts =3D &s->temps[i]; + if (ts->kind =3D=3D TEMP_TB && ts->state_ptr !=3D multiple_ebb) { + ts->kind =3D TEMP_EBB; + } + } +} + /* Liveness analysis : update the opc_arg_life array to tell if a given input arguments is dead. Instructions updating dead temporaries are removed. */ @@ -4873,6 +4942,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb,= target_ulong pc_start) #endif =20 reachable_code_pass(s); + liveness_pass_0(s); liveness_pass_1(s); =20 if (s->nb_indirects > 0) { --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677486384; cv=none; d=zohomail.com; s=zohoarc; b=YMOzRhIVcKnyXceNryvvfY5rlKoX5eolyV1V6ByuEtu1ymcv3iYkAbdpKF5bGa0TLTykOQzBf+ZAJ816IMk/ng4VwHLIy33e0D3I0XjoAmY1VZTt0vulEtYfvq+gy2xf8tlMaOyvLa/sQHA3/Z5c3EV0kf9SHhBJbcIPdMgiev0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677486384; 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=u3LWtGSaR9SZMaOcttY5mYoHUtJxLxRAkcHm/oHuhko=; b=NPYul2AgWjg4kXnW3O6dD4yu6LreZ6jvcDy86n0u37IzOWSWjiRNY11yvGf4EbgFzlFDsA+eaFH5n42aERj5/DSYTcXDPqks7FW8ga0Pxpku6H94yaTWR1M6uLAjBb0D8xwTW/D6cnNdcVz43fPZMygZwL4Ow1CGwU9A8P1OMlA= 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+importer2=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 1677486384111980.0034812105256; Mon, 27 Feb 2023 00:26:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWD8-0003Ix-9s; Mon, 27 Feb 2023 00:38:09 -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 1pWWCa-0002v1-Oi for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:33 -0500 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCX-0002bw-QI for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:32 -0500 Received: by mail-pf1-x430.google.com with SMTP id g12so2833011pfi.0 for ; Sun, 26 Feb 2023 21:37:29 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=u3LWtGSaR9SZMaOcttY5mYoHUtJxLxRAkcHm/oHuhko=; b=I2oquTATx9zNLVxKWLnTpU/CA/ActTQvCn/9y0kz1bK9PAsnQAo9fLykHPdmbqWqHm 992iv+Ti/eFB9SE7xyNDtKBHAiJVc/wyAWBg0e4wtKk5Y/G2EP9yEFA22phMLlxd9QpL 0olz2bUUUhiEYfzfngoq73OakZUTagaNRxEN7MJFoNbkX37MQPfaHmQp3+I3HU09sgGQ gkvPV1jLnJytEzgDR5x5HaJYA6R8tGsk572MfcUf8UUOycgatarT4f0WjeYkJACpCd6N qypNj944VLDbXBQj4HKf/PAAr6wNUO+55pUAKbRodczmHPOKHXaEfWIQ7RPgwiZr+LcJ aXrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=u3LWtGSaR9SZMaOcttY5mYoHUtJxLxRAkcHm/oHuhko=; b=518yXkSq91ru4V5Upz7rdS22Kfs9XsprskuEUP0nK0qPSUpLjaWDj4vs7QAqAiLl2Z 9IKRIFgpnyfmnNB4RBPyOPC/fyxs6uHs6SNcVqBm4tmwCkeEG5CUA/QwGNZImDCOs9xv HE3eZIPQ1Lf6SMpn5gWlPb8zA13L2L+d66F1eYU4lkyQiOftMyXps1FGxJwPw5GbzRRR UhlAm5Ayg47EkBGti9sgKWSVGvv5/PfLDqqyPSmypAql9boF3+sEVuVNECRx/FqMHVm1 t1eoxn4pScX3mAc2AZJP6L6abma+0+98gzBMfqsM5fQYsvbIZIedkzI11GHywuQgOXWd FDCA== X-Gm-Message-State: AO0yUKXrhQ0RFDirqa4ooYJBGwnDSFcA6MoNIKMKLk9oVysC0FJZ7EhP fiLg1iq5U7pcsoeifb+juXklqwh+IubhnHoCvUc= X-Google-Smtp-Source: AK7set8BWy8Nbm6eiuYfXtXzJtnMPR82is1PHWJFWNmMRJnG4mZQt9z7MEyGiwmdjYzk2SVqSA2C1g== X-Received: by 2002:aa7:96dd:0:b0:5d5:9350:ae05 with SMTP id h29-20020aa796dd000000b005d59350ae05mr15996156pfq.32.1677476248372; Sun, 26 Feb 2023 21:37:28 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 08/31] tcg: Remove TEMP_NORMAL Date: Sun, 26 Feb 2023 19:36:38 -1000 Message-Id: <20230227053701.368744-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677486386420100003 TEMP_NORMAL is a subset of TEMP_EBB. Promote single basic block temps to single extended basic block. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 -- tcg/tcg.c | 19 +++---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 2010e746ca..02d5cfc049 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -431,8 +431,6 @@ typedef enum TCGTempVal { } TCGTempVal; =20 typedef enum TCGTempKind { - /* Temp is dead at the end of all basic blocks. */ - TEMP_NORMAL, /* * Temp is dead at the end of the extended basic block (EBB), * the single-entry multiple-exit region that falls through diff --git a/tcg/tcg.c b/tcg/tcg.c index 6646770268..7ffd4a4f28 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1258,7 +1258,7 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, TC= Gv_ptr base, TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local) { TCGContext *s =3D tcg_ctx; - TCGTempKind kind =3D temp_local ? TEMP_TB : TEMP_NORMAL; + TCGTempKind kind =3D temp_local ? TEMP_TB : TEMP_EBB; TCGTemp *ts; int idx, k; =20 @@ -1368,7 +1368,7 @@ void tcg_temp_free_internal(TCGTemp *ts) * silently ignore free. */ return; - case TEMP_NORMAL: + case TEMP_EBB: case TEMP_TB: break; default: @@ -1384,7 +1384,7 @@ void tcg_temp_free_internal(TCGTemp *ts) #endif =20 idx =3D temp_idx(ts); - k =3D ts->base_type + (ts->kind =3D=3D TEMP_NORMAL ? 0 : TCG_TYPE_COUN= T); + k =3D ts->base_type + (ts->kind =3D=3D TEMP_EBB ? 0 : TCG_TYPE_COUNT); set_bit(idx, s->free_temps[k].l); } =20 @@ -1911,7 +1911,6 @@ static void tcg_reg_alloc_start(TCGContext *s) break; case TEMP_GLOBAL: break; - case TEMP_NORMAL: case TEMP_EBB: val =3D TEMP_VAL_DEAD; /* fall through */ @@ -1941,9 +1940,6 @@ static char *tcg_get_arg_str_ptr(TCGContext *s, char = *buf, int buf_size, snprintf(buf, buf_size, "loc%d", idx - s->nb_globals); break; case TEMP_EBB: - snprintf(buf, buf_size, "ebb%d", idx - s->nb_globals); - break; - case TEMP_NORMAL: snprintf(buf, buf_size, "tmp%d", idx - s->nb_globals); break; case TEMP_CONST: @@ -2763,7 +2759,6 @@ static void la_bb_end(TCGContext *s, int ng, int nt) case TEMP_TB: state =3D TS_DEAD | TS_MEM; break; - case TEMP_NORMAL: case TEMP_EBB: case TEMP_CONST: state =3D TS_DEAD; @@ -2812,9 +2807,6 @@ static void la_bb_sync(TCGContext *s, int ng, int nt) continue; } break; - case TEMP_NORMAL: - s->temps[i].state =3D TS_DEAD; - break; case TEMP_EBB: case TEMP_CONST: continue; @@ -3572,7 +3564,6 @@ static void temp_free_or_dead(TCGContext *s, TCGTemp = *ts, int free_or_dead) case TEMP_TB: new_type =3D TEMP_VAL_MEM; break; - case TEMP_NORMAL: case TEMP_EBB: new_type =3D free_or_dead < 0 ? TEMP_VAL_MEM : TEMP_VAL_DEAD; break; @@ -3860,7 +3851,6 @@ static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRe= gSet allocated_regs) case TEMP_TB: temp_save(s, ts, allocated_regs); break; - case TEMP_NORMAL: case TEMP_EBB: /* The liveness analysis already ensures that temps are dead. Keep an tcg_debug_assert for safety. */ @@ -3897,9 +3887,6 @@ static void tcg_reg_alloc_cbranch(TCGContext *s, TCGR= egSet allocated_regs) case TEMP_TB: tcg_debug_assert(ts->val_type !=3D TEMP_VAL_REG || ts->mem_coh= erent); break; - case TEMP_NORMAL: - tcg_debug_assert(ts->val_type =3D=3D TEMP_VAL_DEAD); - break; case TEMP_EBB: case TEMP_CONST: break; --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476639; cv=none; d=zohomail.com; s=zohoarc; b=nF5DdC1HgADJMzhpPZDDeEpGBAJgNyLAbHTcYGmHtGGmFgrtIXkIpt0HsY1+t0I0xdbZOqJ0mdcPW4ReHEsTYnDMi/q82pTOVYufvfs7+dzUU0bqoYpWJa6JttuCNCPOSyAvYmcrMESyTwR9BD/7RlNdUKRcIBK0PXo5qYZYPR8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476639; 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=L/CRGrAXoy0I0U2f47XrfnXHSDepPYdq71QllQBa+J0=; b=gzdXcMa8A+MQ5vebFwBmCvCNEgZg/DpblYiIRWEyhRsIZk+iKMywvn1+bm9/IHJ2pMkx0MkWZddW9LrdDR/B1w3POOqMVg9hXuOIAyhC7Y5sDGSdLvUOnnwQ52kSwzN2hN39KiDAlBK8SZPLSa5MxnjSvepAgXI9JN4/TrOjmC0= 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+importer2=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 167747663933969.63552297801868; Sun, 26 Feb 2023 21:43:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWDe-0004by-EH; Mon, 27 Feb 2023 00:38:38 -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 1pWWCc-00030V-FS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:35 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCa-0002d0-L8 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:34 -0500 Received: by mail-pf1-x434.google.com with SMTP id cp12so2040411pfb.5 for ; Sun, 26 Feb 2023 21:37:32 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=L/CRGrAXoy0I0U2f47XrfnXHSDepPYdq71QllQBa+J0=; b=APeUmnXjAlY0e2CqjOWX8gyHiMa1eO7N6QHsURoMZV9NudwO9oNRw0WauqcE+S3xmm EBGiRS82imydy2eGZy4FFSbe3ySBsycyJOfguVkog7ljp9Mof9HnEAlzw3m81JKmX3bA eFIyW0GswcMA/+Z9kwu2dHH2fkPqVN4ciri/NlW5Q5TXQlp3Kupp4On3+Q+WQCIqClld m6O8T84zH+UIn/brVmuCfEO8ZExZuyEWYnYYJbozaF/GnUA3g06pu04tKJrFn+dmpaX6 s54in6LuK0uWYgAvfHQDUfuLAa7l0Zv+Ncs8SPwDH6uWJbhFNmF2CzV6OZpbGa8dRGGe X2Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=L/CRGrAXoy0I0U2f47XrfnXHSDepPYdq71QllQBa+J0=; b=g4f0FQUBB7M6KyObnvWSh7/37SEQgPDhukMduzQGc5oqMA6UaK7O/IeA+9nZTDS4Cz kJuLzs66yezVBHL7R3Pr+ffmK+f+4dhLcMyA9DoEkfo2q3ArlwfeqQ4Hnb4ITluQFO0X rksyu6Nb8QqLX6FdmkVyIf3wHJ/cvB42sF0A/+I+0nSq32T4hpm4+cOc84zL+ylRUwHm 00N1OdcvP9mJF/PNTv5iJjP45Yja1/d+vdRIW38zKYRwOeHMyE7GwW90RllGc+B4fp/L bWY4m9X1vPA9jaPQpfRMilQY0C08tmabf25dI60N0hLog3gA+pzzvJPWQszAaxl21c47 KziA== X-Gm-Message-State: AO0yUKWfyvzM/uUs+SRUwahk+I5U2CE8OTxFBhGy3g0yzbVT/9dk7TBW W+5GGrIFvhPqtPMrCNv0swPstT/XCbL2nR/2tdM= X-Google-Smtp-Source: AK7set9UgJRqo3EoUL7xRZrfryrgstsp8v1YdqfEPmA9y//J0rLXUW3k7kB2Scy5gQgLQHXnSP/TiQ== X-Received: by 2002:a62:38d3:0:b0:5a8:d987:d012 with SMTP id f202-20020a6238d3000000b005a8d987d012mr21898463pfa.11.1677476251059; Sun, 26 Feb 2023 21:37:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 09/31] tcg: Pass TCGTempKind to tcg_temp_new_internal Date: Sun, 26 Feb 2023 19:36:39 -1000 Message-Id: <20230227053701.368744-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476641250100003 While the argument can only be TEMP_EBB or TEMP_TB, it's more obvious this way. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 18 +++++++++--------- tcg/tcg.c | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 02d5cfc049..8d896bcbf4 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -855,7 +855,7 @@ void tcg_set_frame(TCGContext *s, TCGReg reg, intptr_t = start, intptr_t size); =20 TCGTemp *tcg_global_mem_new_internal(TCGType, TCGv_ptr, intptr_t, const char *); -TCGTemp *tcg_temp_new_internal(TCGType, bool); +TCGTemp *tcg_temp_new_internal(TCGType, TCGTempKind); void tcg_temp_free_internal(TCGTemp *); TCGv_vec tcg_temp_new_vec(TCGType type); TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match); @@ -894,13 +894,13 @@ static inline TCGv_i32 tcg_global_mem_new_i32(TCGv_pt= r reg, intptr_t offset, =20 static inline TCGv_i32 tcg_temp_new_i32(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, false); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB); return temp_tcgv_i32(t); } =20 static inline TCGv_i32 tcg_temp_local_new_i32(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, true); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, TEMP_TB); return temp_tcgv_i32(t); } =20 @@ -913,25 +913,25 @@ static inline TCGv_i64 tcg_global_mem_new_i64(TCGv_pt= r reg, intptr_t offset, =20 static inline TCGv_i64 tcg_temp_new_i64(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, false); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB); return temp_tcgv_i64(t); } =20 static inline TCGv_i64 tcg_temp_local_new_i64(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, true); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, TEMP_TB); return temp_tcgv_i64(t); } =20 static inline TCGv_i128 tcg_temp_new_i128(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, false); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB); return temp_tcgv_i128(t); } =20 static inline TCGv_i128 tcg_temp_local_new_i128(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, true); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, TEMP_TB); return temp_tcgv_i128(t); } =20 @@ -944,13 +944,13 @@ static inline TCGv_ptr tcg_global_mem_new_ptr(TCGv_pt= r reg, intptr_t offset, =20 static inline TCGv_ptr tcg_temp_new_ptr(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, false); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB); return temp_tcgv_ptr(t); } =20 static inline TCGv_ptr tcg_temp_local_new_ptr(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, true); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_TB); return temp_tcgv_ptr(t); } =20 diff --git a/tcg/tcg.c b/tcg/tcg.c index 7ffd4a4f28..e09ef46b85 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1255,10 +1255,10 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, = TCGv_ptr base, return ts; } =20 -TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local) +TCGTemp *tcg_temp_new_internal(TCGType type, TCGTempKind kind) { TCGContext *s =3D tcg_ctx; - TCGTempKind kind =3D temp_local ? TEMP_TB : TEMP_EBB; + bool temp_local =3D kind =3D=3D TEMP_TB; TCGTemp *ts; int idx, k; =20 @@ -1341,7 +1341,7 @@ TCGv_vec tcg_temp_new_vec(TCGType type) } #endif =20 - t =3D tcg_temp_new_internal(type, 0); + t =3D tcg_temp_new_internal(type, TEMP_EBB); return temp_tcgv_vec(t); } =20 @@ -1352,7 +1352,7 @@ TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match) =20 tcg_debug_assert(t->temp_allocated !=3D 0); =20 - t =3D tcg_temp_new_internal(t->base_type, 0); + t =3D tcg_temp_new_internal(t->base_type, TEMP_EBB); return temp_tcgv_vec(t); } =20 --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476822; cv=none; d=zohomail.com; s=zohoarc; b=n6z3rqiSYCez+zIhYkSbv6GJqA5+Dub2yT4HA/vOw8toNJE9tqeA6lPtKuDOmvo2EGC81Krl3Whw2MjVkZm+qV9GRHAuUHJcTz5XLOwDselHgkHziXS5qwaBy8222Trb5j+mMNzj4L4qBDa1oySicJeZvp+6YJCIe3odTr7akJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476822; 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=o/EjYc2nVUGmJDjgiY+6sooQV/WDkGEXpQsAaSq1iFA=; b=cg1J4Zb1J9OY7WNbgVHARDTbebpA6t1c6AOaZpK7RUYy/R91onIuxbbElCLxDAcjO6kxcsZVCjpoK47wn0PeoObi6KfHHMOadjlJs/qPJFMfOqJIFSti25Wq6dSGprmkquaD5/RR4VSxkOk4InNXRb7mvFuuok4yh93uc0FUXvM= 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+importer2=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 1677476822630905.9112823564222; Sun, 26 Feb 2023 21:47:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWDb-0004P9-R5; Mon, 27 Feb 2023 00:38:36 -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 1pWWCe-000332-SL for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:37 -0500 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCd-0002V3-BR for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:36 -0500 Received: by mail-pg1-x530.google.com with SMTP id h31so2838440pgl.6 for ; Sun, 26 Feb 2023 21:37:34 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=o/EjYc2nVUGmJDjgiY+6sooQV/WDkGEXpQsAaSq1iFA=; b=YT6jOUiBrbX3oGd2PhE4NgjvtF1tNzSZ+O8na1jDHSBxIIAlwb+vXgPI5q/brU8tWd Q8ENE7KuwVBGui764pi+f+yD8Qn9FBfmyH2fLQn3x4AFT1L/dWMGrklVkyS8sDaUlR45 LmnuX9e1UVP7SZqQeJYSwi18UAyzuGwxVStAv6u1hME9oepfyEJGBaSaClUZptaxF377 mACMe+OLbrS6OoHRHms/jVDG4RXljBrPKvGw1ZXu9NBeOEIbQxp0hocCjujaiz8iXWBD Ww6444SnFOuiOK+fCSC+MqbXQ0vxoLjF6yB+8IFqEuDSjt2Mrjr3MwXJj1TUE5eOsdw/ XXvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=o/EjYc2nVUGmJDjgiY+6sooQV/WDkGEXpQsAaSq1iFA=; b=Z6cXh8puL3wuBi+/4/rrTW65iVn6GdY83sgMt6/pTNbwl4GArYSwEZq+SXkFeeBJ1x 7sRGNQsxIrTV+ejZAPvUwHFhb4DNgVxZH1oqphAmwPGYPwBxzug4T3fJzv2ewUZIBsfq sxEJP39Gqz/h2VMNiQXAjaKf0Q+poXnKPPouAOshAjlxtr7uQi/Ipr35w0vY3UiA8OXd LQTp9maPl6lvAIzLBeEbMLVMcItGBnvYGMoPG5KhNLLq8OOeB6HL0ReoVPabAkwc/Qwh tib8J7G8tFxpedRlhbSik1qyLFBEUb+SBtvSl1kMfJkIg/CtKOrZs+OkwjwjPkL40spQ xAxQ== X-Gm-Message-State: AO0yUKVqEduj+3jgMb4wNrB9TWFssWS4Wuq/7Dn67HSZP7lHZtiVLlgg fz2zMbxv9fUBMIcvvnFm/RLjDABlW1ucrJqKTFs= X-Google-Smtp-Source: AK7set9wD8JI2IP/JGjjzUpqGHBNNlAMqJHE7pn56gTmR5z1lRq5/i6/j6nZY+4gaQCFRaiB/AjCHg== X-Received: by 2002:aa7:8882:0:b0:5a8:e3d5:d7d4 with SMTP id z2-20020aa78882000000b005a8e3d5d7d4mr9489088pfe.7.1677476253963; Sun, 26 Feb 2023 21:37:33 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PATCH v4 10/31] tcg: Use tcg_constant_i32 in tcg_gen_io_start Date: Sun, 26 Feb 2023 19:36:40 -1000 Message-Id: <20230227053701.368744-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476824279100009 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index c57204ddad..4d8b1f9ae5 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -10,11 +10,9 @@ static TCGOp *icount_start_insn; =20 static inline void gen_io_start(void) { - TCGv_i32 tmp =3D tcg_const_i32(1); - tcg_gen_st_i32(tmp, cpu_env, + tcg_gen_st_i32(tcg_constant_i32(1), cpu_env, offsetof(ArchCPU, parent_obj.can_do_io) - offsetof(ArchCPU, env)); - tcg_temp_free_i32(tmp); } =20 static inline void gen_tb_start(const TranslationBlock *tb) --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477132; cv=none; d=zohomail.com; s=zohoarc; b=CvUZJbXCsi3ESMGZeP6GweMc73thK7RXTJPHJRQPiaBLSPbiXZjYi3oau65l42h8m4Q1BUQlk9Pq0JObQTNwEGIb5X7u6EAaUh53Bk7T8WBCZyEmX5NukaAItJJJdPOLpl57Fft3JlAFC+FSohbdkug7Nu7jQsEgK45iGlOyk5s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477132; 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=T8JhNPBurv6UPBw5+T0ptsUEofBEBgdE2LEBxrO3wBY=; b=ZgnwsckAOSPsLoyAPAckLRJ2+HwbFUlFAAbSVwsfcO+W2EebNUVXi0tq9VEVxh7FyHaWyG9GqLKrfvSu8K7u5jYSUsIS+gMgD1n9caYMRcKdL1pmFxr3F/KEO2PqaaptyAxbDIZaJPzbvjd3fU9C56FCVJeU71teIyDWqu/9ffg= 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+importer2=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 1677477132236812.5325713918264; Sun, 26 Feb 2023 21:52:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWDq-0005Uz-R6; Mon, 27 Feb 2023 00:38:50 -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 1pWWCh-00034a-JI for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:41 -0500 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCf-0002gU-R2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:39 -0500 Received: by mail-pf1-x430.google.com with SMTP id n5so2774193pfv.11 for ; Sun, 26 Feb 2023 21:37:37 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=T8JhNPBurv6UPBw5+T0ptsUEofBEBgdE2LEBxrO3wBY=; b=NWx21CppDsL2JMOvm4QkWSZWqvIOVJF8i+WdWr6ZobSiSWHSCp9zY13AjGhHUxyeCT nBMQapLUSlkVuzITSDSbdu0CRyR6UEwd+VwUlnW3VXgu0Tnf3zCb67PlXEdUAaMUIgm+ B1gBz5vfjTezfbgI4vcsmHLTpO6N4d7rVWN0Z1tf4QmmyQhLFyYXB1tlgabQmh2ph79d PmuOH+M/olKr3c1vTQ/JyYCKxvSi7tbRZonYJJ7j1GD6usHSJqsOTIv0X85udnY7hv9+ QA0VdK05I6us8BWtN0fsiaDGjBTKDmW2Qo8LoD3tUn16/6dEGV/rbvyuN+4wUqkQtcJQ ybug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=T8JhNPBurv6UPBw5+T0ptsUEofBEBgdE2LEBxrO3wBY=; b=SxC99QxZIZ1zqNkC6m4O2ldeno8WQkrjBlqcN6jvL8VoVYRebqEl+SBk6wq05AvJ3V WuQ4bO2P5ZqNPxwKsqO6KHYP6TZ9Jdjy/jW58hxDMVGMSdjLVc0HAy/po8t7P0IJtKR4 N4uATHjSGNFp5ifT1I30JwW/z3uGNxt3luInzMZkyPbQcXSEkd9t3eTiGDMKesUNthe4 rueb+mk5CdBkPgysCL4K5mfuYiXA+lD00wb/tdJhrCVHpVvEWz7eVZRGwCcYp0tbdwlF 8YCCQnd166BMQR3bga/K1O/RwOsIdkMtRTry/Y5TYoYQGJcYqEJAhq9NmKTIhUe34eft oteA== X-Gm-Message-State: AO0yUKUiyi7kFnMMjDPP6PUYhBK3dyhcuiXbPKlHtQQnSfEQyPq1ceQm NI+K4gtztaee73Fvn2mGRjOkd8wt6TFN3TrIaxw= X-Google-Smtp-Source: AK7set+fsSUfr0oS2RRsd0O29Ial7f7lJU9cZTbHE4JQ4Whu+mdhrzODZ31JUM8Fm2l2PX6+QJDnew== X-Received: by 2002:aa7:9a0e:0:b0:5ef:b4e1:db0e with SMTP id w14-20020aa79a0e000000b005efb4e1db0emr4251081pfj.16.1677476256629; Sun, 26 Feb 2023 21:37:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 11/31] tcg: Add tcg_gen_movi_ptr Date: Sun, 26 Feb 2023 19:36:41 -1000 Message-Id: <20230227053701.368744-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477133779100003 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 839d91c0c7..66b1461caa 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -1285,6 +1285,11 @@ static inline void tcg_gen_mov_ptr(TCGv_ptr d, TCGv_= ptr s) glue(tcg_gen_mov_,PTR)((NAT)d, (NAT)s); } =20 +static inline void tcg_gen_movi_ptr(TCGv_ptr d, intptr_t s) +{ + glue(tcg_gen_movi_,PTR)((NAT)d, s); +} + static inline void tcg_gen_brcondi_ptr(TCGCond cond, TCGv_ptr a, intptr_t b, TCGLabel *label) { --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476509; cv=none; d=zohomail.com; s=zohoarc; b=RvEOglYEzq4+fEuKPIkkMgB1kpBQA2zEBqdqP3yB4KMQcki9FO3tWiIoiVs9FkP+ccHFBjSGUIRAOjr40MJ1njXK0vYMvTQfU5a4MsgAiHlUOm9p84cEzqrK7QRGNqnlLiKS7/BX39EE/Zknb0TVos+RVUQtYfSrozTb5trRpJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476509; 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=VjZP4LY1Wxefy+0rLrks1q4QR8IjH+TMsA5bjteWWKA=; b=clyCWkdn14oC5yD0aHvJ8sqEh4AMNGyqElpv6Herm3OTlV+eMCaVqQwOu1IledzwuTHAyLEzobJwVkcpRytwGzHcge5RrWqsERMJJngG2gWzuQLyzAHHLsiBavlYn4QR93+dLgb5Dtf2eGx42/8BvABjKLshav/sVg6b81T/llI= 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+importer2=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 1677476509605913.8888609893389; Sun, 26 Feb 2023 21:41:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWE2-0006y7-7a; Mon, 27 Feb 2023 00:39:02 -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 1pWWCm-0003Ar-8t for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:44 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCj-0002Oe-2j for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:43 -0500 Received: by mail-pj1-x1036.google.com with SMTP id c23so4867547pjo.4 for ; Sun, 26 Feb 2023 21:37:39 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=VjZP4LY1Wxefy+0rLrks1q4QR8IjH+TMsA5bjteWWKA=; b=Ysgcfs9rzRtL/UfwmholIWix5qpAaif42x5oQNvsRF1ffo9R4gFXRAbIdPablttr+h EM2MxebuFqq3Oi+Ywm0wJZADqJb+TDVf8TRv4hYRvd6pxXd4EXCPTIUwmZlVHZgpc2SF 9LeWU41hukxSy30xY1hgdjEXD6gQNXyRazYFSbCNyrF0uciAuYgtoT0eyiXyG+1kHX4l iCIcALqQNti2kDM8DJ3n7UsEb09q+foVRcnqcjHumbxM09uc1lYR5O7dLy/iD+GujUdW 6sfFFznlSkrYTvDgdAMXAsNRyysT74+03WctOEv82dxiYvxdOAf9aeSyCNp1wHI3pAlo rSYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=VjZP4LY1Wxefy+0rLrks1q4QR8IjH+TMsA5bjteWWKA=; b=NgZ1nh+Vp1ucguEs3jdvmfI+J7R+BUxgDN4oiXHG+rSSr+HBrxXXkF0JNy1sHOuZzE aSzNIMqZe5sC5jttAOurheoTZoR3LMpELiSsQpVgxcxpgeflJ2rTfeimDw5c780t6g7s xgZaL1rs3fwFM+IaeVT72/nbyAopWK361V2dpaDmNO2pOKlcBJ8bnKm9QBND9CLjpGBy EArZKaeMoSmmW5fFP0vbyYO6Ko5dVaREE5tA9bk5GtPKFnLttuSGzNGJ10CguKF+pb4l OL2udM+1FInH1gvi/ctvYoXPGK/sdoat3NdlVIyO4kOTZYr9BDAvhfc3gtRhgEIy5I9L OnQQ== X-Gm-Message-State: AO0yUKVPUHbLz0/2RdV9VlWrhbZXgCVqRVhPaE3vmsBSfSRYHVUpIJp3 niNhe8cY+fFGU19O81Rux2zX4kxBpB9Qbht0+2E= X-Google-Smtp-Source: AK7set8LZwIkRMnMLx6GwpxCf9/Rr5S+wVCTra3aqUFcKOTbKRe4JOxU1aYZYE+3O/aQHjkO/kwuLw== X-Received: by 2002:a05:6a20:3d18:b0:bd:17a4:c35f with SMTP id y24-20020a056a203d1800b000bd17a4c35fmr27404534pzi.23.1677476259344; Sun, 26 Feb 2023 21:37:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 12/31] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr} Date: Sun, 26 Feb 2023 19:36:42 -1000 Message-Id: <20230227053701.368744-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FUZZY_BITCOIN=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476510438100001 TCG internals will want to be able to allocate and reuse explicitly life-limited temporaries. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 8d896bcbf4..0c2041bcf7 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -892,6 +892,13 @@ static inline TCGv_i32 tcg_global_mem_new_i32(TCGv_ptr= reg, intptr_t offset, return temp_tcgv_i32(t); } =20 +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_i32 tcg_temp_ebb_new_i32(void) +{ + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB); + return temp_tcgv_i32(t); +} + static inline TCGv_i32 tcg_temp_new_i32(void) { TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB); @@ -911,6 +918,13 @@ static inline TCGv_i64 tcg_global_mem_new_i64(TCGv_ptr= reg, intptr_t offset, return temp_tcgv_i64(t); } =20 +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_i64 tcg_temp_ebb_new_i64(void) +{ + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB); + return temp_tcgv_i64(t); +} + static inline TCGv_i64 tcg_temp_new_i64(void) { TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB); @@ -923,6 +937,13 @@ static inline TCGv_i64 tcg_temp_local_new_i64(void) return temp_tcgv_i64(t); } =20 +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_i128 tcg_temp_ebb_new_i128(void) +{ + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB); + return temp_tcgv_i128(t); +} + static inline TCGv_i128 tcg_temp_new_i128(void) { TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB); @@ -942,6 +963,13 @@ static inline TCGv_ptr tcg_global_mem_new_ptr(TCGv_ptr= reg, intptr_t offset, return temp_tcgv_ptr(t); } =20 +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_ptr tcg_temp_ebb_new_ptr(void) +{ + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB); + return temp_tcgv_ptr(t); +} + static inline TCGv_ptr tcg_temp_new_ptr(void) { TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB); --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677485804; cv=none; d=zohomail.com; s=zohoarc; b=QepyZi6LVTu6++2oudGFDdwd+k0utQTU8382u0W9F4N3iPsyV//aBTTsoNnTK74swu/4hBbHWgEuC4KQuQgessQDc+dTcVCOUYGYtFQ4QQg3M7xI+/y9sT2OU5RGXGNVi8ra4/vLCTvDfZ0pFdpKUwmk96Oyvc3OUTYsph5aLMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677485804; 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=gT3cFPSx+7uaG9Bs0tcE9MJ66oA1ieBVs1HEx8Z5q+A=; b=AdT9/NJuk4Su97VNUmC9n+ehqHFvw34TGwcYlPPhFvLj52lQC/4d+D+GjAASSf7J7MjpX2dZfcKMePXV1PGp5nmM6RYi9g+X72jsOM49Pnm5cc4/s/2n4bUXogKr5TVAk6IEa0WaDeYqgxIafFMIw6Z/sW+8+j5mYTK/6MN6Kdc= 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+importer2=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 1677485804555523.619830697978; Mon, 27 Feb 2023 00:16:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWDj-00052q-Pt; Mon, 27 Feb 2023 00:38:45 -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 1pWWCv-0003MA-Iu for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:58 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCn-0002kd-QK for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:53 -0500 Received: by mail-pl1-x634.google.com with SMTP id p20so4330978plw.13 for ; Sun, 26 Feb 2023 21:37:43 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=gT3cFPSx+7uaG9Bs0tcE9MJ66oA1ieBVs1HEx8Z5q+A=; b=vtRH+wbb2I8UAIW/XZE/NffKmegZAVbYrBrtppSGTA//xnjufL2LMUFFpgqHH6WvKq N7Xao1diHFgFqIVSqML7wyq/L7Hx1o2+fPEL0d9gQH2d/b5ig/lNYynmWpghtLaL0l0r loif0vP5zVnIM78IosikP4PMYg5utpZ/4eeABqIVwv1Zuq3maiLI5/nhIYHKwd9JiyzZ rbHHCE3n0Mh7yCKfe3wKs4dIAkYWbLr4vGd+6nbV/ezcNe3sSBGd5eDMgq+kw7HryTGE sD9HDbaYbWwbjKV6/FkY4IaTcIpucZYOWm7+khSvJreG/y2HiDR4J9x96V9ugS8vqiE7 D9hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=gT3cFPSx+7uaG9Bs0tcE9MJ66oA1ieBVs1HEx8Z5q+A=; b=LBwpLnIMmFsRO5U72qvm1UJaOMQfSwWRFcB+M2SBrI6xy++W8J9T4MllRKaLh3G/NH rbwOAER7T8M0wTCkDNjYuP5SDKtzS4Xk4YCwKuJ89Kj37ojl5tIEF6VxWSAc7Xr7qmdR w+wQUyN3pMaIWawfoBUU6tN/Cr0t6GaDxNShRAtR0ZNg7DGHURQzc8gMCRsNHBYD/SPn Uj4zcSvgdKnTaSXuG6Aj7knlpnZQdjd4WJPctji0H5eIusuP/xEHyzP2JNYD30y5aA6t PKNOUrvJ64fKWC73lv/gcCiOWY/091zMce+1eg3HFeMXJOzgrdUbyYfVGmXiQmNZ1T18 jPGg== X-Gm-Message-State: AO0yUKUnFhMI4FPKfU52BlRFzFVfPdWssexR/2Disu+6Kx2O7jOvo6jk SHlyTsfCQcjkkQ1mHONgQj+75yc65mM1YbKYO2o= X-Google-Smtp-Source: AK7set99bQTYl7Cv9zsBDmuQcpYgt7ZU42uySAmkwFd9QfcjFcrbXsdTnEALVh8q9pCXGenooMBIcA== X-Received: by 2002:a05:6a20:8c03:b0:cd:40b4:7c3c with SMTP id j3-20020a056a208c0300b000cd40b47c3cmr2020235pzh.57.1677476262545; Sun, 26 Feb 2023 21:37:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 13/31] tcg: Use tcg_temp_ebb_new_* in tcg/ Date: Sun, 26 Feb 2023 19:36:43 -1000 Message-Id: <20230227053701.368744-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677485804901100001 All of these have obvious and quite local scope. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 186 ++++++++++++++++----------------- tcg/tcg-op.c | 258 +++++++++++++++++++++++----------------------- tcg/tcg.c | 2 +- 3 files changed, 223 insertions(+), 223 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index 079a761b04..a10d406bba 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@ -117,8 +117,8 @@ void tcg_gen_gvec_2_ool(uint32_t dofs, uint32_t aofs, TCGv_ptr a0, a1; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -138,8 +138,8 @@ void tcg_gen_gvec_2i_ool(uint32_t dofs, uint32_t aofs, = TCGv_i64 c, TCGv_ptr a0, a1; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -158,9 +158,9 @@ void tcg_gen_gvec_3_ool(uint32_t dofs, uint32_t aofs, u= int32_t bofs, TCGv_ptr a0, a1, a2; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); - a2 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); + a2 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -181,10 +181,10 @@ void tcg_gen_gvec_4_ool(uint32_t dofs, uint32_t aofs,= uint32_t bofs, TCGv_ptr a0, a1, a2, a3; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); - a2 =3D tcg_temp_new_ptr(); - a3 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); + a2 =3D tcg_temp_ebb_new_ptr(); + a3 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -207,11 +207,11 @@ void tcg_gen_gvec_5_ool(uint32_t dofs, uint32_t aofs,= uint32_t bofs, TCGv_ptr a0, a1, a2, a3, a4; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); - a2 =3D tcg_temp_new_ptr(); - a3 =3D tcg_temp_new_ptr(); - a4 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); + a2 =3D tcg_temp_ebb_new_ptr(); + a3 =3D tcg_temp_ebb_new_ptr(); + a4 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -237,8 +237,8 @@ void tcg_gen_gvec_2_ptr(uint32_t dofs, uint32_t aofs, TCGv_ptr a0, a1; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -258,9 +258,9 @@ void tcg_gen_gvec_3_ptr(uint32_t dofs, uint32_t aofs, u= int32_t bofs, TCGv_ptr a0, a1, a2; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); - a2 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); + a2 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -283,10 +283,10 @@ void tcg_gen_gvec_4_ptr(uint32_t dofs, uint32_t aofs,= uint32_t bofs, TCGv_ptr a0, a1, a2, a3; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); - a2 =3D tcg_temp_new_ptr(); - a3 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); + a2 =3D tcg_temp_ebb_new_ptr(); + a3 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -311,11 +311,11 @@ void tcg_gen_gvec_5_ptr(uint32_t dofs, uint32_t aofs,= uint32_t bofs, TCGv_ptr a0, a1, a2, a3, a4; TCGv_i32 desc =3D tcg_constant_i32(simd_desc(oprsz, maxsz, data)); =20 - a0 =3D tcg_temp_new_ptr(); - a1 =3D tcg_temp_new_ptr(); - a2 =3D tcg_temp_new_ptr(); - a3 =3D tcg_temp_new_ptr(); - a4 =3D tcg_temp_new_ptr(); + a0 =3D tcg_temp_ebb_new_ptr(); + a1 =3D tcg_temp_ebb_new_ptr(); + a2 =3D tcg_temp_ebb_new_ptr(); + a3 =3D tcg_temp_ebb_new_ptr(); + a4 =3D tcg_temp_ebb_new_ptr(); =20 tcg_gen_addi_ptr(a0, cpu_env, dofs); tcg_gen_addi_ptr(a1, cpu_env, aofs); @@ -576,16 +576,16 @@ static void do_dup(unsigned vece, uint32_t dofs, uint= 32_t oprsz, be simple enough. */ if (TCG_TARGET_REG_BITS =3D=3D 64 && (vece !=3D MO_32 || !check_size_impl(oprsz, 4))) { - t_64 =3D tcg_temp_new_i64(); + t_64 =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(t_64, in_32); tcg_gen_dup_i64(vece, t_64, t_64); } else { - t_32 =3D tcg_temp_new_i32(); + t_32 =3D tcg_temp_ebb_new_i32(); tcg_gen_dup_i32(vece, t_32, in_32); } } else if (in_64) { /* We are given a 64-bit variable input. */ - t_64 =3D tcg_temp_new_i64(); + t_64 =3D tcg_temp_ebb_new_i64(); tcg_gen_dup_i64(vece, t_64, in_64); } else { /* We are given a constant input. */ @@ -620,7 +620,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32= _t oprsz, } =20 /* Otherwise implement out of line. */ - t_ptr =3D tcg_temp_new_ptr(); + t_ptr =3D tcg_temp_ebb_new_ptr(); tcg_gen_addi_ptr(t_ptr, cpu_env, dofs); =20 /* @@ -636,7 +636,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32= _t oprsz, if (in_32) { t_val =3D in_32; } else if (in_64) { - t_val =3D tcg_temp_new_i32(); + t_val =3D tcg_temp_ebb_new_i32(); tcg_gen_extrl_i64_i32(t_val, in_64); } else { t_val =3D tcg_constant_i32(in_c); @@ -671,7 +671,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32= _t oprsz, if (in_32) { fns[vece](t_ptr, t_desc, in_32); } else if (in_64) { - t_32 =3D tcg_temp_new_i32(); + t_32 =3D tcg_temp_ebb_new_i32(); tcg_gen_extrl_i64_i32(t_32, in_64); fns[vece](t_ptr, t_desc, t_32); tcg_temp_free_i32(t_32); @@ -1735,7 +1735,7 @@ void tcg_gen_gvec_dup_mem(unsigned vece, uint32_t dof= s, uint32_t aofs, do_dup_store(type, dofs, oprsz, maxsz, t_vec); tcg_temp_free_vec(t_vec); } else if (vece <=3D MO_32) { - TCGv_i32 in =3D tcg_temp_new_i32(); + TCGv_i32 in =3D tcg_temp_ebb_new_i32(); switch (vece) { case MO_8: tcg_gen_ld8u_i32(in, cpu_env, aofs); @@ -1750,7 +1750,7 @@ void tcg_gen_gvec_dup_mem(unsigned vece, uint32_t dof= s, uint32_t aofs, do_dup(vece, dofs, oprsz, maxsz, in, NULL, 0); tcg_temp_free_i32(in); } else { - TCGv_i64 in =3D tcg_temp_new_i64(); + TCGv_i64 in =3D tcg_temp_ebb_new_i64(); tcg_gen_ld_i64(in, cpu_env, aofs); do_dup(vece, dofs, oprsz, maxsz, NULL, in, 0); tcg_temp_free_i64(in); @@ -1769,8 +1769,8 @@ void tcg_gen_gvec_dup_mem(unsigned vece, uint32_t dof= s, uint32_t aofs, } tcg_temp_free_vec(in); } else { - TCGv_i64 in0 =3D tcg_temp_new_i64(); - TCGv_i64 in1 =3D tcg_temp_new_i64(); + TCGv_i64 in0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 in1 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_ld_i64(in0, cpu_env, aofs); tcg_gen_ld_i64(in1, cpu_env, aofs + 8); @@ -1815,7 +1815,7 @@ void tcg_gen_gvec_dup_mem(unsigned vece, uint32_t dof= s, uint32_t aofs, int j; =20 for (j =3D 0; j < 4; ++j) { - in[j] =3D tcg_temp_new_i64(); + in[j] =3D tcg_temp_ebb_new_i64(); tcg_gen_ld_i64(in[j], cpu_env, aofs + j * 8); } for (i =3D (aofs =3D=3D dofs) * 32; i < oprsz; i +=3D 32) { @@ -1860,9 +1860,9 @@ void tcg_gen_gvec_not(unsigned vece, uint32_t dofs, u= int32_t aofs, the 64-bit operation. */ static void gen_addv_mask(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b, TCGv_i64 m) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); - TCGv_i64 t3 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t3 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andc_i64(t1, a, m); tcg_gen_andc_i64(t2, b, m); @@ -1885,9 +1885,9 @@ void tcg_gen_vec_add8_i64(TCGv_i64 d, TCGv_i64 a, TCG= v_i64 b) void tcg_gen_vec_add8_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { TCGv_i32 m =3D tcg_constant_i32((int32_t)dup_const(MO_8, 0x80)); - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); - TCGv_i32 t3 =3D tcg_temp_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t3 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andc_i32(t1, a, m); tcg_gen_andc_i32(t2, b, m); @@ -1909,8 +1909,8 @@ void tcg_gen_vec_add16_i64(TCGv_i64 d, TCGv_i64 a, TC= Gv_i64 b) =20 void tcg_gen_vec_add16_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andi_i32(t1, a, ~0xffff); tcg_gen_add_i32(t2, a, b); @@ -1923,8 +1923,8 @@ void tcg_gen_vec_add16_i32(TCGv_i32 d, TCGv_i32 a, TC= Gv_i32 b) =20 void tcg_gen_vec_add32_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t1, a, ~0xffffffffull); tcg_gen_add_i64(t2, a, b); @@ -2043,9 +2043,9 @@ void tcg_gen_gvec_subs(unsigned vece, uint32_t dofs, = uint32_t aofs, Compare gen_addv_mask above. */ static void gen_subv_mask(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b, TCGv_i64 m) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); - TCGv_i64 t3 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t3 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_or_i64(t1, a, m); tcg_gen_andc_i64(t2, b, m); @@ -2068,9 +2068,9 @@ void tcg_gen_vec_sub8_i64(TCGv_i64 d, TCGv_i64 a, TCG= v_i64 b) void tcg_gen_vec_sub8_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { TCGv_i32 m =3D tcg_constant_i32((int32_t)dup_const(MO_8, 0x80)); - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); - TCGv_i32 t3 =3D tcg_temp_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t3 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_or_i32(t1, a, m); tcg_gen_andc_i32(t2, b, m); @@ -2092,8 +2092,8 @@ void tcg_gen_vec_sub16_i64(TCGv_i64 d, TCGv_i64 a, TC= Gv_i64 b) =20 void tcg_gen_vec_sub16_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andi_i32(t1, b, ~0xffff); tcg_gen_sub_i32(t2, a, b); @@ -2106,8 +2106,8 @@ void tcg_gen_vec_sub16_i32(TCGv_i32 d, TCGv_i32 a, TC= Gv_i32 b) =20 void tcg_gen_vec_sub32_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t1, b, ~0xffffffffull); tcg_gen_sub_i64(t2, a, b); @@ -2468,8 +2468,8 @@ void tcg_gen_gvec_umax(unsigned vece, uint32_t dofs, = uint32_t aofs, Compare gen_subv_mask above. */ static void gen_negv_mask(TCGv_i64 d, TCGv_i64 b, TCGv_i64 m) { - TCGv_i64 t2 =3D tcg_temp_new_i64(); - TCGv_i64 t3 =3D tcg_temp_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t3 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andc_i64(t3, m, b); tcg_gen_andc_i64(t2, b, m); @@ -2494,8 +2494,8 @@ void tcg_gen_vec_neg16_i64(TCGv_i64 d, TCGv_i64 b) =20 void tcg_gen_vec_neg32_i64(TCGv_i64 d, TCGv_i64 b) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t1, b, ~0xffffffffull); tcg_gen_neg_i64(t2, b); @@ -2540,7 +2540,7 @@ void tcg_gen_gvec_neg(unsigned vece, uint32_t dofs, u= int32_t aofs, =20 static void gen_absv_mask(TCGv_i64 d, TCGv_i64 b, unsigned vece) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); int nbit =3D 8 << vece; =20 /* Create -1 for each negative element. */ @@ -2749,7 +2749,7 @@ static const GVecGen2s gop_ands =3D { void tcg_gen_gvec_ands(unsigned vece, uint32_t dofs, uint32_t aofs, TCGv_i64 c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_temp_new_i64(); + TCGv_i64 tmp =3D tcg_temp_ebb_new_i64(); tcg_gen_dup_i64(vece, tmp, c); tcg_gen_gvec_2s(dofs, aofs, oprsz, maxsz, tmp, &gop_ands); tcg_temp_free_i64(tmp); @@ -2773,7 +2773,7 @@ static const GVecGen2s gop_xors =3D { void tcg_gen_gvec_xors(unsigned vece, uint32_t dofs, uint32_t aofs, TCGv_i64 c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_temp_new_i64(); + TCGv_i64 tmp =3D tcg_temp_ebb_new_i64(); tcg_gen_dup_i64(vece, tmp, c); tcg_gen_gvec_2s(dofs, aofs, oprsz, maxsz, tmp, &gop_xors); tcg_temp_free_i64(tmp); @@ -2797,7 +2797,7 @@ static const GVecGen2s gop_ors =3D { void tcg_gen_gvec_ors(unsigned vece, uint32_t dofs, uint32_t aofs, TCGv_i64 c, uint32_t oprsz, uint32_t maxsz) { - TCGv_i64 tmp =3D tcg_temp_new_i64(); + TCGv_i64 tmp =3D tcg_temp_ebb_new_i64(); tcg_gen_dup_i64(vece, tmp, c); tcg_gen_gvec_2s(dofs, aofs, oprsz, maxsz, tmp, &gop_ors); tcg_temp_free_i64(tmp); @@ -2944,7 +2944,7 @@ void tcg_gen_vec_sar8i_i64(TCGv_i64 d, TCGv_i64 a, in= t64_t c) { uint64_t s_mask =3D dup_const(MO_8, 0x80 >> c); uint64_t c_mask =3D dup_const(MO_8, 0xff >> c); - TCGv_i64 s =3D tcg_temp_new_i64(); + TCGv_i64 s =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_shri_i64(d, a, c); tcg_gen_andi_i64(s, d, s_mask); /* isolate (shifted) sign bit */ @@ -2958,7 +2958,7 @@ void tcg_gen_vec_sar16i_i64(TCGv_i64 d, TCGv_i64 a, i= nt64_t c) { uint64_t s_mask =3D dup_const(MO_16, 0x8000 >> c); uint64_t c_mask =3D dup_const(MO_16, 0xffff >> c); - TCGv_i64 s =3D tcg_temp_new_i64(); + TCGv_i64 s =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_shri_i64(d, a, c); tcg_gen_andi_i64(s, d, s_mask); /* isolate (shifted) sign bit */ @@ -2972,7 +2972,7 @@ void tcg_gen_vec_sar8i_i32(TCGv_i32 d, TCGv_i32 a, in= t32_t c) { uint32_t s_mask =3D dup_const(MO_8, 0x80 >> c); uint32_t c_mask =3D dup_const(MO_8, 0xff >> c); - TCGv_i32 s =3D tcg_temp_new_i32(); + TCGv_i32 s =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_shri_i32(d, a, c); tcg_gen_andi_i32(s, d, s_mask); /* isolate (shifted) sign bit */ @@ -2986,7 +2986,7 @@ void tcg_gen_vec_sar16i_i32(TCGv_i32 d, TCGv_i32 a, i= nt32_t c) { uint32_t s_mask =3D dup_const(MO_16, 0x8000 >> c); uint32_t c_mask =3D dup_const(MO_16, 0xffff >> c); - TCGv_i32 s =3D tcg_temp_new_i32(); + TCGv_i32 s =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_shri_i32(d, a, c); tcg_gen_andi_i32(s, d, s_mask); /* isolate (shifted) sign bit */ @@ -3180,7 +3180,7 @@ do_gvec_shifts(unsigned vece, uint32_t dofs, uint32_t= aofs, TCGv_i32 shift, TCGv_vec v_shift =3D tcg_temp_new_vec(type); =20 if (vece =3D=3D MO_64) { - TCGv_i64 sh64 =3D tcg_temp_new_i64(); + TCGv_i64 sh64 =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(sh64, shift); tcg_gen_dup_i64_vec(MO_64, v_shift, sh64); tcg_temp_free_i64(sh64); @@ -3221,14 +3221,14 @@ do_gvec_shifts(unsigned vece, uint32_t dofs, uint32= _t aofs, TCGv_i32 shift, if (vece =3D=3D MO_32 && check_size_impl(oprsz, 4)) { expand_2s_i32(dofs, aofs, oprsz, shift, false, g->fni4); } else if (vece =3D=3D MO_64 && check_size_impl(oprsz, 8)) { - TCGv_i64 sh64 =3D tcg_temp_new_i64(); + TCGv_i64 sh64 =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(sh64, shift); expand_2s_i64(dofs, aofs, oprsz, sh64, false, g->fni8); tcg_temp_free_i64(sh64); } else { - TCGv_ptr a0 =3D tcg_temp_new_ptr(); - TCGv_ptr a1 =3D tcg_temp_new_ptr(); - TCGv_i32 desc =3D tcg_temp_new_i32(); + TCGv_ptr a0 =3D tcg_temp_ebb_new_ptr(); + TCGv_ptr a1 =3D tcg_temp_ebb_new_ptr(); + TCGv_i32 desc =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_shli_i32(desc, shift, SIMD_DATA_SHIFT); tcg_gen_ori_i32(desc, desc, simd_desc(oprsz, maxsz, 0)); @@ -3360,7 +3360,7 @@ static void tcg_gen_shlv_mod_vec(unsigned vece, TCGv_= vec d, =20 static void tcg_gen_shl_mod_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andi_i32(t, b, 31); tcg_gen_shl_i32(d, a, t); @@ -3369,7 +3369,7 @@ static void tcg_gen_shl_mod_i32(TCGv_i32 d, TCGv_i32 = a, TCGv_i32 b) =20 static void tcg_gen_shl_mod_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t, b, 63); tcg_gen_shl_i64(d, a, t); @@ -3423,7 +3423,7 @@ static void tcg_gen_shrv_mod_vec(unsigned vece, TCGv_= vec d, =20 static void tcg_gen_shr_mod_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andi_i32(t, b, 31); tcg_gen_shr_i32(d, a, t); @@ -3432,7 +3432,7 @@ static void tcg_gen_shr_mod_i32(TCGv_i32 d, TCGv_i32 = a, TCGv_i32 b) =20 static void tcg_gen_shr_mod_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t, b, 63); tcg_gen_shr_i64(d, a, t); @@ -3486,7 +3486,7 @@ static void tcg_gen_sarv_mod_vec(unsigned vece, TCGv_= vec d, =20 static void tcg_gen_sar_mod_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andi_i32(t, b, 31); tcg_gen_sar_i32(d, a, t); @@ -3495,7 +3495,7 @@ static void tcg_gen_sar_mod_i32(TCGv_i32 d, TCGv_i32 = a, TCGv_i32 b) =20 static void tcg_gen_sar_mod_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t, b, 63); tcg_gen_sar_i64(d, a, t); @@ -3549,7 +3549,7 @@ static void tcg_gen_rotlv_mod_vec(unsigned vece, TCGv= _vec d, =20 static void tcg_gen_rotl_mod_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andi_i32(t, b, 31); tcg_gen_rotl_i32(d, a, t); @@ -3558,7 +3558,7 @@ static void tcg_gen_rotl_mod_i32(TCGv_i32 d, TCGv_i32= a, TCGv_i32 b) =20 static void tcg_gen_rotl_mod_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t, b, 63); tcg_gen_rotl_i64(d, a, t); @@ -3608,7 +3608,7 @@ static void tcg_gen_rotrv_mod_vec(unsigned vece, TCGv= _vec d, =20 static void tcg_gen_rotr_mod_i32(TCGv_i32 d, TCGv_i32 a, TCGv_i32 b) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_andi_i32(t, b, 31); tcg_gen_rotr_i32(d, a, t); @@ -3617,7 +3617,7 @@ static void tcg_gen_rotr_mod_i32(TCGv_i32 d, TCGv_i32= a, TCGv_i32 b) =20 static void tcg_gen_rotr_mod_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_andi_i64(t, b, 63); tcg_gen_rotr_i64(d, a, t); @@ -3658,8 +3658,8 @@ void tcg_gen_gvec_rotrv(unsigned vece, uint32_t dofs,= uint32_t aofs, static void expand_cmp_i32(uint32_t dofs, uint32_t aofs, uint32_t bofs, uint32_t oprsz, TCGCond cond) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 4) { @@ -3676,8 +3676,8 @@ static void expand_cmp_i32(uint32_t dofs, uint32_t ao= fs, uint32_t bofs, static void expand_cmp_i64(uint32_t dofs, uint32_t aofs, uint32_t bofs, uint32_t oprsz, TCGCond cond) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 8) { @@ -3823,7 +3823,7 @@ void tcg_gen_gvec_cmp(TCGCond cond, unsigned vece, ui= nt32_t dofs, =20 static void tcg_gen_bitsel_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b, TCGv_i6= 4 c) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_and_i64(t, b, a); tcg_gen_andc_i64(d, c, a); diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index c581ae77c4..f2269a1b91 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -264,7 +264,7 @@ void tcg_gen_div_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_= i32 arg2) if (TCG_TARGET_HAS_div_i32) { tcg_gen_op3_i32(INDEX_op_div_i32, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div2_i32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_sari_i32(t0, arg1, 31); tcg_gen_op5_i32(INDEX_op_div2_i32, ret, t0, arg1, t0, arg2); tcg_temp_free_i32(t0); @@ -278,13 +278,13 @@ void tcg_gen_rem_i32(TCGv_i32 ret, TCGv_i32 arg1, TCG= v_i32 arg2) if (TCG_TARGET_HAS_rem_i32) { tcg_gen_op3_i32(INDEX_op_rem_i32, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div_i32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_op3_i32(INDEX_op_div_i32, t0, arg1, arg2); tcg_gen_mul_i32(t0, t0, arg2); tcg_gen_sub_i32(ret, arg1, t0); tcg_temp_free_i32(t0); } else if (TCG_TARGET_HAS_div2_i32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_sari_i32(t0, arg1, 31); tcg_gen_op5_i32(INDEX_op_div2_i32, t0, ret, arg1, t0, arg2); tcg_temp_free_i32(t0); @@ -298,7 +298,7 @@ void tcg_gen_divu_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv= _i32 arg2) if (TCG_TARGET_HAS_div_i32) { tcg_gen_op3_i32(INDEX_op_divu_i32, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div2_i32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_movi_i32(t0, 0); tcg_gen_op5_i32(INDEX_op_divu2_i32, ret, t0, arg1, t0, arg2); tcg_temp_free_i32(t0); @@ -312,13 +312,13 @@ void tcg_gen_remu_i32(TCGv_i32 ret, TCGv_i32 arg1, TC= Gv_i32 arg2) if (TCG_TARGET_HAS_rem_i32) { tcg_gen_op3_i32(INDEX_op_remu_i32, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div_i32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_op3_i32(INDEX_op_divu_i32, t0, arg1, arg2); tcg_gen_mul_i32(t0, t0, arg2); tcg_gen_sub_i32(ret, arg1, t0); tcg_temp_free_i32(t0); } else if (TCG_TARGET_HAS_div2_i32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_movi_i32(t0, 0); tcg_gen_op5_i32(INDEX_op_divu2_i32, t0, ret, arg1, t0, arg2); tcg_temp_free_i32(t0); @@ -332,7 +332,7 @@ void tcg_gen_andc_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv= _i32 arg2) if (TCG_TARGET_HAS_andc_i32) { tcg_gen_op3_i32(INDEX_op_andc_i32, ret, arg1, arg2); } else { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_not_i32(t0, arg2); tcg_gen_and_i32(ret, arg1, t0); tcg_temp_free_i32(t0); @@ -374,7 +374,7 @@ void tcg_gen_orc_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_= i32 arg2) if (TCG_TARGET_HAS_orc_i32) { tcg_gen_op3_i32(INDEX_op_orc_i32, ret, arg1, arg2); } else { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_not_i32(t0, arg2); tcg_gen_or_i32(ret, arg1, t0); tcg_temp_free_i32(t0); @@ -386,8 +386,8 @@ void tcg_gen_clz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_= i32 arg2) if (TCG_TARGET_HAS_clz_i32) { tcg_gen_op3_i32(INDEX_op_clz_i32, ret, arg1, arg2); } else if (TCG_TARGET_HAS_clz_i64) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(t1, arg1); tcg_gen_extu_i32_i64(t2, arg2); tcg_gen_addi_i64(t2, t2, 32); @@ -411,8 +411,8 @@ void tcg_gen_ctz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_= i32 arg2) if (TCG_TARGET_HAS_ctz_i32) { tcg_gen_op3_i32(INDEX_op_ctz_i32, ret, arg1, arg2); } else if (TCG_TARGET_HAS_ctz_i64) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(t1, arg1); tcg_gen_extu_i32_i64(t2, arg2); tcg_gen_ctz_i64(t1, t1, t2); @@ -423,7 +423,7 @@ void tcg_gen_ctz_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_= i32 arg2) || TCG_TARGET_HAS_ctpop_i64 || TCG_TARGET_HAS_clz_i32 || TCG_TARGET_HAS_clz_i64) { - TCGv_i32 z, t =3D tcg_temp_new_i32(); + TCGv_i32 z, t =3D tcg_temp_ebb_new_i32(); =20 if (TCG_TARGET_HAS_ctpop_i32 || TCG_TARGET_HAS_ctpop_i64) { tcg_gen_subi_i32(t, arg1, 1); @@ -448,7 +448,7 @@ void tcg_gen_ctzi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint= 32_t arg2) { if (!TCG_TARGET_HAS_ctz_i32 && TCG_TARGET_HAS_ctpop_i32 && arg2 =3D=3D= 32) { /* This equivalence has the advantage of not requiring a fixup. */ - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); tcg_gen_subi_i32(t, arg1, 1); tcg_gen_andc_i32(t, t, arg1); tcg_gen_ctpop_i32(ret, t); @@ -461,7 +461,7 @@ void tcg_gen_ctzi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint= 32_t arg2) void tcg_gen_clrsb_i32(TCGv_i32 ret, TCGv_i32 arg) { if (TCG_TARGET_HAS_clz_i32) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); tcg_gen_sari_i32(t, arg, 31); tcg_gen_xor_i32(t, t, arg); tcg_gen_clzi_i32(t, t, 32); @@ -477,7 +477,7 @@ void tcg_gen_ctpop_i32(TCGv_i32 ret, TCGv_i32 arg1) if (TCG_TARGET_HAS_ctpop_i32) { tcg_gen_op2_i32(INDEX_op_ctpop_i32, ret, arg1); } else if (TCG_TARGET_HAS_ctpop_i64) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(t, arg1); tcg_gen_ctpop_i64(t, t); tcg_gen_extrl_i64_i32(ret, t); @@ -494,8 +494,8 @@ void tcg_gen_rotl_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv= _i32 arg2) } else { TCGv_i32 t0, t1; =20 - t0 =3D tcg_temp_new_i32(); - t1 =3D tcg_temp_new_i32(); + t0 =3D tcg_temp_ebb_new_i32(); + t1 =3D tcg_temp_ebb_new_i32(); tcg_gen_shl_i32(t0, arg1, arg2); tcg_gen_subfi_i32(t1, 32, arg2); tcg_gen_shr_i32(t1, arg1, t1); @@ -515,8 +515,8 @@ void tcg_gen_rotli_i32(TCGv_i32 ret, TCGv_i32 arg1, int= 32_t arg2) tcg_gen_rotl_i32(ret, arg1, tcg_constant_i32(arg2)); } else { TCGv_i32 t0, t1; - t0 =3D tcg_temp_new_i32(); - t1 =3D tcg_temp_new_i32(); + t0 =3D tcg_temp_ebb_new_i32(); + t1 =3D tcg_temp_ebb_new_i32(); tcg_gen_shli_i32(t0, arg1, arg2); tcg_gen_shri_i32(t1, arg1, 32 - arg2); tcg_gen_or_i32(ret, t0, t1); @@ -532,8 +532,8 @@ void tcg_gen_rotr_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv= _i32 arg2) } else { TCGv_i32 t0, t1; =20 - t0 =3D tcg_temp_new_i32(); - t1 =3D tcg_temp_new_i32(); + t0 =3D tcg_temp_ebb_new_i32(); + t1 =3D tcg_temp_ebb_new_i32(); tcg_gen_shr_i32(t0, arg1, arg2); tcg_gen_subfi_i32(t1, 32, arg2); tcg_gen_shl_i32(t1, arg1, t1); @@ -574,7 +574,7 @@ void tcg_gen_deposit_i32(TCGv_i32 ret, TCGv_i32 arg1, T= CGv_i32 arg2, return; } =20 - t1 =3D tcg_temp_new_i32(); + t1 =3D tcg_temp_ebb_new_i32(); =20 if (TCG_TARGET_HAS_extract2_i32) { if (ofs + len =3D=3D 32) { @@ -801,7 +801,7 @@ void tcg_gen_extract2_i32(TCGv_i32 ret, TCGv_i32 al, TC= Gv_i32 ah, } else if (TCG_TARGET_HAS_extract2_i32) { tcg_gen_op4i_i32(INDEX_op_extract2_i32, ret, al, ah, ofs); } else { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_shri_i32(t0, al, ofs); tcg_gen_deposit_i32(ret, t0, ah, 32 - ofs, ofs); tcg_temp_free_i32(t0); @@ -818,8 +818,8 @@ void tcg_gen_movcond_i32(TCGCond cond, TCGv_i32 ret, TC= Gv_i32 c1, } else if (TCG_TARGET_HAS_movcond_i32) { tcg_gen_op6i_i32(INDEX_op_movcond_i32, ret, c1, c2, v1, v2, cond); } else { - TCGv_i32 t0 =3D tcg_temp_new_i32(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); tcg_gen_setcond_i32(cond, t0, c1, c2); tcg_gen_neg_i32(t0, t0); tcg_gen_and_i32(t1, v1, t0); @@ -836,8 +836,8 @@ void tcg_gen_add2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i3= 2 al, if (TCG_TARGET_HAS_add2_i32) { tcg_gen_op6_i32(INDEX_op_add2_i32, rl, rh, al, ah, bl, bh); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_concat_i32_i64(t0, al, ah); tcg_gen_concat_i32_i64(t1, bl, bh); tcg_gen_add_i64(t0, t0, t1); @@ -853,8 +853,8 @@ void tcg_gen_sub2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i3= 2 al, if (TCG_TARGET_HAS_sub2_i32) { tcg_gen_op6_i32(INDEX_op_sub2_i32, rl, rh, al, ah, bl, bh); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_concat_i32_i64(t0, al, ah); tcg_gen_concat_i32_i64(t1, bl, bh); tcg_gen_sub_i64(t0, t0, t1); @@ -869,14 +869,14 @@ void tcg_gen_mulu2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv= _i32 arg1, TCGv_i32 arg2) if (TCG_TARGET_HAS_mulu2_i32) { tcg_gen_op4_i32(INDEX_op_mulu2_i32, rl, rh, arg1, arg2); } else if (TCG_TARGET_HAS_muluh_i32) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); tcg_gen_op3_i32(INDEX_op_mul_i32, t, arg1, arg2); tcg_gen_op3_i32(INDEX_op_muluh_i32, rh, arg1, arg2); tcg_gen_mov_i32(rl, t); tcg_temp_free_i32(t); } else if (TCG_TARGET_REG_BITS =3D=3D 64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(t0, arg1); tcg_gen_extu_i32_i64(t1, arg2); tcg_gen_mul_i64(t0, t0, t1); @@ -893,16 +893,16 @@ void tcg_gen_muls2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv= _i32 arg1, TCGv_i32 arg2) if (TCG_TARGET_HAS_muls2_i32) { tcg_gen_op4_i32(INDEX_op_muls2_i32, rl, rh, arg1, arg2); } else if (TCG_TARGET_HAS_mulsh_i32) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); tcg_gen_op3_i32(INDEX_op_mul_i32, t, arg1, arg2); tcg_gen_op3_i32(INDEX_op_mulsh_i32, rh, arg1, arg2); tcg_gen_mov_i32(rl, t); tcg_temp_free_i32(t); } else if (TCG_TARGET_REG_BITS =3D=3D 32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); - TCGv_i32 t3 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t3 =3D tcg_temp_ebb_new_i32(); tcg_gen_mulu2_i32(t0, t1, arg1, arg2); /* Adjust for negative inputs. */ tcg_gen_sari_i32(t2, arg1, 31); @@ -917,8 +917,8 @@ void tcg_gen_muls2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i= 32 arg1, TCGv_i32 arg2) tcg_temp_free_i32(t2); tcg_temp_free_i32(t3); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_ext_i32_i64(t0, arg1); tcg_gen_ext_i32_i64(t1, arg2); tcg_gen_mul_i64(t0, t0, t1); @@ -931,9 +931,9 @@ void tcg_gen_muls2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i= 32 arg1, TCGv_i32 arg2) void tcg_gen_mulsu2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i32 arg1, TCGv_i32 = arg2) { if (TCG_TARGET_REG_BITS =3D=3D 32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); tcg_gen_mulu2_i32(t0, t1, arg1, arg2); /* Adjust for negative input for the signed arg1. */ tcg_gen_sari_i32(t2, arg1, 31); @@ -944,8 +944,8 @@ void tcg_gen_mulsu2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_= i32 arg1, TCGv_i32 arg2) tcg_temp_free_i32(t1); tcg_temp_free_i32(t2); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_ext_i32_i64(t0, arg1); tcg_gen_extu_i32_i64(t1, arg2); tcg_gen_mul_i64(t0, t0, t1); @@ -1001,8 +1001,8 @@ void tcg_gen_bswap16_i32(TCGv_i32 ret, TCGv_i32 arg, = int flags) if (TCG_TARGET_HAS_bswap16_i32) { tcg_gen_op3i_i32(INDEX_op_bswap16_i32, ret, arg, flags); } else { - TCGv_i32 t0 =3D tcg_temp_new_i32(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_shri_i32(t0, arg, 8); if (!(flags & TCG_BSWAP_IZ)) { @@ -1030,8 +1030,8 @@ void tcg_gen_bswap32_i32(TCGv_i32 ret, TCGv_i32 arg) if (TCG_TARGET_HAS_bswap32_i32) { tcg_gen_op3i_i32(INDEX_op_bswap32_i32, ret, arg, 0); } else { - TCGv_i32 t0 =3D tcg_temp_new_i32(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); TCGv_i32 t2 =3D tcg_constant_i32(0x00ff00ff); =20 /* arg =3D abcd */ @@ -1078,7 +1078,7 @@ void tcg_gen_umax_i32(TCGv_i32 ret, TCGv_i32 a, TCGv_= i32 b) =20 void tcg_gen_abs_i32(TCGv_i32 ret, TCGv_i32 a) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_sari_i32(t, a, 31); tcg_gen_xor_i32(ret, a, t); @@ -1241,8 +1241,8 @@ void tcg_gen_mul_i64(TCGv_i64 ret, TCGv_i64 arg1, TCG= v_i64 arg2) TCGv_i64 t0; TCGv_i32 t1; =20 - t0 =3D tcg_temp_new_i64(); - t1 =3D tcg_temp_new_i32(); + t0 =3D tcg_temp_ebb_new_i64(); + t1 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_mulu2_i32(TCGV_LOW(t0), TCGV_HIGH(t0), TCGV_LOW(arg1), TCGV_LOW(arg2)); @@ -1423,7 +1423,7 @@ static inline void tcg_gen_shifti_i64(TCGv_i64 ret, T= CGv_i64 arg1, tcg_gen_extract2_i32(TCGV_HIGH(ret), TCGV_LOW(arg1), TCGV_HIGH(arg1), 32 - c); } else { - TCGv_i32 t0 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); tcg_gen_shri_i32(t0, TCGV_LOW(arg1), 32 - c); tcg_gen_deposit_i32(TCGV_HIGH(ret), t0, TCGV_HIGH(arg1), c, 32 - c); @@ -1557,7 +1557,7 @@ void tcg_gen_div_i64(TCGv_i64 ret, TCGv_i64 arg1, TCG= v_i64 arg2) if (TCG_TARGET_HAS_div_i64) { tcg_gen_op3_i64(INDEX_op_div_i64, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div2_i64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_sari_i64(t0, arg1, 63); tcg_gen_op5_i64(INDEX_op_div2_i64, ret, t0, arg1, t0, arg2); tcg_temp_free_i64(t0); @@ -1571,13 +1571,13 @@ void tcg_gen_rem_i64(TCGv_i64 ret, TCGv_i64 arg1, T= CGv_i64 arg2) if (TCG_TARGET_HAS_rem_i64) { tcg_gen_op3_i64(INDEX_op_rem_i64, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div_i64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_op3_i64(INDEX_op_div_i64, t0, arg1, arg2); tcg_gen_mul_i64(t0, t0, arg2); tcg_gen_sub_i64(ret, arg1, t0); tcg_temp_free_i64(t0); } else if (TCG_TARGET_HAS_div2_i64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_sari_i64(t0, arg1, 63); tcg_gen_op5_i64(INDEX_op_div2_i64, t0, ret, arg1, t0, arg2); tcg_temp_free_i64(t0); @@ -1591,7 +1591,7 @@ void tcg_gen_divu_i64(TCGv_i64 ret, TCGv_i64 arg1, TC= Gv_i64 arg2) if (TCG_TARGET_HAS_div_i64) { tcg_gen_op3_i64(INDEX_op_divu_i64, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div2_i64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_movi_i64(t0, 0); tcg_gen_op5_i64(INDEX_op_divu2_i64, ret, t0, arg1, t0, arg2); tcg_temp_free_i64(t0); @@ -1605,13 +1605,13 @@ void tcg_gen_remu_i64(TCGv_i64 ret, TCGv_i64 arg1, = TCGv_i64 arg2) if (TCG_TARGET_HAS_rem_i64) { tcg_gen_op3_i64(INDEX_op_remu_i64, ret, arg1, arg2); } else if (TCG_TARGET_HAS_div_i64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_op3_i64(INDEX_op_divu_i64, t0, arg1, arg2); tcg_gen_mul_i64(t0, t0, arg2); tcg_gen_sub_i64(ret, arg1, t0); tcg_temp_free_i64(t0); } else if (TCG_TARGET_HAS_div2_i64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_movi_i64(t0, 0); tcg_gen_op5_i64(INDEX_op_divu2_i64, t0, ret, arg1, t0, arg2); tcg_temp_free_i64(t0); @@ -1710,8 +1710,8 @@ void tcg_gen_bswap16_i64(TCGv_i64 ret, TCGv_i64 arg, = int flags) } else if (TCG_TARGET_HAS_bswap16_i64) { tcg_gen_op3i_i64(INDEX_op_bswap16_i64, ret, arg, flags); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_shri_i64(t0, arg, 8); if (!(flags & TCG_BSWAP_IZ)) { @@ -1749,8 +1749,8 @@ void tcg_gen_bswap32_i64(TCGv_i64 ret, TCGv_i64 arg, = int flags) } else if (TCG_TARGET_HAS_bswap32_i64) { tcg_gen_op3i_i64(INDEX_op_bswap32_i64, ret, arg, flags); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); TCGv_i64 t2 =3D tcg_constant_i64(0x00ff00ff); =20 /* arg =3D xxxxabcd */ @@ -1778,8 +1778,8 @@ void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg) { if (TCG_TARGET_REG_BITS =3D=3D 32) { TCGv_i32 t0, t1; - t0 =3D tcg_temp_new_i32(); - t1 =3D tcg_temp_new_i32(); + t0 =3D tcg_temp_ebb_new_i32(); + t1 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_bswap32_i32(t0, TCGV_LOW(arg)); tcg_gen_bswap32_i32(t1, TCGV_HIGH(arg)); @@ -1790,9 +1790,9 @@ void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg) } else if (TCG_TARGET_HAS_bswap64_i64) { tcg_gen_op3i_i64(INDEX_op_bswap64_i64, ret, arg, 0); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); =20 /* arg =3D abcdefgh */ tcg_gen_movi_i64(t2, 0x00ff00ff00ff00ffull); @@ -1822,8 +1822,8 @@ void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg) void tcg_gen_hswap_i64(TCGv_i64 ret, TCGv_i64 arg) { uint64_t m =3D 0x0000ffff0000ffffull; - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); =20 /* See include/qemu/bitops.h, hswap64. */ tcg_gen_rotli_i64(t1, arg, 32); @@ -1863,7 +1863,7 @@ void tcg_gen_andc_i64(TCGv_i64 ret, TCGv_i64 arg1, TC= Gv_i64 arg2) } else if (TCG_TARGET_HAS_andc_i64) { tcg_gen_op3_i64(INDEX_op_andc_i64, ret, arg1, arg2); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_not_i64(t0, arg2); tcg_gen_and_i64(ret, arg1, t0); tcg_temp_free_i64(t0); @@ -1917,7 +1917,7 @@ void tcg_gen_orc_i64(TCGv_i64 ret, TCGv_i64 arg1, TCG= v_i64 arg2) } else if (TCG_TARGET_HAS_orc_i64) { tcg_gen_op3_i64(INDEX_op_orc_i64, ret, arg1, arg2); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_not_i64(t0, arg2); tcg_gen_or_i64(ret, arg1, t0); tcg_temp_free_i64(t0); @@ -1938,7 +1938,7 @@ void tcg_gen_clzi_i64(TCGv_i64 ret, TCGv_i64 arg1, ui= nt64_t arg2) if (TCG_TARGET_REG_BITS =3D=3D 32 && TCG_TARGET_HAS_clz_i32 && arg2 <=3D 0xffffffffu) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); tcg_gen_clzi_i32(t, TCGV_LOW(arg1), arg2 - 32); tcg_gen_addi_i32(t, t, 32); tcg_gen_clz_i32(TCGV_LOW(ret), TCGV_HIGH(arg1), t); @@ -1956,7 +1956,7 @@ void tcg_gen_ctz_i64(TCGv_i64 ret, TCGv_i64 arg1, TCG= v_i64 arg2) if (TCG_TARGET_HAS_ctz_i64) { tcg_gen_op3_i64(INDEX_op_ctz_i64, ret, arg1, arg2); } else if (TCG_TARGET_HAS_ctpop_i64 || TCG_TARGET_HAS_clz_i64) { - TCGv_i64 z, t =3D tcg_temp_new_i64(); + TCGv_i64 z, t =3D tcg_temp_ebb_new_i64(); =20 if (TCG_TARGET_HAS_ctpop_i64) { tcg_gen_subi_i64(t, arg1, 1); @@ -1983,7 +1983,7 @@ void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, ui= nt64_t arg2) if (TCG_TARGET_REG_BITS =3D=3D 32 && TCG_TARGET_HAS_ctz_i32 && arg2 <=3D 0xffffffffu) { - TCGv_i32 t32 =3D tcg_temp_new_i32(); + TCGv_i32 t32 =3D tcg_temp_ebb_new_i32(); tcg_gen_ctzi_i32(t32, TCGV_HIGH(arg1), arg2 - 32); tcg_gen_addi_i32(t32, t32, 32); tcg_gen_ctz_i32(TCGV_LOW(ret), TCGV_LOW(arg1), t32); @@ -1993,7 +1993,7 @@ void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, ui= nt64_t arg2) && TCG_TARGET_HAS_ctpop_i64 && arg2 =3D=3D 64) { /* This equivalence has the advantage of not requiring a fixup. */ - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); tcg_gen_subi_i64(t, arg1, 1); tcg_gen_andc_i64(t, t, arg1); tcg_gen_ctpop_i64(ret, t); @@ -2008,7 +2008,7 @@ void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, ui= nt64_t arg2) void tcg_gen_clrsb_i64(TCGv_i64 ret, TCGv_i64 arg) { if (TCG_TARGET_HAS_clz_i64 || TCG_TARGET_HAS_clz_i32) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); tcg_gen_sari_i64(t, arg, 63); tcg_gen_xor_i64(t, t, arg); tcg_gen_clzi_i64(t, t, 64); @@ -2039,8 +2039,8 @@ void tcg_gen_rotl_i64(TCGv_i64 ret, TCGv_i64 arg1, TC= Gv_i64 arg2) tcg_gen_op3_i64(INDEX_op_rotl_i64, ret, arg1, arg2); } else { TCGv_i64 t0, t1; - t0 =3D tcg_temp_new_i64(); - t1 =3D tcg_temp_new_i64(); + t0 =3D tcg_temp_ebb_new_i64(); + t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_shl_i64(t0, arg1, arg2); tcg_gen_subfi_i64(t1, 64, arg2); tcg_gen_shr_i64(t1, arg1, t1); @@ -2060,8 +2060,8 @@ void tcg_gen_rotli_i64(TCGv_i64 ret, TCGv_i64 arg1, i= nt64_t arg2) tcg_gen_rotl_i64(ret, arg1, tcg_constant_i64(arg2)); } else { TCGv_i64 t0, t1; - t0 =3D tcg_temp_new_i64(); - t1 =3D tcg_temp_new_i64(); + t0 =3D tcg_temp_ebb_new_i64(); + t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_shli_i64(t0, arg1, arg2); tcg_gen_shri_i64(t1, arg1, 64 - arg2); tcg_gen_or_i64(ret, t0, t1); @@ -2076,8 +2076,8 @@ void tcg_gen_rotr_i64(TCGv_i64 ret, TCGv_i64 arg1, TC= Gv_i64 arg2) tcg_gen_op3_i64(INDEX_op_rotr_i64, ret, arg1, arg2); } else { TCGv_i64 t0, t1; - t0 =3D tcg_temp_new_i64(); - t1 =3D tcg_temp_new_i64(); + t0 =3D tcg_temp_ebb_new_i64(); + t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_shr_i64(t0, arg1, arg2); tcg_gen_subfi_i64(t1, 64, arg2); tcg_gen_shl_i64(t1, arg1, t1); @@ -2133,7 +2133,7 @@ void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1,= TCGv_i64 arg2, } } =20 - t1 =3D tcg_temp_new_i64(); + t1 =3D tcg_temp_ebb_new_i64(); =20 if (TCG_TARGET_HAS_extract2_i64) { if (ofs + len =3D=3D 64) { @@ -2365,7 +2365,7 @@ void tcg_gen_sextract_i64(TCGv_i64 ret, TCGv_i64 arg, tcg_gen_sextract_i32(TCGV_HIGH(ret), TCGV_HIGH(arg), 0, len - = 32); return; } else if (len > 32) { - TCGv_i32 t =3D tcg_temp_new_i32(); + TCGv_i32 t =3D tcg_temp_ebb_new_i32(); /* Extract the bits for the high word normally. */ tcg_gen_sextract_i32(t, TCGV_HIGH(arg), ofs + 32, len - 32); /* Shift the field down for the low part. */ @@ -2460,7 +2460,7 @@ void tcg_gen_extract2_i64(TCGv_i64 ret, TCGv_i64 al, = TCGv_i64 ah, } else if (TCG_TARGET_HAS_extract2_i64) { tcg_gen_op4i_i64(INDEX_op_extract2_i64, ret, al, ah, ofs); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_shri_i64(t0, al, ofs); tcg_gen_deposit_i64(ret, t0, ah, 64 - ofs, ofs); tcg_temp_free_i64(t0); @@ -2475,8 +2475,8 @@ void tcg_gen_movcond_i64(TCGCond cond, TCGv_i64 ret, = TCGv_i64 c1, } else if (cond =3D=3D TCG_COND_NEVER) { tcg_gen_mov_i64(ret, v2); } else if (TCG_TARGET_REG_BITS =3D=3D 32) { - TCGv_i32 t0 =3D tcg_temp_new_i32(); - TCGv_i32 t1 =3D tcg_temp_new_i32(); + TCGv_i32 t0 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); tcg_gen_op6i_i32(INDEX_op_setcond2_i32, t0, TCGV_LOW(c1), TCGV_HIGH(c1), TCGV_LOW(c2), TCGV_HIGH(c2), cond); @@ -2503,8 +2503,8 @@ void tcg_gen_movcond_i64(TCGCond cond, TCGv_i64 ret, = TCGv_i64 c1, } else if (TCG_TARGET_HAS_movcond_i64) { tcg_gen_op6i_i64(INDEX_op_movcond_i64, ret, c1, c2, v1, v2, cond); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_setcond_i64(cond, t0, c1, c2); tcg_gen_neg_i64(t0, t0); tcg_gen_and_i64(t1, v1, t0); @@ -2521,8 +2521,8 @@ void tcg_gen_add2_i64(TCGv_i64 rl, TCGv_i64 rh, TCGv_= i64 al, if (TCG_TARGET_HAS_add2_i64) { tcg_gen_op6_i64(INDEX_op_add2_i64, rl, rh, al, ah, bl, bh); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_add_i64(t0, al, bl); tcg_gen_setcond_i64(TCG_COND_LTU, t1, t0, al); tcg_gen_add_i64(rh, ah, bh); @@ -2539,8 +2539,8 @@ void tcg_gen_sub2_i64(TCGv_i64 rl, TCGv_i64 rh, TCGv_= i64 al, if (TCG_TARGET_HAS_sub2_i64) { tcg_gen_op6_i64(INDEX_op_sub2_i64, rl, rh, al, ah, bl, bh); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); tcg_gen_sub_i64(t0, al, bl); tcg_gen_setcond_i64(TCG_COND_LTU, t1, al, bl); tcg_gen_sub_i64(rh, ah, bh); @@ -2556,13 +2556,13 @@ void tcg_gen_mulu2_i64(TCGv_i64 rl, TCGv_i64 rh, TC= Gv_i64 arg1, TCGv_i64 arg2) if (TCG_TARGET_HAS_mulu2_i64) { tcg_gen_op4_i64(INDEX_op_mulu2_i64, rl, rh, arg1, arg2); } else if (TCG_TARGET_HAS_muluh_i64) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); tcg_gen_op3_i64(INDEX_op_mul_i64, t, arg1, arg2); tcg_gen_op3_i64(INDEX_op_muluh_i64, rh, arg1, arg2); tcg_gen_mov_i64(rl, t); tcg_temp_free_i64(t); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_mul_i64(t0, arg1, arg2); gen_helper_muluh_i64(rh, arg1, arg2); tcg_gen_mov_i64(rl, t0); @@ -2575,16 +2575,16 @@ void tcg_gen_muls2_i64(TCGv_i64 rl, TCGv_i64 rh, TC= Gv_i64 arg1, TCGv_i64 arg2) if (TCG_TARGET_HAS_muls2_i64) { tcg_gen_op4_i64(INDEX_op_muls2_i64, rl, rh, arg1, arg2); } else if (TCG_TARGET_HAS_mulsh_i64) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); tcg_gen_op3_i64(INDEX_op_mul_i64, t, arg1, arg2); tcg_gen_op3_i64(INDEX_op_mulsh_i64, rh, arg1, arg2); tcg_gen_mov_i64(rl, t); tcg_temp_free_i64(t); } else if (TCG_TARGET_HAS_mulu2_i64 || TCG_TARGET_HAS_muluh_i64) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); - TCGv_i64 t3 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t3 =3D tcg_temp_ebb_new_i64(); tcg_gen_mulu2_i64(t0, t1, arg1, arg2); /* Adjust for negative inputs. */ tcg_gen_sari_i64(t2, arg1, 63); @@ -2599,7 +2599,7 @@ void tcg_gen_muls2_i64(TCGv_i64 rl, TCGv_i64 rh, TCGv= _i64 arg1, TCGv_i64 arg2) tcg_temp_free_i64(t2); tcg_temp_free_i64(t3); } else { - TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); tcg_gen_mul_i64(t0, arg1, arg2); gen_helper_mulsh_i64(rh, arg1, arg2); tcg_gen_mov_i64(rl, t0); @@ -2609,9 +2609,9 @@ void tcg_gen_muls2_i64(TCGv_i64 rl, TCGv_i64 rh, TCGv= _i64 arg1, TCGv_i64 arg2) =20 void tcg_gen_mulsu2_i64(TCGv_i64 rl, TCGv_i64 rh, TCGv_i64 arg1, TCGv_i64 = arg2) { - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); tcg_gen_mulu2_i64(t0, t1, arg1, arg2); /* Adjust for negative input for the signed arg1. */ tcg_gen_sari_i64(t2, arg1, 63); @@ -2645,7 +2645,7 @@ void tcg_gen_umax_i64(TCGv_i64 ret, TCGv_i64 a, TCGv_= i64 b) =20 void tcg_gen_abs_i64(TCGv_i64 ret, TCGv_i64 a) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_sari_i64(t, a, 63); tcg_gen_xor_i64(ret, a, t); @@ -2675,7 +2675,7 @@ void tcg_gen_extrh_i64_i32(TCGv_i32 ret, TCGv_i64 arg) tcg_gen_op2(INDEX_op_extrh_i64_i32, tcgv_i32_arg(ret), tcgv_i64_arg(arg)); } else { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); tcg_gen_shri_i64(t, arg, 32); tcg_gen_mov_i32(ret, (TCGv_i32)t); tcg_temp_free_i64(t); @@ -2714,7 +2714,7 @@ void tcg_gen_concat_i32_i64(TCGv_i64 dest, TCGv_i32 l= ow, TCGv_i32 high) return; } =20 - tmp =3D tcg_temp_new_i64(); + tmp =3D tcg_temp_ebb_new_i64(); /* These extensions are only needed for type correctness. We may be able to do better given target specific information. */ tcg_gen_extu_i32_i64(tmp, high); @@ -2826,7 +2826,7 @@ void tcg_gen_lookup_and_goto_ptr(void) } =20 plugin_gen_disable_mem_helpers(); - ptr =3D tcg_temp_new_ptr(); + ptr =3D tcg_temp_ebb_new_ptr(); gen_helper_lookup_tb_ptr(ptr, cpu_env); tcg_gen_op1i(INDEX_op_goto_ptr, tcgv_ptr_arg(ptr)); tcg_temp_free_ptr(ptr); @@ -2987,7 +2987,7 @@ void tcg_gen_qemu_st_i32(TCGv_i32 val, TCGv addr, TCG= Arg idx, MemOp memop) oi =3D make_memop_idx(memop, idx); =20 if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) { - swap =3D tcg_temp_new_i32(); + swap =3D tcg_temp_ebb_new_i32(); switch (memop & MO_SIZE) { case MO_16: tcg_gen_bswap16_i32(swap, val, 0); @@ -3082,7 +3082,7 @@ void tcg_gen_qemu_st_i64(TCGv_i64 val, TCGv addr, TCG= Arg idx, MemOp memop) oi =3D make_memop_idx(memop, idx); =20 if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) { - swap =3D tcg_temp_new_i64(); + swap =3D tcg_temp_ebb_new_i64(); switch (memop & MO_SIZE) { case MO_16: tcg_gen_bswap16_i64(swap, val, 0); @@ -3224,7 +3224,7 @@ void tcg_gen_qemu_st_i128(TCGv_i128 val, TCGv addr, T= CGArg idx, MemOp memop) =20 addr_p8 =3D tcg_temp_new(); if ((mop[0] ^ memop) & MO_BSWAP) { - TCGv_i64 t =3D tcg_temp_new_i64(); + TCGv_i64 t =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_bswap64_i64(t, x); gen_ldst_i64(INDEX_op_qemu_st_i64, t, addr, mop[0], idx); @@ -3328,8 +3328,8 @@ static void * const table_cmpxchg[(MO_SIZE | MO_BSWAP= ) + 1] =3D { void tcg_gen_nonatomic_cmpxchg_i32(TCGv_i32 retv, TCGv addr, TCGv_i32 cmpv, TCGv_i32 newv, TCGArg idx, MemOp memop) { - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_ext_i32(t2, cmpv, memop & MO_SIZE); =20 @@ -3385,8 +3385,8 @@ void tcg_gen_nonatomic_cmpxchg_i64(TCGv_i64 retv, TCG= v addr, TCGv_i64 cmpv, return; } =20 - t1 =3D tcg_temp_new_i64(); - t2 =3D tcg_temp_new_i64(); + t1 =3D tcg_temp_ebb_new_i64(); + t2 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_ext_i64(t2, cmpv, memop & MO_SIZE); =20 @@ -3442,9 +3442,9 @@ void tcg_gen_atomic_cmpxchg_i64(TCGv_i64 retv, TCGv a= ddr, TCGv_i64 cmpv, tcg_gen_movi_i32(TCGV_HIGH(retv), 0); } } else { - TCGv_i32 c32 =3D tcg_temp_new_i32(); - TCGv_i32 n32 =3D tcg_temp_new_i32(); - TCGv_i32 r32 =3D tcg_temp_new_i32(); + TCGv_i32 c32 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 n32 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 r32 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_extrl_i64_i32(c32, cmpv); tcg_gen_extrl_i64_i32(n32, newv); @@ -3476,10 +3476,10 @@ void tcg_gen_nonatomic_cmpxchg_i128(TCGv_i128 retv,= TCGv addr, TCGv_i128 cmpv, =20 gen(retv, cpu_env, addr, cmpv, newv, tcg_constant_i32(oi)); } else { - TCGv_i128 oldv =3D tcg_temp_new_i128(); - TCGv_i128 tmpv =3D tcg_temp_new_i128(); - TCGv_i64 t0 =3D tcg_temp_new_i64(); - TCGv_i64 t1 =3D tcg_temp_new_i64(); + TCGv_i128 oldv =3D tcg_temp_ebb_new_i128(); + TCGv_i128 tmpv =3D tcg_temp_ebb_new_i128(); + TCGv_i64 t0 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); TCGv_i64 z =3D tcg_constant_i64(0); =20 tcg_gen_qemu_ld_i128(oldv, addr, idx, memop); @@ -3541,8 +3541,8 @@ static void do_nonatomic_op_i32(TCGv_i32 ret, TCGv ad= dr, TCGv_i32 val, TCGArg idx, MemOp memop, bool new_val, void (*gen)(TCGv_i32, TCGv_i32, TCGv_i32)) { - TCGv_i32 t1 =3D tcg_temp_new_i32(); - TCGv_i32 t2 =3D tcg_temp_new_i32(); + TCGv_i32 t1 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 t2 =3D tcg_temp_ebb_new_i32(); =20 memop =3D tcg_canonicalize_memop(memop, 0, 0); =20 @@ -3579,8 +3579,8 @@ static void do_nonatomic_op_i64(TCGv_i64 ret, TCGv ad= dr, TCGv_i64 val, TCGArg idx, MemOp memop, bool new_val, void (*gen)(TCGv_i64, TCGv_i64, TCGv_i64)) { - TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 t2 =3D tcg_temp_new_i64(); + TCGv_i64 t1 =3D tcg_temp_ebb_new_i64(); + TCGv_i64 t2 =3D tcg_temp_ebb_new_i64(); =20 memop =3D tcg_canonicalize_memop(memop, 1, 0); =20 @@ -3616,8 +3616,8 @@ static void do_atomic_op_i64(TCGv_i64 ret, TCGv addr,= TCGv_i64 val, tcg_gen_movi_i64(ret, 0); #endif /* CONFIG_ATOMIC64 */ } else { - TCGv_i32 v32 =3D tcg_temp_new_i32(); - TCGv_i32 r32 =3D tcg_temp_new_i32(); + TCGv_i32 v32 =3D tcg_temp_ebb_new_i32(); + TCGv_i32 r32 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_extrl_i64_i32(v32, val); do_atomic_op_i32(r32, addr, v32, idx, memop & ~MO_SIGN, table); diff --git a/tcg/tcg.c b/tcg/tcg.c index e09ef46b85..437fea2f3c 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1865,7 +1865,7 @@ void tcg_gen_callN(void *func, TCGTemp *ret, int narg= s, TCGTemp **args) case TCG_CALL_ARG_EXTEND_U: case TCG_CALL_ARG_EXTEND_S: { - TCGv_i64 temp =3D tcg_temp_new_i64(); + TCGv_i64 temp =3D tcg_temp_ebb_new_i64(); TCGv_i32 orig =3D temp_tcgv_i32(ts); =20 if (loc->kind =3D=3D TCG_CALL_ARG_EXTEND_S) { --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476519; cv=none; d=zohomail.com; s=zohoarc; b=ZC8E2ZliaJWzMsKFLPP+mIlDc6BZKVghPmZ6NaEp3xzt+nwgTFAK8zOrnAeZ0C84EpvZXan+Azwp96aP4JcEhYeKQLmvAHFGDwAt5elUmV0uUtG2/nXgLX2Bw3xJrg9XIC9N8fxRTIY8TCUZmxGiN8oU2/AoRxqDFSFmqV33E8k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476519; 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=f/E/huyIJ3zeG9oegc0VTE3ehSZZRH0MHyaySm9JZ4U=; b=cCBkfHb+1KJcga614AVhWkIg2qwgc1tiNpLuihURj6oADANmVkftE4I5STbI7Q6/qwrBwHzd8y/Dt77DiZpzlSFPYTv4X8H+YoPT5PZ1XNCaUSl3cH1mQRDnsb2HKeDBrwYgvVtJre5iod06Tv8crEVK+SQtJPDsK/mkAtS4TXQ= 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+importer2=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 1677476519093169.1564665411413; Sun, 26 Feb 2023 21:41:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWE3-00076I-83; Mon, 27 Feb 2023 00:39:03 -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 1pWWD0-0003Mh-2a for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:08 -0500 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCs-0002mT-BD for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:54 -0500 Received: by mail-pj1-x102c.google.com with SMTP id m3-20020a17090ade0300b00229eec90a7fso10984577pjv.0 for ; Sun, 26 Feb 2023 21:37:46 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=f/E/huyIJ3zeG9oegc0VTE3ehSZZRH0MHyaySm9JZ4U=; b=wfIXVdcy70d50AJvoNeSZkD9nTBY/dvJA88SYIzmDOM2uLGHP7GqSrhDIXSe1SOmmY gLj/IyWC3Y7K1zjzHWUKAiFTuwUdD/6YOrf2wgCQf8gyEH9nTLgGWL85P/eOcYB6Ganm BYZp9d+MEelf7muHrlG9acUwCuHT9QMPKzaKtl35W9Tiz1CHmwqND9DCeXCyhNGk3LuJ u8jsqzq1M+RCHG9eIvkQB/fwXHcbYuCZM+4LV8Jov+8/g9RpBE/PNMP2Tk+a6DapVmJX IJkVgge+DvtSX6vOKoSOCR3dsberg7lsTmm0zzE2f5WA3gQ7CwUOu4pTHT4EMsfPZqw6 msYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=f/E/huyIJ3zeG9oegc0VTE3ehSZZRH0MHyaySm9JZ4U=; b=Akud9449h0E/PmRYSbgCvpaoPqso2h3ndrpE/umJv8c1lVwSSjNFE6Tm8i7bwoZIUl 4NssjGdbQHSDEnTMzxFPhhusWj2Peh8A+lzBP6HdO7bZh8C9xeAEf/AxMB9rkiTrPjZ7 xXAsacXfWw/lEUYGbiSrt0v5B2cqqza2Z9SE1pDzw1fwLNrlyTUPGGQOfvrmRFGHY/Qg EKYyx0JM/DwEAGD8UsAe9qZ93aY20fMAswfvfGBUjzTxqLRQPwgR2SCxFhtmSKOog3rA o7N/H1uGo2ltoqJC6Lqg50oRfLa9FRt1wwy+0ptpPtzIpK2NL9sDut9G9sQwM9MAnG1W Oj4g== X-Gm-Message-State: AO0yUKUaqwhTWrfA7LrqttSGp3ALqqQfek+sX7ykJGzmZpVRVq8oEi8s KiOOrYAlxZpwV+D4LzDl3JJQqadmPjEniXron4k= X-Google-Smtp-Source: AK7set+kpkmxA0osiwdIDlw0w/FzQbHMVhqfqOJN9VyqIq1g9Ok2W8MsIld4Kg401CygbGN14U8Ofg== X-Received: by 2002:a05:6a20:6987:b0:cc:1f10:1130 with SMTP id t7-20020a056a20698700b000cc1f101130mr17192427pzk.62.1677476265102; Sun, 26 Feb 2023 21:37:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PATCH v4 14/31] tcg: Use tcg_constant_ptr in do_dup Date: Sun, 26 Feb 2023 19:36:44 -1000 Message-Id: <20230227053701.368744-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476520500100003 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index a10d406bba..877b0b659b 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@ -630,7 +630,7 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32= _t oprsz, * stores through to memset. */ if (oprsz =3D=3D maxsz && vece =3D=3D MO_8) { - TCGv_ptr t_size =3D tcg_const_ptr(oprsz); + TCGv_ptr t_size =3D tcg_constant_ptr(oprsz); TCGv_i32 t_val; =20 if (in_32) { @@ -646,7 +646,6 @@ static void do_dup(unsigned vece, uint32_t dofs, uint32= _t oprsz, if (in_64) { tcg_temp_free_i32(t_val); } - tcg_temp_free_ptr(t_size); tcg_temp_free_ptr(t_ptr); return; } --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476876; cv=none; d=zohomail.com; s=zohoarc; b=TPUAD+q/elVuFv3ZNlVDivqhmbONYiY/n88b8NWTKL4YzA7B3FRWcVgdNUzm7E+eML/h7FlvbflvOmTaIk+1wV4+O+DqZNklXqtE4CQ6qgIIbXo5RF5qIvZLKulxVctptcWBLdA5sZXpSdjlY23OR4mmGPviStppZcvCABUEzDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476876; 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=DKuK62hxv2vXEM1ktPotl0poAfziKcuIlZAl/cEb0MU=; b=QYBzhouCs0+BOt6vd1oSbe/h/EQvxhxaIdLHC7U5dc7dYKDkJC0n+2DDcQuEfQVH7PLt8AXXLHIpRZ6AePQUOgMWLj2r2xbXShQ9YPZEBKWXUbCRrVfBK/+PB9EjchZ7lpNxUhX45+dCmvOSc+OmCZbyTEhVb9eVONl/MfY9w20= 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+importer2=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 1677476876096231.63644293005643; Sun, 26 Feb 2023 21:47:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWE2-0006zA-FJ; Mon, 27 Feb 2023 00:39:02 -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 1pWWCz-0003Me-Pd for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:08 -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 1pWWCr-0002YQ-Ff for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:54 -0500 Received: by mail-pl1-x62d.google.com with SMTP id p6so4706770plf.0 for ; Sun, 26 Feb 2023 21:37:48 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=DKuK62hxv2vXEM1ktPotl0poAfziKcuIlZAl/cEb0MU=; b=GSgmioxOe4H+3ZwiZ21dHhz08vWfL/N7uE/pwLRbBTJ6R0g4//GhKzaiHfjrJ+gCWA /0L48ew6TLVC7qvFN5m27Hs8xDFqNzUivaCNJQ+Z3E+VrUP8XUsdXKpnAA1BpoEmxrcH MezQ5VQu8XY8b0TcLMvjhEUdyB/yDFzp2FEEeY4K5Am5C4rQfnl6ponyS0aSfKKpVHhu HfYP8HfMasegJXP9ruLtQu+1QPlV1W0//NFQc30G5bHVHk5S9G6m4y2UVXencHlGx7RW LS23sHLy+h10B3nAv29b2Zr7pK1Dw4JgveHkYyPPH3qnHtRjvxraynqPdLu2a/e4a+xk 9hrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=DKuK62hxv2vXEM1ktPotl0poAfziKcuIlZAl/cEb0MU=; b=UlUoU+tQDBYUOi2vOK4x4LpfUNFecwlrnTO5o+SUF7kEnBHZH8nEd/5J8DbIPkwSRF lnxhUUUEbSGAluZCK63T/9JgafOFWlgiGKCQb1dPiLeaDCJEoM88Ti7uKS5kkxOuxIhA 5wrlUWMsoqpPwLdvFtKkifoFaV/kyUA2BeJvhIVjzpc2VfWznNAuEhz+TtPSXYqAcTs9 hSPOPSI2a2uyAKLEK1v2FFCxpd7x99D9cRHGMeY3Ba5mNrdfkZ1CZyiX8et1sKgHHPsb 2Y+ZBjUyBg6uNmr6+jVQQBF757b5neoRthW59//VflL27JtH/AcbbvT4Gao8dpzeYRaq R7mw== X-Gm-Message-State: AO0yUKVSx2i/CNhmW+o0663iyldHm5GHwFT5NwJrr2xjhwV3gXIyaxMt YITWqU8Lk8ryUMeRMZUZW53gwy6v+5V7wlWKi78= X-Google-Smtp-Source: AK7set/GXlsIavkm/OM22LQUNc5hz38InFswBnd8PXRYXrrh9sAsdJ+ZMAPmeAHnNIBoOde5rLUhMg== X-Received: by 2002:a05:6a20:9383:b0:cb:e8c6:26a0 with SMTP id x3-20020a056a20938300b000cbe8c626a0mr18498050pzh.11.1677476267765; Sun, 26 Feb 2023 21:37:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 15/31] accel/tcg/plugin: Use tcg_temp_ebb_* Date: Sun, 26 Feb 2023 19:36:45 -1000 Message-Id: <20230227053701.368744-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476876739100001 All of these uses have quite local scope. Avoid tcg_const_*, because we haven't added a corresponding interface for TEMP_EBB. Use explicit tcg_gen_movi_* instead. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 17a686bd9e..9b793ac62c 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -93,11 +93,13 @@ void HELPER(plugin_vcpu_mem_cb)(unsigned int vcpu_index, =20 static void do_gen_mem_cb(TCGv vaddr, uint32_t info) { - TCGv_i32 cpu_index =3D tcg_temp_new_i32(); - TCGv_i32 meminfo =3D tcg_const_i32(info); - TCGv_i64 vaddr64 =3D tcg_temp_new_i64(); - TCGv_ptr udata =3D tcg_const_ptr(NULL); + TCGv_i32 cpu_index =3D tcg_temp_ebb_new_i32(); + TCGv_i32 meminfo =3D tcg_temp_ebb_new_i32(); + TCGv_i64 vaddr64 =3D tcg_temp_ebb_new_i64(); + TCGv_ptr udata =3D tcg_temp_ebb_new_ptr(); =20 + tcg_gen_movi_i32(meminfo, info); + tcg_gen_movi_ptr(udata, 0); tcg_gen_ld_i32(cpu_index, cpu_env, -offsetof(ArchCPU, env) + offsetof(CPUState, cpu_index)= ); tcg_gen_extu_tl_i64(vaddr64, vaddr); @@ -112,9 +114,10 @@ static void do_gen_mem_cb(TCGv vaddr, uint32_t info) =20 static void gen_empty_udata_cb(void) { - TCGv_i32 cpu_index =3D tcg_temp_new_i32(); - TCGv_ptr udata =3D tcg_const_ptr(NULL); /* will be overwritten later */ + TCGv_i32 cpu_index =3D tcg_temp_ebb_new_i32(); + TCGv_ptr udata =3D tcg_temp_ebb_new_ptr(); =20 + tcg_gen_movi_ptr(udata, 0); tcg_gen_ld_i32(cpu_index, cpu_env, -offsetof(ArchCPU, env) + offsetof(CPUState, cpu_index)= ); gen_helper_plugin_vcpu_udata_cb(cpu_index, udata); @@ -129,9 +132,10 @@ static void gen_empty_udata_cb(void) */ static void gen_empty_inline_cb(void) { - TCGv_i64 val =3D tcg_temp_new_i64(); - TCGv_ptr ptr =3D tcg_const_ptr(NULL); /* overwritten later */ + TCGv_i64 val =3D tcg_temp_ebb_new_i64(); + TCGv_ptr ptr =3D tcg_temp_ebb_new_ptr(); =20 + tcg_gen_movi_ptr(ptr, 0); tcg_gen_ld_i64(val, ptr, 0); /* pass an immediate !=3D 0 so that it doesn't get optimized away */ tcg_gen_addi_i64(val, val, 0xdeadface); @@ -151,9 +155,9 @@ static void gen_empty_mem_cb(TCGv addr, uint32_t info) */ static void gen_empty_mem_helper(void) { - TCGv_ptr ptr; + TCGv_ptr ptr =3D tcg_temp_ebb_new_ptr(); =20 - ptr =3D tcg_const_ptr(NULL); + tcg_gen_movi_ptr(ptr, 0); tcg_gen_st_ptr(ptr, cpu_env, offsetof(CPUState, plugin_mem_cbs) - offsetof(ArchCPU, env)); tcg_temp_free_ptr(ptr); --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477405; cv=none; d=zohomail.com; s=zohoarc; b=H7/srpTDMw7vikMvrbpU/8/NCvlVgZqGejbaIdVm8WyL/iYWLbsM29/wfbnoYXub5ZXpduyqPGA8iiqwIruBJrddpyjP/0G76IesScA6mbFQ3DfVMe5TdCIB4GbSgnHZ+ujXoUzvlRlp3mPbuIwLBjq9SBEaFkdKeH4ftZs52u8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477405; 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=c/FsI5n4WgHRv66eevhE+xAIN7J7lkFbjUwPoPOuuXQ=; b=jMnYkofEFcfE4RnnxeZhGAmlTogB0dbTEL3SgE161kVZ5ejQTWL5ACLIshEqjcNOvJh0Lv2MYirbusbUKTkXHf0y0l/8wbtN083NPxIT+KZxp1tolEu752/ATJM75gJO8esPPZEtUZk3qd6SWWK+RLY8zb+XyrCJDjnDaLfNIuI= 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+importer2=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 167747740552250.437089529896184; Sun, 26 Feb 2023 21:56:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWE0-0006ko-MG; Mon, 27 Feb 2023 00:39:00 -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 1pWWCz-0003MZ-Tm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:08 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCv-0002YT-CD for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:56 -0500 Received: by mail-pj1-x102e.google.com with SMTP id x20-20020a17090a8a9400b00233ba727724so10693781pjn.1 for ; Sun, 26 Feb 2023 21:37:51 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=c/FsI5n4WgHRv66eevhE+xAIN7J7lkFbjUwPoPOuuXQ=; b=Vhwm0qvsjtsA6wvMpMuv4W6xBYYfrNezIKAp1isoNgu76u1vMp7xhKecNJbXi5PLRj VLnSkrB/UWEuiTxmzawxYjYdYYTuh+vWTBrVED11GTk000z4aQ8V1pOJCHYOcKWvnDTK 4d7qwo5fAjmWH0jE8qWjN7RQVtJK/XKo+1x+knGwuB8xeGNdcgyrjSqr5vcRn3E+BY4w +DUm9Pw1bPw+SsP5ZN3nnD8qBPgLRJy2h3zxyTTaIBDF3ZiIuOU5Ly1x0KMLHIXbcbeK hR56oHByAhBwBh959oqfDl09C5XZFgCLz/hh9tUOkDhLLMwgCwGmmCipHJqlFR7Kn37p NKRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=c/FsI5n4WgHRv66eevhE+xAIN7J7lkFbjUwPoPOuuXQ=; b=1E4ewNRbFTd8zemakEHmvmWakgaeVJ0dDtdyE/WT/NkoiILCR1Jo9FaSBTjuPvbT4L 0AUOzRXlV7mK83wboDmEVBBjUS71iFr8V2B+eCESfTvV8qaDtFxUCgT2Tz3iOXS2a00+ gm7uF1Zp8PLNLJNRTV4S/uBPLSr3q5rk0S9rJ4XXGjDxuAayRbjgsNMBA6+B2HVuOcsK wU5DxXXtOYFRRkpnt8iXcy5hX7CP66i6PO+z09X7GABgTpzWfps+sOL+pAai+X5fgZVi CFPuGZE3PWEohaUc1EaAc2XIU1FGy77N+jIXv99ugrYvmuG+bRYfGfv9evdmJ2dcsRC1 PaaA== X-Gm-Message-State: AO0yUKUO+WLM5YVmhH2pjNyvKfF608orZ3r7mP5wcnO2/WOXg9+Pqmma fFfklH7trfzhBDjiumRV3O/swM9tvqH5yADTJcg= X-Google-Smtp-Source: AK7set8Q5vVzPSgdqFTqxNSa5WCUFQsLUB38WZ5JWVzCAsDGVbbJKxR7xELhkZdHW1buXbRIUSV+Wg== X-Received: by 2002:a05:6a20:9388:b0:cd:11e3:4105 with SMTP id x8-20020a056a20938800b000cd11e34105mr5068539pzh.27.1677476270706; Sun, 26 Feb 2023 21:37:50 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 16/31] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers Date: Sun, 26 Feb 2023 19:36:46 -1000 Message-Id: <20230227053701.368744-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477406047100001 Here we are creating a temp whose value needs to be replaced, but always storing NULL into CPUState.plugin_mem_cbs. Use tcg_constant_ptr(0) explicitly. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 9b793ac62c..c42a436c0c 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -630,8 +630,6 @@ static void inject_mem_disable_helper(struct qemu_plugi= n_insn *plugin_insn, /* called before finishing a TB with exit_tb, goto_tb or goto_ptr */ void plugin_gen_disable_mem_helpers(void) { - TCGv_ptr ptr; - /* * We could emit the clearing unconditionally and be done. However, th= is can * be wasteful if for instance plugins don't track memory accesses, or= if @@ -644,10 +642,8 @@ void plugin_gen_disable_mem_helpers(void) if (!tcg_ctx->plugin_tb->mem_helper) { return; } - ptr =3D tcg_const_ptr(NULL); - tcg_gen_st_ptr(ptr, cpu_env, offsetof(CPUState, plugin_mem_cbs) - - offsetof(ArchCPU, env)); - tcg_temp_free_ptr(ptr); + tcg_gen_st_ptr(tcg_constant_ptr(NULL), cpu_env, + offsetof(CPUState, plugin_mem_cbs) - offsetof(ArchCPU, = env)); } =20 static void plugin_gen_tb_udata(const struct qemu_plugin_tb *ptb, --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476983; cv=none; d=zohomail.com; s=zohoarc; b=irrk9QXxUROb1rvu/+FnhR2tSeIC3DBsawwXS78Q6i1WoZjgrWiNm1uC5qECC99Gq/7Kw1DBRfp0fN8sPGBcSZSYeagEOKn27OjMlOSqVPXnQc6CeIqFtcPhE9nll+blxm9PfD4K8sivT83A9/gPWdZ6Q5mtjtV2fOqMLOEi/Yk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476983; h=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=Yzfn6SwReNHYrs90SleSmiPQOxaudqzmn6c62VzQnAs=; b=GryWJMKePF2C6+ndg7UMWBA75417XwnjVds/UdRVZOR6eYKeGzjgUwQe4FTRReTpgcVGtp6COMmB4jduxP3eWc/1W6fm6ex1oTXIVYaADQn6Qbus/v1QjiawLY4haP3kZOp33nPErKgV6x1jtOjHFsuIUB88ZbprW1A+TYbgmhc= 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+importer2=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 1677476982723819.9378564331272; Sun, 26 Feb 2023 21:49:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWDz-0006fe-JP; Mon, 27 Feb 2023 00:38:59 -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 1pWWD3-0003Nb-NE for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:08 -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 1pWWCz-0002qQ-8m for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:00 -0500 Received: by mail-pl1-x62d.google.com with SMTP id v11so2023404plz.8 for ; Sun, 26 Feb 2023 21:37:54 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=Yzfn6SwReNHYrs90SleSmiPQOxaudqzmn6c62VzQnAs=; b=ldr53H7oVSDHYuoh0pMMrd9XDW2g1l3KMuEfa6qVejtVsdhog4ySBkAsP0FvK4C784 MITsBb9I6wG0H2JfuuwJT3hfN+M+NW/6NrRrq0Dt7N3roU647k4gcm9XPvs5r9LpRwux Dp7cq4h9aD1009OzJFL/drNo+gR+WEKlTmxBGINLgkHiy8xsfc2yHJdEz1CtIJFhdeqQ MXXkDO55kjZQ9H8hNVkw4l3m9IPEV0JzYN8fucy4x9Sem3iavlw+U1YSlIzaN4vLv/k7 fYs2O8fiNupqr0vW+xGhjRNetoaiy0W/5vq3eB76FEV2jc+TiMg/G63v7IuVpMjrYekj 8ANA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Yzfn6SwReNHYrs90SleSmiPQOxaudqzmn6c62VzQnAs=; b=aSnQeRrPEkRsaT3Pa+ns7wFXWk1+wwwuirKuLN4wqO0sUok4HyUj0Oj4uGzEimQgAI xRZrpqWGN7pu8gyu4iSMrWrpLiRKqjSEckTmLxWspu/6DCMMxOedDq9JNaB42d5jdJg8 PBCjsqNPxcvH423L725cBDRrJuOdECea6jnX0GaCEX9k8Rkxf7YkZlEimpQHeYxFsNDA 5nV0APS1iYm+cU1FJQatTy3nGl2H5c5UpUy/WvI9RUO9LaXDaVsuQwXkinwwO5Lcaacl V2+gjYf04zSea8mJSwd07RL4w1Ng4/ocU35pcoWrERAOrqzKYjmM1wtub5Bd4JRDhbxq AlfQ== X-Gm-Message-State: AO0yUKUCQS8vtn+MDzGpOdj0T0xhxZlzd6kSWLLt6dJQXKunhsbWLHxe fEhnJ6Z7D06+9VeSRaWM9MWXOgijEKXrlKSONYY= X-Google-Smtp-Source: AK7set8MnRvuSu4xUHz+jUdmiAg/wiS7lCCu5L2iFKOGc9+3TwfQfb9vjftvC7xZcDMiBof/PLqS0w== X-Received: by 2002:a05:6a20:8ec5:b0:cc:f27d:eb83 with SMTP id m5-20020a056a208ec500b000ccf27deb83mr4868937pzk.53.1677476273331; Sun, 26 Feb 2023 21:37:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com Subject: [PATCH v4 17/31] tcg: Don't re-use TEMP_TB temporaries Date: Sun, 26 Feb 2023 19:36:47 -1000 Message-Id: <20230227053701.368744-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-1-richard.henderson@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; 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 autolearn=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476985112100003 Content-Type: text/plain; charset="utf-8" Reusing TEMP_TB interferes with detecting whether the temp can be adjusted to TEMP_EBB. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- include/tcg/tcg.h | 2 +- tcg/tcg.c | 101 ++++++++++++++++++++++++---------------------- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 0c2041bcf7..6cc6758cd6 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -612,7 +612,7 @@ struct TCGContext { #endif =20 GHashTable *const_table[TCG_TYPE_COUNT]; - TCGTempSet free_temps[TCG_TYPE_COUNT * 2]; + TCGTempSet free_temps[TCG_TYPE_COUNT]; TCGTemp temps[TCG_MAX_TEMPS]; /* globals first, temps after */ =20 QTAILQ_HEAD(, TCGOp) ops, free_ops; diff --git a/tcg/tcg.c b/tcg/tcg.c index 437fea2f3c..758b2a3e06 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1258,63 +1258,66 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, = TCGv_ptr base, TCGTemp *tcg_temp_new_internal(TCGType type, TCGTempKind kind) { TCGContext *s =3D tcg_ctx; - bool temp_local =3D kind =3D=3D TEMP_TB; TCGTemp *ts; - int idx, k; + int n; =20 - k =3D type + (temp_local ? TCG_TYPE_COUNT : 0); - idx =3D find_first_bit(s->free_temps[k].l, TCG_MAX_TEMPS); - if (idx < TCG_MAX_TEMPS) { - /* There is already an available temp with the right type. */ - clear_bit(idx, s->free_temps[k].l); + if (kind =3D=3D TEMP_EBB) { + int idx =3D find_first_bit(s->free_temps[type].l, TCG_MAX_TEMPS); =20 - ts =3D &s->temps[idx]; - ts->temp_allocated =3D 1; - tcg_debug_assert(ts->base_type =3D=3D type); - tcg_debug_assert(ts->kind =3D=3D kind); - } else { - int i, n; + if (idx < TCG_MAX_TEMPS) { + /* There is already an available temp with the right type. */ + clear_bit(idx, s->free_temps[type].l); =20 - switch (type) { - case TCG_TYPE_I32: - case TCG_TYPE_V64: - case TCG_TYPE_V128: - case TCG_TYPE_V256: - n =3D 1; - break; - case TCG_TYPE_I64: - n =3D 64 / TCG_TARGET_REG_BITS; - break; - case TCG_TYPE_I128: - n =3D 128 / TCG_TARGET_REG_BITS; - break; - default: - g_assert_not_reached(); + ts =3D &s->temps[idx]; + ts->temp_allocated =3D 1; + tcg_debug_assert(ts->base_type =3D=3D type); + tcg_debug_assert(ts->kind =3D=3D kind); + goto done; } + } else { + tcg_debug_assert(kind =3D=3D TEMP_TB); + } =20 - ts =3D tcg_temp_alloc(s); - ts->base_type =3D type; - ts->temp_allocated =3D 1; - ts->kind =3D kind; + switch (type) { + case TCG_TYPE_I32: + case TCG_TYPE_V64: + case TCG_TYPE_V128: + case TCG_TYPE_V256: + n =3D 1; + break; + case TCG_TYPE_I64: + n =3D 64 / TCG_TARGET_REG_BITS; + break; + case TCG_TYPE_I128: + n =3D 128 / TCG_TARGET_REG_BITS; + break; + default: + g_assert_not_reached(); + } =20 - if (n =3D=3D 1) { - ts->type =3D type; - } else { - ts->type =3D TCG_TYPE_REG; + ts =3D tcg_temp_alloc(s); + ts->base_type =3D type; + ts->temp_allocated =3D 1; + ts->kind =3D kind; =20 - for (i =3D 1; i < n; ++i) { - TCGTemp *ts2 =3D tcg_temp_alloc(s); + if (n =3D=3D 1) { + ts->type =3D type; + } else { + ts->type =3D TCG_TYPE_REG; =20 - tcg_debug_assert(ts2 =3D=3D ts + i); - ts2->base_type =3D type; - ts2->type =3D TCG_TYPE_REG; - ts2->temp_allocated =3D 1; - ts2->temp_subindex =3D i; - ts2->kind =3D kind; - } + for (int i =3D 1; i < n; ++i) { + TCGTemp *ts2 =3D tcg_temp_alloc(s); + + tcg_debug_assert(ts2 =3D=3D ts + i); + ts2->base_type =3D type; + ts2->type =3D TCG_TYPE_REG; + ts2->temp_allocated =3D 1; + ts2->temp_subindex =3D i; + ts2->kind =3D kind; } } =20 + done: #if defined(CONFIG_DEBUG_TCG) s->temps_in_use++; #endif @@ -1359,7 +1362,6 @@ TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match) void tcg_temp_free_internal(TCGTemp *ts) { TCGContext *s =3D tcg_ctx; - int k, idx; =20 switch (ts->kind) { case TEMP_CONST: @@ -1383,9 +1385,10 @@ void tcg_temp_free_internal(TCGTemp *ts) s->temps_in_use--; #endif =20 - idx =3D temp_idx(ts); - k =3D ts->base_type + (ts->kind =3D=3D TEMP_EBB ? 0 : TCG_TYPE_COUNT); - set_bit(idx, s->free_temps[k].l); + if (ts->kind =3D=3D TEMP_EBB) { + int idx =3D temp_idx(ts); + set_bit(idx, s->free_temps[ts->base_type].l); + } } =20 TCGTemp *tcg_constant_internal(TCGType type, int64_t val) --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476986; cv=none; d=zohomail.com; s=zohoarc; b=h4Ax8qF1OXxhg31usX11uFTFwxkQPUOTMunDIOgaLa69Kqiepo49kuY8DnRWVQzXG0iTG8x+eXykN+Rmsx7UHaGzU0OpMO3rBxTcgUc1puJTmygU5xQmZoU1mgSIJLI1IoZz0xT2lcJSnmD1konRyE5BtlKXQCLfQl4e4JJ63cA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476986; 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=IYCWwbbJIP8d6veHeIA0O5e/DufmdWm+tt9+vif/hVA=; b=ZR6Pik3xduAi/bYMbl90HvLuqXS5iE+0av6nQckrfvckd5PHZP+O7ckd22jAZYnHCHnhMCfSkjV4U5DDBoPFzA+auwtKWatg/0IBLAAjrcZfos1YE+Ct+wj4oCA/LXhmyCCpOOR0s37CUSK18zQIIppte6i2WTaeStBxktcKkHA= 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+importer2=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 1677476986851853.2223200475216; Sun, 26 Feb 2023 21:49:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWET-0000fC-Ee; Mon, 27 Feb 2023 00:39:29 -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 1pWWD3-0003Nc-SN for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:08 -0500 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWD0-0002rY-3A for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:01 -0500 Received: by mail-pj1-x102f.google.com with SMTP id nw10-20020a17090b254a00b00233d7314c1cso8856220pjb.5 for ; Sun, 26 Feb 2023 21:37:57 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=IYCWwbbJIP8d6veHeIA0O5e/DufmdWm+tt9+vif/hVA=; b=p9OOucYQotsM25d+bKfifADAbChZUQUYPTgvmYZP0aGzV0GbX0EScpUzj68XkSCEsX 5/OQBRvQoRLM0AHpT9EvT+m6ah/Xz3t2jcgwQPPDDli2H6STCm55C4KaaqTPNq0xkjnf 8KT+bzG8E+HyKpNTNeYqGDf1TffGOGkaVJCP83PU1WxGP+WehEDmx9J4jasjkrn51stI bIAo7tSi1DFOdXtqEwAlFWUXTj4CzX1ApXO4EFVDkFhICY08GoNzgZvtmEanY7qg5TPi pVCGpZVHTwq3nmBGTSICzu8lOqF3P+kRFcaWFDmYr35gnniWm2x2g+s97T8SuTiAsN8Y jUig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=IYCWwbbJIP8d6veHeIA0O5e/DufmdWm+tt9+vif/hVA=; b=KESxCXJb/oRrbLHAsdBKWuQ8Q2wOnqmSx7czHClDNSj5YATW3wQbyy8fUB8DGUtgpL WYwi6s2fWL3B0R+i3cxgxxJx3GqanB7o9DQgJbnDw7TzhJ/V5pEzFYFe/2+suLhawOHA WQuRegSbS2kFzC8cIgLgYTsIzB/avCOc68kvihJWLOTU998ZN6OchB+MctuPB0UiZ+ag bqt2brkNMFadRawi3vFB6erWpRpi7E9oIApygqeIZrpxwswWe+w6XMaZzXgJbzcP46FG 3nOJacNDZe6TpfpkOSw3m5tgplC0RqnUkUWk6vNWW1aASEBBoH+48LXChkYt7/pFPpwM VfOw== X-Gm-Message-State: AO0yUKXFDymqEJig8aG3eoax9JTfWNNo4ijfyy9VWXT5pTd5glQNFhTs e5HeDWqIfT/n7Gnk1aTpNf6jgsZ88ylxosN/GuI= X-Google-Smtp-Source: AK7set9o5gz18AlfFTCKVZpaDVOPvV94cuKspnBciJRy/aT7tU9pkB0qhYAf6PUGuzG7qIiVK1rW+A== X-Received: by 2002:a05:6a20:6714:b0:cc:fbdc:886 with SMTP id q20-20020a056a20671400b000ccfbdc0886mr4099004pzh.18.1677476275994; Sun, 26 Feb 2023 21:37:55 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 18/31] tcg: Change default temp lifetime to TEMP_TB Date: Sun, 26 Feb 2023 19:36:48 -1000 Message-Id: <20230227053701.368744-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102f.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476989094100001 Guest front-ends now get temps that span the lifetime of the translation block by default, which avoids accidentally using the temp across branches and invalidating the data. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 6cc6758cd6..2e220d4040 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -901,7 +901,7 @@ static inline TCGv_i32 tcg_temp_ebb_new_i32(void) =20 static inline TCGv_i32 tcg_temp_new_i32(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, TEMP_TB); return temp_tcgv_i32(t); } =20 @@ -927,7 +927,7 @@ static inline TCGv_i64 tcg_temp_ebb_new_i64(void) =20 static inline TCGv_i64 tcg_temp_new_i64(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, TEMP_TB); return temp_tcgv_i64(t); } =20 @@ -946,7 +946,7 @@ static inline TCGv_i128 tcg_temp_ebb_new_i128(void) =20 static inline TCGv_i128 tcg_temp_new_i128(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, TEMP_TB); return temp_tcgv_i128(t); } =20 @@ -972,7 +972,7 @@ static inline TCGv_ptr tcg_temp_ebb_new_ptr(void) =20 static inline TCGv_ptr tcg_temp_new_ptr(void) { - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB); + TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_TB); return temp_tcgv_ptr(t); } =20 --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476754; cv=none; d=zohomail.com; s=zohoarc; b=d63wjLS/vEb/sBT7GgqC+R3P0S82kPSF7/wbhMYVrKqlNdFngwIXOtu44glu70Rxl6N2K0xezvYrmMGcXnXddssWWTBFFYifc3bO+aoQmORZ3vvFK2FuFtCZr9Rj4/y6kLHq2KwQmpOuIDILmVIJCo9DTAG4vkO2vPkXWCYoJJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476754; h=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=EN6i3124GbzuDzAfWYCmS/x0Jquz/HN39rL+uzxBiIE=; b=Y6CJ2KKP0fqdZUDGgvmtJF806iTzA385rt09qQfZsMRFqLyO1l/7EKJgokQMqcqRdpBXa7eLHifamNWJySQFk0UmpPnRbQmw82TByYUBl+7jPIWrkqS9usHPmFwN0gRncKoZCCPhtaHoywsb28dqOlydlpMBKxsOYr6x2qemCpk= 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+importer2=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 1677476754423378.5156237737209; Sun, 26 Feb 2023 21:45:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWE7-0007Ye-J0; Mon, 27 Feb 2023 00:39:07 -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 1pWWD4-0003Ne-SB for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:09 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWD2-0002ox-C2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:02 -0500 Received: by mail-pj1-x102b.google.com with SMTP id m8-20020a17090a4d8800b002377bced051so8944546pjh.0 for ; Sun, 26 Feb 2023 21:37:59 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=EN6i3124GbzuDzAfWYCmS/x0Jquz/HN39rL+uzxBiIE=; b=Uxj4uRpCpqZL5iI8xx/448eGHU8w2e36Mkh8lGpxZnx+zHg3hUkvE3AKZizAKCrFdq IyX0ueIDuHosRIJtKY1Fildw0KQq5ywVaXP/sE2UisifYHh4z7MbPAn2dLtUfJxA9Gvo g2bv/iEqDfq90WTkjQ2aV7G7GcqH0ZUstjgPUTVQ3KllTAhRURmDqoZfChMfQZ4+MeOv bw4qGO+MKBlRE+75LYBKLp0a1P1jvyUQHq2FIk5tRzgOgdzmsw7ZuypFKhcaMTSUPdOe gO3Yy7RzmkosVbYVgWvyfB40+c91kGsuT6qSi6zgon1Zp+I8hcLIZayoPLZrvsGolnLr oteg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=EN6i3124GbzuDzAfWYCmS/x0Jquz/HN39rL+uzxBiIE=; b=dXPfWxmWyDj6CJrCGEdm2/anQXJx6s1W4CKlb+fBam5VhGw+C98PIJfCQl94ORSQil TwEyNGCaRIXmWyHgjicQjjjBf0gEIyyI5QtWEejqo7WBTJejdv48jmZq4c/eCYLQFMAb f87wt1t6iEIcK7kg9Clzqo98Mf3gL3X6kWJMRV5x4EGUANULn1B4Qn6r5bLfBhBGCLo5 eS9P7IZdO66/QSLLPg7U2f+0bFc7wpSko361EZ/B7+NrUmTWSung0DUPO07lp1XGMFjy Nf4ermK00hu9+CxhnaDOc3Z2FQRwwIcqKimoURfQaA9o677nygeuUv6pM9Hdyw0JYfRx 4TNA== X-Gm-Message-State: AO0yUKVEe4XlqdYW39qSOZ6+7Kkt4OEt3NlzmpMbmDnP3kaFjzVemwSV NdTLLa0ei+2P53kQ/OCc47ZDrqWJNGi55ZGFV+Y= X-Google-Smtp-Source: AK7set8waP010j+FmSTOcz5vRnyljIKP6pyZxBu4MjL+krvn+gH1zWvcXMU+BBkjK31Gsz9Qx6FAoA== X-Received: by 2002:a05:6a21:3396:b0:cd:1808:87bb with SMTP id yy22-20020a056a21339600b000cd180887bbmr4899219pzb.7.1677476278683; Sun, 26 Feb 2023 21:37:58 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, Peter Maydell Subject: [PATCH v4 19/31] target/arm: Drop copies in gen_sve_{ldr,str} Date: Sun, 26 Feb 2023 19:36:49 -1000 Message-Id: <20230227053701.368744-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-1-richard.henderson@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476755915100003 Content-Type: text/plain; charset="utf-8" Since we now get TEMP_TB temporaries by default, we no longer need to make copies across these loops. These were the only uses of new_tmp_a64_local(), so remove that as well. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 - target/arm/translate-a64.c | 6 ------ target/arm/translate-sve.c | 32 -------------------------------- 3 files changed, 39 deletions(-) diff --git a/target/arm/translate-a64.h b/target/arm/translate-a64.h index ad3762d1ac..ca24c39dbe 100644 --- a/target/arm/translate-a64.h +++ b/target/arm/translate-a64.h @@ -19,7 +19,6 @@ #define TARGET_ARM_TRANSLATE_A64_H =20 TCGv_i64 new_tmp_a64(DisasContext *s); -TCGv_i64 new_tmp_a64_local(DisasContext *s); TCGv_i64 new_tmp_a64_zero(DisasContext *s); TCGv_i64 cpu_reg(DisasContext *s, int reg); TCGv_i64 cpu_reg_sp(DisasContext *s, int reg); diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 67e9c4ee79..9da5010fe1 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -436,12 +436,6 @@ TCGv_i64 new_tmp_a64(DisasContext *s) return s->tmp_a64[s->tmp_a64_count++] =3D tcg_temp_new_i64(); } =20 -TCGv_i64 new_tmp_a64_local(DisasContext *s) -{ - assert(s->tmp_a64_count < TMP_A64_MAX); - return s->tmp_a64[s->tmp_a64_count++] =3D tcg_temp_local_new_i64(); -} - TCGv_i64 new_tmp_a64_zero(DisasContext *s) { TCGv_i64 t =3D new_tmp_a64(s); diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 621a2abb22..02150d93e8 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4344,17 +4344,6 @@ void gen_sve_ldr(DisasContext *s, TCGv_ptr base, int= vofs, TCGLabel *loop =3D gen_new_label(); TCGv_ptr tp, i =3D tcg_const_local_ptr(0); =20 - /* Copy the clean address into a local temp, live across the loop.= */ - t0 =3D clean_addr; - clean_addr =3D new_tmp_a64_local(s); - tcg_gen_mov_i64(clean_addr, t0); - - if (base !=3D cpu_env) { - TCGv_ptr b =3D tcg_temp_local_new_ptr(); - tcg_gen_mov_ptr(b, base); - base =3D b; - } - gen_set_label(loop); =20 t0 =3D tcg_temp_new_i64(); @@ -4370,11 +4359,6 @@ void gen_sve_ldr(DisasContext *s, TCGv_ptr base, int= vofs, =20 tcg_gen_brcondi_ptr(TCG_COND_LTU, i, len_align, loop); tcg_temp_free_ptr(i); - - if (base !=3D cpu_env) { - tcg_temp_free_ptr(base); - assert(len_remain =3D=3D 0); - } } =20 /* @@ -4445,17 +4429,6 @@ void gen_sve_str(DisasContext *s, TCGv_ptr base, int= vofs, TCGLabel *loop =3D gen_new_label(); TCGv_ptr tp, i =3D tcg_const_local_ptr(0); =20 - /* Copy the clean address into a local temp, live across the loop.= */ - t0 =3D clean_addr; - clean_addr =3D new_tmp_a64_local(s); - tcg_gen_mov_i64(clean_addr, t0); - - if (base !=3D cpu_env) { - TCGv_ptr b =3D tcg_temp_local_new_ptr(); - tcg_gen_mov_ptr(b, base); - base =3D b; - } - gen_set_label(loop); =20 t0 =3D tcg_temp_new_i64(); @@ -4471,11 +4444,6 @@ void gen_sve_str(DisasContext *s, TCGv_ptr base, int= vofs, =20 tcg_gen_brcondi_ptr(TCG_COND_LTU, i, len_align, loop); tcg_temp_free_ptr(i); - - if (base !=3D cpu_env) { - tcg_temp_free_ptr(base); - assert(len_remain =3D=3D 0); - } } =20 /* Predicate register stores can be any multiple of 2. */ --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476689; cv=none; d=zohomail.com; s=zohoarc; b=E5ENrQC1XJ0fkj87oP8fUp4J/DBuE7Echn805aD/CCC/bItUJLaIe07a07AN+D0j5u8C9/LB2YvqwrnevpsLDo97xHSSrhZSsGOuSgz4fJzDlFMAF2QLA0wmr9vk1nLR6Eid0Mn/L4Ro2MCOA2iBXm8WAsfN+FjaY4EKuFTSIIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476689; 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=nOjB7Oa3s7/QHz69KU/odzNJz8JnUW0khbG4X3to11I=; b=ZgPCN82n2kGesSq3TQfLrlOXh4I1Jg3vHQN4t5eE5PdRMXtRCzYyjJKX94fKHBFvwcrbcyK5tqokeIz0x+fIQoM6Ftxu3AgxxJUO0F0bbiotKiys3R0QKRXV7nshZzPGYiW8ad7+akCvzJQNH/OccvZAn5t0R5iYzFFW4ulyU3M= 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+importer2=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 1677476689909981.3701801584601; Sun, 26 Feb 2023 21:44:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWEr-0002jk-Ap; Mon, 27 Feb 2023 00:39:53 -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 1pWWD9-0003Pa-UB for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:10 -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 1pWWD4-0002kZ-5S for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:04 -0500 Received: by mail-pj1-x1030.google.com with SMTP id l1so4897379pjt.2 for ; Sun, 26 Feb 2023 21:38:01 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=nOjB7Oa3s7/QHz69KU/odzNJz8JnUW0khbG4X3to11I=; b=DD3HF3A8LG+tMhcugVaapMk7hvpK328xX0PIrq8xRIw/RZ2RpQHwOyqF8oVysCZ/Oq yTZOww5xlhB5sQsiwNMQx1oDcDC0fpgk3kG3WlM4klJu6GnC0ny+00k/XTWgyysZDNx6 y8MUWGco1YHmcX9UAhDyksn0mZbG6lSkOP5rvyb9948NFG75mstJgBYl17ROEXodkcF9 hnBxaQKq8SKPrz42eqOocOVeIFpg+X+ypYuLEIu00N03ELFRQ23ljP1O+yj7fPCQzj81 jih+Z5RWhXi5vdkzlHPUmG7yhJTNfcZCxQt4WzDPxNVvAwFCfYOLjOQPO3Con7mrTCnh aR6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=nOjB7Oa3s7/QHz69KU/odzNJz8JnUW0khbG4X3to11I=; b=HS2L5kyCa/zH1I2n3S2ZZZlP+bw5p/Nlo+pqfKQnI+kx/wuHxuqF54n33BQej+9/Vc qsQFnOR+b8FIax1V2Z4z90zKWwQ4SU+CyYV1uYgrW/LlVdSvGb7VpZHwkhZNp0m+qiJa NevNYYln0EX34QKoKApQJMEYv7gZd/ky4SeZX0CX18SVx2QQV2f7vK+Lg1yv/7hFhk3E L6wFSKQX1N80eAMJkH6lEQ3hICVEn9PIZg3OwzYBUS7+24+QqJVJJ/FNs9I/K7AJNd7C KhegqzKMfRFZS3aqkilUuVHRplV06WuTTCsCsTxHbzsDLxE6+xrJEu0myYyQ6lw22b5n BFoA== X-Gm-Message-State: AO0yUKUBCnsCcydpdaYTZojS+koxrIFYmiMFa8r3UW4/TfNhnVcpPkPe BD7b14m+leSML9DlCnNYVo5ILY+4XgaWEgeU01U= X-Google-Smtp-Source: AK7set8I+KIkGzehL9vEKHzuFQ7ZehJyryMeMGq4xA5Cm13TX3FuNRteo+5XU7New6QpsPB623QWkQ== X-Received: by 2002:a05:6a20:428b:b0:cd:6c14:9854 with SMTP id o11-20020a056a20428b00b000cd6c149854mr1300643pzj.26.1677476281419; Sun, 26 Feb 2023 21:38:01 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 20/31] target/arm: Don't use tcg_temp_local_new_* Date: Sun, 26 Feb 2023 19:36:50 -1000 Message-Id: <20230227053701.368744-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476691470100003 Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 6 +++--- target/arm/translate.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 02150d93e8..718a5bce1b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2694,7 +2694,7 @@ static bool do_clast_vector(DisasContext *s, arg_rprr= _esz *a, bool before) return true; } =20 - last =3D tcg_temp_local_new_i32(); + last =3D tcg_temp_new_i32(); over =3D gen_new_label(); =20 find_last_active(s, last, esz, a->pg); @@ -4342,7 +4342,7 @@ void gen_sve_ldr(DisasContext *s, TCGv_ptr base, int = vofs, tcg_temp_free_i64(t0); } else { TCGLabel *loop =3D gen_new_label(); - TCGv_ptr tp, i =3D tcg_const_local_ptr(0); + TCGv_ptr tp, i =3D tcg_const_ptr(0); =20 gen_set_label(loop); =20 @@ -4427,7 +4427,7 @@ void gen_sve_str(DisasContext *s, TCGv_ptr base, int = vofs, tcg_temp_free_i64(t0); } else { TCGLabel *loop =3D gen_new_label(); - TCGv_ptr tp, i =3D tcg_const_local_ptr(0); + TCGv_ptr tp, i =3D tcg_const_ptr(0); =20 gen_set_label(loop); =20 diff --git a/target/arm/translate.c b/target/arm/translate.c index 92955d505c..9c8e1ac04c 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -7136,7 +7136,7 @@ static bool op_strex(DisasContext *s, arg_STREX *a, M= emOp mop, bool rel) tcg_gen_mb(TCG_MO_ALL | TCG_BAR_STRL); } =20 - addr =3D tcg_temp_local_new_i32(); + addr =3D tcg_temp_new_i32(); load_reg_var(s, addr, a->rn); tcg_gen_addi_i32(addr, addr, a->imm); =20 @@ -7289,7 +7289,7 @@ static bool op_ldrex(DisasContext *s, arg_LDREX *a, M= emOp mop, bool acq) return true; } =20 - addr =3D tcg_temp_local_new_i32(); + addr =3D tcg_temp_new_i32(); load_reg_var(s, addr, a->rn); tcg_gen_addi_i32(addr, addr, a->imm); =20 @@ -8696,7 +8696,7 @@ static bool trans_LE(DisasContext *s, arg_LE *a) * Decrement by 1 << (4 - LTPSIZE). We need to use a TCG local * so that decr stays live after the brcondi. */ - TCGv_i32 decr =3D tcg_temp_local_new_i32(); + TCGv_i32 decr =3D tcg_temp_new_i32(); TCGv_i32 ltpsize =3D load_cpu_field(v7m.ltpsize); tcg_gen_sub_i32(decr, tcg_constant_i32(4), ltpsize); tcg_gen_shl_i32(decr, tcg_constant_i32(1), decr); --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677486234; cv=none; d=zohomail.com; s=zohoarc; b=Ut61cTWIeaUqM36N9lYPYgUhDdMw/RUqypBLM44ypIg+rDDhpE6QS7M296iwq3Yck/aDRGEREUvD5j5KMdCmgPw49wbMRvBu6Yuwnr8Wut+IXvI8HneYThKQXnJ3rzOxIKSo9e6h/xc8yb2/10HUfMvALfnJDlZ/mfH0QA65brQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677486234; 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=YhL2WzjGmls46D+quq34ze/ulksmGA+cQwYE9pUognw=; b=S58I6R2eKBGzxWzNHCWvtmMJ+lxRae50RfUTr5MsxxZwAmUHWH3cWuhyhlEO6aZ6k3rEyQe66Vz09zQHm0JaoLJFMsOgDWxcy0Jp4AfAYigN/WlDcHplgWwCimJrtSj+YXYLgz9aXaRkB41TANao/2nrZaBz0yqoCehRYfLb3U4= 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+importer2=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 1677486234737601.9216311710468; Mon, 27 Feb 2023 00:23:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWEQ-0000Rq-CU; Mon, 27 Feb 2023 00:39:26 -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 1pWWDC-0003Qy-HU for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:18 -0500 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWD9-0002xk-FJ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:10 -0500 Received: by mail-pg1-x532.google.com with SMTP id z10so2835620pgr.8 for ; Sun, 26 Feb 2023 21:38:04 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=YhL2WzjGmls46D+quq34ze/ulksmGA+cQwYE9pUognw=; b=IqZ+RBL/2YYgOsYsdvePHMAGCFEFsncU1Fp92DEasNpFqQ9VMjHTWrnkmbtD052KBO /Vv04Uz9AZxyCUNMVTIq4ylwpeiQ0sS49zirXicKzO3MCypmMwb1G2osdfm+DV+XMO9Q OWxaTZhT3asJurwFQHXz/TCD+Li/Lp85Hs2eeBYQGNyK50vTgUIE7s1xO8iiP2l5PNxf ap3OLGVCkLlDocjvNOqF3v0elqZOyTXUvUihJP+X4gpVvENMyFS1fFLuEw/4tlbQLZek jxuql4dIDxK6jm25kCDD462Ue/A/cFDuLWmYXFRfZ7PkZxwkeyt1WVOiP4Y7O/ocRoGP opDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=YhL2WzjGmls46D+quq34ze/ulksmGA+cQwYE9pUognw=; b=nYUXug11dBb+llEz3sn7Pu4CQfHSz9NwIdz6CgdZm7I0VdKhAbqtKqOyg7Z4gefAHT W3xO90+o2flRgxy2hCnWqyZdK0/Mr9HN0UpdcNw7q7Ahp+NhRhwiGdXEFYBiomCAa29v 84le+u6b6hR/LF9fw3HmCyy2aIzz9o6iQVD73oCwbNajO2h3ETzrSAUm5MsKef+S0KZP wxsMFlHVw33G5QGupZ/UoBuvzklOEQx2n2tVdB0uRsZLGdnf5YNTYNp3pJLMJfV+3ArO AtpCJ0ot1X9X8HAEbeEHdU5Zzoldql3IsBzHUcsbPrfVrRWc2t9WI3QRtdTYFXKRiwGE zuXA== X-Gm-Message-State: AO0yUKWKoYIyLNyS4UXSFXJaj0TOK1FvZ96u/SfdIzcv/AgkuDbdG6s+ PsBhI6KxG17G4Uk/530zn1/25/s7oYtof5X8lJ0= X-Google-Smtp-Source: AK7set8aosRGl0tv7yt+NrwMTMskIu6/SkHD5TZMa7qceHG7LodJuDjP5NUygtWqWeMD/ihAuU6e0w== X-Received: by 2002:aa7:99dc:0:b0:5e5:e066:2304 with SMTP id v28-20020aa799dc000000b005e5e0662304mr8267814pfi.31.1677476283963; Sun, 26 Feb 2023 21:38:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 21/31] target/cris: Don't use tcg_temp_local_new Date: Sun, 26 Feb 2023 19:36:51 -1000 Message-Id: <20230227053701.368744-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677486235632100001 Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/cris/translate.c | 6 +++--- target/cris/translate_v10.c.inc | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 905d01288e..a959b27373 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -1621,7 +1621,7 @@ static int dec_bound_r(CPUCRISState *env, DisasContex= t *dc) LOG_DIS("bound.%c $r%u, $r%u\n", memsize_char(size), dc->op1, dc->op2); cris_cc_mask(dc, CC_MASK_NZ); - l0 =3D tcg_temp_local_new(); + l0 =3D tcg_temp_new(); dec_prep_move_r(dc, dc->op1, dc->op2, size, 0, l0); cris_alu(dc, CC_OP_BOUND, cpu_R[dc->op2], cpu_R[dc->op2], l0, 4); tcg_temp_free(l0); @@ -2404,8 +2404,8 @@ static int dec_bound_m(CPUCRISState *env, DisasContex= t *dc) dc->op1, dc->postinc ? "+]" : "]", dc->op2); =20 - l[0] =3D tcg_temp_local_new(); - l[1] =3D tcg_temp_local_new(); + l[0] =3D tcg_temp_new(); + l[1] =3D tcg_temp_new(); insn_len =3D dec_prep_alu_m(env, dc, 0, memsize, l[0], l[1]); cris_cc_mask(dc, CC_MASK_NZ); cris_alu(dc, CC_OP_BOUND, cpu_R[dc->op2], l[0], l[1], 4); diff --git a/target/cris/translate_v10.c.inc b/target/cris/translate_v10.c.= inc index f500e93447..9660f28584 100644 --- a/target/cris/translate_v10.c.inc +++ b/target/cris/translate_v10.c.inc @@ -68,9 +68,9 @@ static void gen_store_v10_conditional(DisasContext *dc, T= CGv addr, TCGv val, unsigned int size, int mem_index) { TCGLabel *l1 =3D gen_new_label(); - TCGv taddr =3D tcg_temp_local_new(); - TCGv tval =3D tcg_temp_local_new(); - TCGv t1 =3D tcg_temp_local_new(); + TCGv taddr =3D tcg_temp_new(); + TCGv tval =3D tcg_temp_new(); + TCGv t1 =3D tcg_temp_new(); dc->postinc =3D 0; cris_evaluate_flags(dc); =20 @@ -434,7 +434,7 @@ static void dec10_reg_bound(DisasContext *dc, int size) { TCGv t; =20 - t =3D tcg_temp_local_new(); + t =3D tcg_temp_new(); t_gen_zext(t, cpu_R[dc->src], size); cris_alu(dc, CC_OP_BOUND, cpu_R[dc->dst], cpu_R[dc->dst], t, 4); tcg_temp_free(t); @@ -935,7 +935,7 @@ static int dec10_ind_bound(CPUCRISState *env, DisasCont= ext *dc, int rd =3D dc->dst; TCGv t; =20 - t =3D tcg_temp_local_new(); + t =3D tcg_temp_new(); insn_len +=3D dec10_prep_move_m(env, dc, 0, size, t); cris_alu(dc, CC_OP_BOUND, cpu_R[dc->dst], cpu_R[rd], t, 4); if (dc->dst =3D=3D 15) { --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476822; cv=none; d=zohomail.com; s=zohoarc; b=A/Bk3PdYsSDSlOJJE0h4cKNuTkTqd/fY3UH1CcNzWT75+qqPe81TCPPDyfS1SGE2YX0/zhQgDCiFI3rZkduSg3quXuL/tbF/MpvfSKGf8COr+3bNIyoS3gmQVxZgJxaluLvdB33k5lijayQXZys0P+Vrj95H8fQqDuLnn2gNxEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476822; 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=I5RvwRAEFJ45NwIooEievLS2EX+7gKV47O/JdDJH4Sg=; b=U6fK2Wihmn+Yl89e/bhGFEIEiXwHZa5GO9JCRTcV2aQV+oEzYtDgsb0XNI5by5+jiWoV0oidVwPv1DP0vpY3/SxadS1hF/aS8Q7KQLn11COnvtKWkAwFcB8oQvCPyeV2S07++WsJUAGsjPWdtX6Ea6yVwaQteUy5FxY/AWdKJgM= 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+importer2=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 1677476822588433.3151290252164; Sun, 26 Feb 2023 21:47:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWET-0000fd-JQ; Mon, 27 Feb 2023 00:39:29 -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 1pWWDG-0003Ts-Bh for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:19 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDA-0002zn-7y for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:12 -0500 Received: by mail-pf1-x443.google.com with SMTP id z11so2801652pfh.4 for ; Sun, 26 Feb 2023 21:38:07 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=I5RvwRAEFJ45NwIooEievLS2EX+7gKV47O/JdDJH4Sg=; b=FSPjNW3OvrBayrKX/ooE4aDGtENR4QqQb/N46DoTPXamOj3WxhA06KVzH5MtZINfoW b4KLo0UutqEGBzM+zGcL8ZqDBcnxgsp30OX0UEklC+9Dbvz6ptEK/eceulTmC2+TGwgT 18QEhbAvEG8SHWdZN3HAtCDvaORdgbCSK10TgZpRBb5M2NttoZR6y5Vz9dapebLO3MPg hsWKbt9aza5SIIrKM+PqWPIdy2SAMNQbiCnuzXYjrUDMh11g9jnGHwqQkIJW59utEy6X shbtanboonTZjGsaNYgUkS5y5n3+9ixRXBaHIQJ4Qkv7DHnE/Gzz+ctP+i5nAV0WlJWw N8Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=I5RvwRAEFJ45NwIooEievLS2EX+7gKV47O/JdDJH4Sg=; b=azlpC9LaKDjYuBe19vLttdH8TE2dQMdZeUP+v9D0gsGXamSurfw7g/326SgppjaFEE nTUBzcswsFlSbCPVdc1WrLmaiFqFd2mvy692Rjru1Y8C39ky9l/OiXwopeb9a0UyZMU3 JdLXYk4oOAOe14Ws3CMA0rxOWFSRV+7YFQF5WiZvERtkoXCLlevLkWcbGWiNcRo2Pe2V sO8l5DbW77c6yjZHlt2MQupeH2de/dLWKk7J7uBXOer1zR0Bi+JbzjE0RWG9hd24B1Pb 67jzM75e3XPP909hu1W0j6NjHA/raf+dg798kkKYLA4S9BY9JyfE1OisrNSDoNmDWVTY G6Rw== X-Gm-Message-State: AO0yUKWNs9Lnj/IJ+CRe3ntaZ/oJpOUI9Z45CaJ5sBV1fMkdkpfZIV30 L4928wNxnltz66CQUQ/BSFbsalF3Z2ca0EQL7cireA== X-Google-Smtp-Source: AK7set/RAFDGGpMN0mJ/+Uwy2myL8HRP2YolzswWbIDLdfDDEmR2SBLstpIlsBcGKHqju2AJoc4jTw== X-Received: by 2002:a62:7bd8:0:b0:5ab:c004:5fc9 with SMTP id w207-20020a627bd8000000b005abc0045fc9mr22139869pfc.17.1677476286536; Sun, 26 Feb 2023 21:38:06 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 22/31] target/hexagon: Don't use tcg_temp_local_new_* Date: Sun, 26 Feb 2023 19:36:52 -1000 Message-Id: <20230227053701.368744-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x443.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476824326100011 Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/README.rst | 4 ++-- target/hexagon/gen_tcg.h | 4 ++-- target/hexagon/genptr.c | 16 ++++++++-------- target/hexagon/idef-parser/parser-helpers.c | 4 ++-- target/hexagon/translate.c | 2 +- target/hexagon/README | 8 ++++---- target/hexagon/gen_tcg_funcs.py | 18 +++++++----------- 7 files changed, 26 insertions(+), 30 deletions(-) diff --git a/target/hexagon/idef-parser/README.rst b/target/hexagon/idef-pa= rser/README.rst index ff6d14150a..c230fec124 100644 --- a/target/hexagon/idef-parser/README.rst +++ b/target/hexagon/idef-parser/README.rst @@ -294,9 +294,9 @@ generators the previous declarations are mapped to =20 :: =20 - int var1; -> TCGv_i32 var1 =3D tcg_temp_local_new_i32(); + int var1; -> TCGv_i32 var1 =3D tcg_temp_new_i32(); =20 - int var2 =3D 0; -> TCGv_i32 var1 =3D tcg_temp_local_new_i32= (); + int var2 =3D 0; -> TCGv_i32 var1 =3D tcg_temp_new_i32(); tcg_gen_movi_i32(j, ((int64_t) 0ULL)); =20 which are later automatically freed at the end of the function they're dec= lared diff --git a/target/hexagon/gen_tcg.h b/target/hexagon/gen_tcg.h index 19697b42a5..a219a7f5dd 100644 --- a/target/hexagon/gen_tcg.h +++ b/target/hexagon/gen_tcg.h @@ -337,7 +337,7 @@ */ #define fGEN_TCG_PRED_LOAD(GET_EA, PRED, SIZE, SIGN) \ do { \ - TCGv LSB =3D tcg_temp_local_new(); \ + TCGv LSB =3D tcg_temp_new(); \ TCGLabel *label =3D gen_new_label(); \ tcg_gen_movi_tl(EA, 0); \ PRED; \ @@ -397,7 +397,7 @@ /* Predicated loads into a register pair */ #define fGEN_TCG_PRED_LOAD_PAIR(GET_EA, PRED) \ do { \ - TCGv LSB =3D tcg_temp_local_new(); \ + TCGv LSB =3D tcg_temp_new(); \ TCGLabel *label =3D gen_new_label(); \ tcg_gen_movi_tl(EA, 0); \ PRED; \ diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index 90db99024f..591461b043 100644 --- a/target/hexagon/genptr.c +++ b/target/hexagon/genptr.c @@ -706,7 +706,7 @@ static void gen_cond_call(DisasContext *ctx, TCGv pred, TCGCond cond, int pc_off) { TCGv next_PC; - TCGv lsb =3D tcg_temp_local_new(); + TCGv lsb =3D tcg_temp_new(); TCGLabel *skip =3D gen_new_label(); tcg_gen_andi_tl(lsb, pred, 1); gen_write_new_pc_pcrel(ctx, pc_off, cond, lsb); @@ -720,7 +720,7 @@ static void gen_cond_call(DisasContext *ctx, TCGv pred, =20 static void gen_endloop0(DisasContext *ctx) { - TCGv lpcfg =3D tcg_temp_local_new(); + TCGv lpcfg =3D tcg_temp_new(); =20 GET_USR_FIELD(USR_LPCFG, lpcfg); =20 @@ -852,7 +852,7 @@ static void gen_sar(TCGv dst, TCGv src, TCGv shift_amt) /* Bidirectional shift right with saturation */ static void gen_asr_r_r_sat(TCGv RdV, TCGv RsV, TCGv RtV) { - TCGv shift_amt =3D tcg_temp_local_new(); + TCGv shift_amt =3D tcg_temp_new(); TCGLabel *positive =3D gen_new_label(); TCGLabel *done =3D gen_new_label(); =20 @@ -876,7 +876,7 @@ static void gen_asr_r_r_sat(TCGv RdV, TCGv RsV, TCGv Rt= V) /* Bidirectional shift left with saturation */ static void gen_asl_r_r_sat(TCGv RdV, TCGv RsV, TCGv RtV) { - TCGv shift_amt =3D tcg_temp_local_new(); + TCGv shift_amt =3D tcg_temp_new(); TCGLabel *positive =3D gen_new_label(); TCGLabel *done =3D gen_new_label(); =20 @@ -918,7 +918,7 @@ static void gen_log_vreg_write(DisasContext *ctx, intpt= r_t srcoff, int num, intptr_t dstoff; =20 if (is_predicated) { - TCGv cancelled =3D tcg_temp_local_new(); + TCGv cancelled =3D tcg_temp_new(); label_end =3D gen_new_label(); =20 /* Don't do anything if the slot was cancelled */ @@ -959,7 +959,7 @@ static void gen_log_qreg_write(intptr_t srcoff, int num= , int vnew, intptr_t dstoff; =20 if (is_predicated) { - TCGv cancelled =3D tcg_temp_local_new(); + TCGv cancelled =3D tcg_temp_new(); label_end =3D gen_new_label(); =20 /* Don't do anything if the slot was cancelled */ @@ -1164,10 +1164,10 @@ void gen_satu_i64_ovfl(TCGv ovfl, TCGv_i64 dest, TC= Gv_i64 source, int width) /* Implements the fADDSAT64 macro in TCG */ void gen_add_sat_i64(TCGv_i64 ret, TCGv_i64 a, TCGv_i64 b) { - TCGv_i64 sum =3D tcg_temp_local_new_i64(); + TCGv_i64 sum =3D tcg_temp_new_i64(); TCGv_i64 xor =3D tcg_temp_new_i64(); TCGv_i64 cond1 =3D tcg_temp_new_i64(); - TCGv_i64 cond2 =3D tcg_temp_local_new_i64(); + TCGv_i64 cond2 =3D tcg_temp_new_i64(); TCGv_i64 cond3 =3D tcg_temp_new_i64(); TCGv_i64 mask =3D tcg_constant_i64(0x8000000000000000ULL); TCGv_i64 max_pos =3D tcg_constant_i64(0x7FFFFFFFFFFFFFFFLL); diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/i= def-parser/parser-helpers.c index 8110686c51..dfb9c65b52 100644 --- a/target/hexagon/idef-parser/parser-helpers.c +++ b/target/hexagon/idef-parser/parser-helpers.c @@ -322,7 +322,7 @@ HexValue gen_tmp_local(Context *c, rvalue.is_manual =3D false; rvalue.tmp.index =3D c->inst.tmp_count; OUT(c, locp, "TCGv_i", &bit_width, " tmp_", &c->inst.tmp_count, - " =3D tcg_temp_local_new_i", &bit_width, "();\n"); + " =3D tcg_temp_new_i", &bit_width, "();\n"); c->inst.tmp_count++; return rvalue; } @@ -554,7 +554,7 @@ void gen_varid_allocate(Context *c, new_var.signedness =3D signedness; =20 EMIT_HEAD(c, "TCGv_%s %s", bit_suffix, varid->var.name->str); - EMIT_HEAD(c, " =3D tcg_temp_local_new_%s();\n", bit_suffix); + EMIT_HEAD(c, " =3D tcg_temp_new_%s();\n", bit_suffix); g_array_append_val(c->inst.allocated, new_var); } =20 diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index fc3061a540..381fdaa3a8 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -539,7 +539,7 @@ void process_store(DisasContext *ctx, int slot_num) tcg_temp_free(cancelled); } { - TCGv address =3D tcg_temp_local_new(); + TCGv address =3D tcg_temp_new(); tcg_gen_mov_tl(address, hex_store_addr[slot_num]); =20 /* diff --git a/target/hexagon/README b/target/hexagon/README index 6cb5affddb..2e32639fb7 100644 --- a/target/hexagon/README +++ b/target/hexagon/README @@ -81,7 +81,7 @@ tcg_funcs_generated.c.inc Insn *insn, Packet *pkt) { - TCGv RdV =3D tcg_temp_local_new(); + TCGv RdV =3D tcg_temp_new(); const int RdN =3D insn->regno[0]; TCGv RsV =3D hex_gpr[insn->regno[1]]; TCGv RtV =3D hex_gpr[insn->regno[2]]; @@ -146,16 +146,16 @@ istruction. const int VdN =3D insn->regno[0]; const intptr_t VdV_off =3D ctx_future_vreg_off(ctx, VdN, 1, true); - TCGv_ptr VdV =3D tcg_temp_local_new_ptr(); + TCGv_ptr VdV =3D tcg_temp_new_ptr(); tcg_gen_addi_ptr(VdV, cpu_env, VdV_off); const int VuN =3D insn->regno[1]; const intptr_t VuV_off =3D vreg_src_off(ctx, VuN); - TCGv_ptr VuV =3D tcg_temp_local_new_ptr(); + TCGv_ptr VuV =3D tcg_temp_new_ptr(); const int VvN =3D insn->regno[2]; const intptr_t VvV_off =3D vreg_src_off(ctx, VvN); - TCGv_ptr VvV =3D tcg_temp_local_new_ptr(); + TCGv_ptr VvV =3D tcg_temp_new_ptr(); tcg_gen_addi_ptr(VuV, cpu_env, VuV_off); tcg_gen_addi_ptr(VvV, cpu_env, VvV_off); TCGv slot =3D tcg_constant_tl(insn->slot); diff --git a/target/hexagon/gen_tcg_funcs.py b/target/hexagon/gen_tcg_funcs= .py index 7e8ba17ca2..dfc90712fb 100755 --- a/target/hexagon/gen_tcg_funcs.py +++ b/target/hexagon/gen_tcg_funcs.py @@ -26,18 +26,14 @@ ## Helpers for gen_tcg_func ## def gen_decl_ea_tcg(f, tag): - if ('A_CONDEXEC' in hex_common.attribdict[tag] or - 'A_LOAD' in hex_common.attribdict[tag]): - f.write(" TCGv EA =3D tcg_temp_local_new();\n") - else: - f.write(" TCGv EA =3D tcg_temp_new();\n") + f.write(" TCGv EA =3D tcg_temp_new();\n") =20 def gen_free_ea_tcg(f): f.write(" tcg_temp_free(EA);\n") =20 def genptr_decl_pair_writable(f, tag, regtype, regid, regno): regN=3D"%s%sN" % (regtype,regid) - f.write(" TCGv_i64 %s%sV =3D tcg_temp_local_new_i64();\n" % \ + f.write(" TCGv_i64 %s%sV =3D tcg_temp_new_i64();\n" % \ (regtype, regid)) if (regtype =3D=3D "C"): f.write(" const int %s =3D insn->regno[%d] + HEX_REG_SA0;\n" % \ @@ -56,7 +52,7 @@ def genptr_decl_pair_writable(f, tag, regtype, regid, reg= no): =20 def genptr_decl_writable(f, tag, regtype, regid, regno): regN=3D"%s%sN" % (regtype,regid) - f.write(" TCGv %s%sV =3D tcg_temp_local_new();\n" % \ + f.write(" TCGv %s%sV =3D tcg_temp_new();\n" % \ (regtype, regid)) if (regtype =3D=3D "C"): f.write(" const int %s =3D insn->regno[%d] + HEX_REG_SA0;\n" % \ @@ -73,7 +69,7 @@ def genptr_decl(f, tag, regtype, regid, regno): regN=3D"%s%sN" % (regtype,regid) if (regtype =3D=3D "R"): if (regid in {"ss", "tt"}): - f.write(" TCGv_i64 %s%sV =3D tcg_temp_local_new_i64();\n" %= \ + f.write(" TCGv_i64 %s%sV =3D tcg_temp_new_i64();\n" % \ (regtype, regid)) f.write(" const int %s =3D insn->regno[%d];\n" % \ (regN, regno)) @@ -96,14 +92,14 @@ def genptr_decl(f, tag, regtype, regid, regno): print("Bad register parse: ", regtype, regid) elif (regtype =3D=3D "C"): if (regid =3D=3D "ss"): - f.write(" TCGv_i64 %s%sV =3D tcg_temp_local_new_i64();\n" %= \ + f.write(" TCGv_i64 %s%sV =3D tcg_temp_new_i64();\n" % \ (regtype, regid)) f.write(" const int %s =3D insn->regno[%d] + HEX_REG_SA0;\n= " % \ (regN, regno)) elif (regid =3D=3D "dd"): genptr_decl_pair_writable(f, tag, regtype, regid, regno) elif (regid =3D=3D "s"): - f.write(" TCGv %s%sV =3D tcg_temp_local_new();\n" % \ + f.write(" TCGv %s%sV =3D tcg_temp_new();\n" % \ (regtype, regid)) f.write(" const int %s%sN =3D insn->regno[%d] + HEX_REG_SA0= ;\n" % \ (regtype, regid, regno)) @@ -575,7 +571,7 @@ def genptr_dst_write_opn(f,regtype, regid, tag): ## We produce: ## static void generate_A2_add(DisasContext *ctx) ## { -## TCGv RdV =3D tcg_temp_local_new(); +## TCGv RdV =3D tcg_temp_new(); ## const int RdN =3D insn->regno[0]; ## TCGv RsV =3D hex_gpr[insn->regno[1]]; ## TCGv RtV =3D hex_gpr[insn->regno[2]]; --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477099; cv=none; d=zohomail.com; s=zohoarc; b=GEQAKVpzMUfh6T0fhj5GMNKt8fsrmXolrCeQ+Fwc9cQkFKyeqdg26PxcgZM3SHahr75CCKqCHERCXfRGSmbniLBX2PHrMP0/StzdzWPa5q0kKAga4Wqy0F2JqYnksgLx7dNDDL0f1PNOaBwVl/yD5nD8P4/sU7QX7lOIdEg+LlU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477099; h=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=rFzuw10fPpVdZT8YHItC/Ct7hZDecHi/kBTYhZQX5Yc=; b=cwR7yFPuHiWeIQtU8s0QMA+pftVoQRU3dbq5g9ryvUyeC3t53PQZA92x4sM7J98lKCEDySpA4n0SK2gwgXzBXUXLZ4kW9CZyk5rKY2BYoYGwfPAXoy9qRfoQ/+vq01FmJpPgqBwILDmbmxq6xr/neBFRDeBHGawDgpik05gnul8= 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+importer2=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 1677477099586206.27905489803584; Sun, 26 Feb 2023 21:51:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWER-0000Zm-Rx; Mon, 27 Feb 2023 00:39:27 -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 1pWWDG-0003Tp-Aj for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:19 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDC-000315-Py for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:13 -0500 Received: by mail-pf1-x444.google.com with SMTP id cp12so2040945pfb.5 for ; Sun, 26 Feb 2023 21:38:10 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=rFzuw10fPpVdZT8YHItC/Ct7hZDecHi/kBTYhZQX5Yc=; b=saUlNmAiPUlLxAbmr2ChMTkrmHqhis+3yd55SQnZO9n3SYyLn03AA3qsUukQ6XjLKi bN2xzDxLEM2/L3Lq/CtOYautj55z6KUKYrHpw15LxNV1WfBJmdAAATH+HmCdV7QK5t6u CJ4M5j5uHZuG577nzuxnx0yBnhWkNgpKQL68CAXUrBnWp0kbIVlXjrgNdjJYA3sU/7Pb 6/pqHKifXapmrhsZXzvLb7MtfumR//4fjfAUDE/Ojo9lEynyY8oLBJxavG6+r/PQMOaL vxjB0L1OxbmS6pwz0c+6anB5Ff8ECIxKdiNf9qqn6BxCdzSrg+BseC5P1DLpC4Ywhd9Y Cfhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rFzuw10fPpVdZT8YHItC/Ct7hZDecHi/kBTYhZQX5Yc=; b=xCxdmVXXgm2O3vkeJtcf2qEk85CJrOwHLqgu/+LHHW3OtQcnEGzD0sfptYR4CsUHHN niLnlCTj2GN817RHfC0DEzSeZqBRe+tP8skYGsGjeysA6mLGt5Ux7d0x4xu/TKPoymif CcC5xLq2ZJ6j9EH65T/RlQMdvfdhn2TFDYIndjJxf/hi5LL9faYDN1HvAGqyV970kSe/ L93VlcCHI2RXE6SWFHycT9ugXYfgd9PMK6lbMzl0Dl7LoeIPWw9ikUs8UuQEGuvIdBLL JUCDtzoftZ5kRjGnVPXFqcWb3NNEDi6AEtGdXts7mYY1hOnAREu5HnxOs7dip7u7BSqY i1bw== X-Gm-Message-State: AO0yUKWHPln/CFefASPDQ9/nxqOLbzKVTGsQpt7Rjus8YEI2vSiiXtBV x4BCSGuaY5UTHjhw1H3+g3xrdQNr+kqsp2Rwx8ltkQ== X-Google-Smtp-Source: AK7set9E3saBB4rhs8Y+GOHzaJYo5+8eXobzZvrrpsez8UJDdH67eDLLQEuiW12zFiUOA8ZtMn+BSg== X-Received: by 2002:aa7:98c3:0:b0:5a8:4ba7:5840 with SMTP id e3-20020aa798c3000000b005a84ba75840mr21645028pfm.26.1677476289091; Sun, 26 Feb 2023 21:38:09 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com Subject: [PATCH v4 23/31] target/hexagon/idef-parser: Drop gen_tmp_local Date: Sun, 26 Feb 2023 19:36:53 -1000 Message-Id: <20230227053701.368744-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-1-richard.henderson@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x444.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477101632100001 Content-Type: text/plain; charset="utf-8" This is now equivalent to gen_tmp. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/parser-helpers.c | 24 ++------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/i= def-parser/parser-helpers.c index dfb9c65b52..3025040640 100644 --- a/target/hexagon/idef-parser/parser-helpers.c +++ b/target/hexagon/idef-parser/parser-helpers.c @@ -307,26 +307,6 @@ HexValue gen_tmp(Context *c, return rvalue; } =20 -HexValue gen_tmp_local(Context *c, - YYLTYPE *locp, - unsigned bit_width, - HexSignedness signedness) -{ - HexValue rvalue; - assert(bit_width =3D=3D 32 || bit_width =3D=3D 64); - memset(&rvalue, 0, sizeof(HexValue)); - rvalue.type =3D TEMP; - rvalue.bit_width =3D bit_width; - rvalue.signedness =3D signedness; - rvalue.is_dotnew =3D false; - rvalue.is_manual =3D false; - rvalue.tmp.index =3D c->inst.tmp_count; - OUT(c, locp, "TCGv_i", &bit_width, " tmp_", &c->inst.tmp_count, - " =3D tcg_temp_new_i", &bit_width, "();\n"); - c->inst.tmp_count++; - return rvalue; -} - HexValue gen_tmp_value(Context *c, YYLTYPE *locp, const char *value, @@ -2161,8 +2141,8 @@ HexValue gen_rvalue_sat(Context *c, YYLTYPE *locp, He= xSat *sat, assert_signedness(c, locp, sat->signedness); =20 unsigned_str =3D (sat->signedness =3D=3D UNSIGNED) ? "u" : ""; - res =3D gen_tmp_local(c, locp, value->bit_width, sat->signedness); - ovfl =3D gen_tmp_local(c, locp, 32, sat->signedness); + res =3D gen_tmp(c, locp, value->bit_width, sat->signedness); + ovfl =3D gen_tmp(c, locp, 32, sat->signedness); OUT(c, locp, "gen_sat", unsigned_str, "_", bit_suffix, "_ovfl("); OUT(c, locp, &ovfl, ", ", &res, ", ", value, ", ", &width->imm.value, ");\n"); --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476772; cv=none; d=zohomail.com; s=zohoarc; b=iV3vN8iIXu+zqS75PXIV0Je9GXWU9uBhurCBIwZ7yL3omwlytrFBFsANQoAN8vqZ6RAPd8M6B964qS7n9AEp0ecAgzqFxtCmEbKRzPrJBxX9iFFJPjEG/ewBJ8Zn5UrQviskXpSA28gh0EOzjLj2moB3rf9/2A7gpmNpTlj8msI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476772; 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=2x/6xSpCKlYJ34/8OxjWcHuDhp8kikr1JE7fyXvIhlE=; b=JW8s05wrgELrlOHDLIE6uIletcjhexN9BpV6gUKGndi6w70eoueUuHl0CXf3YfQPw6ya9PJtsmsC0hJpCBPydpUvyNIaMm9f7LeHU+GVlphlaR9bHK3y8nahzG6OW6sOWuEgzUmNtSixnUqQv6NcjMlwI45qAcMPS1HoNzt0dZ8= 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+importer2=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 1677476772727656.5660181417106; Sun, 26 Feb 2023 21:46:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWEW-0001Q1-Rw; Mon, 27 Feb 2023 00:39: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 1pWWDL-0003YU-Lk for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:22 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDG-00032r-U6 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:18 -0500 Received: by mail-pf1-x435.google.com with SMTP id g12so2833658pfi.0 for ; Sun, 26 Feb 2023 21:38:12 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=2x/6xSpCKlYJ34/8OxjWcHuDhp8kikr1JE7fyXvIhlE=; b=hx4WLylA/qHlDu5kQdj1q9ukeWDj6boWQxzuqLWxHTPD0v7tbmSLymQx3gbFnBaVC2 dvtB+Ye1qIQp2J3dCH4MMJH9fwTl21r635hRtqHtrJyc50heVS/3yefF2ud4NUAHzpwP zwO/5P0212rBNhtelilOS8swj9WYl/yUVNAsQ6U0ai9dqL9ssKVzpzTbV2yjtqCoU00a DRK3z+r7XdE+3sN3lc9v3U3pyaaCBqOr76DX/eZtBM8oSTTFk07fhv9bv9FtePH8fe5e AaXOPM2X8aU3ohzS+odFo5yd52h6a08E2w/AOXru0H5PWxunfMkmeP800L1WkOolyFW9 6cMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=2x/6xSpCKlYJ34/8OxjWcHuDhp8kikr1JE7fyXvIhlE=; b=b6HWObRHreUVkjFPwevRpO76AZFXRnHJrLIl5keoIWvu88WRAzgrre+v9pCwI8Ol/y J38xxF3/OzR0guTHjP9ooefD7G/2UkNCoKj+5Akf69ULiICfiiMftlNpGT6ClKu0bda4 BUNJVCV+iytSM0K7mov6TEvs3usluQk17KKFm/3OYZwmJ8UvJGYkM3y3fYHcomKDahT+ y6TTafTUGb7j107LXpH9ZyTglhTfiZIqjQQqiwEJN32FwjtykCMRKJLEyp/ZFVCq42+G RFa9Y0ocJg4K1qMpG0FvF3ob7dPFb1+RtGIVQELOoAEDQ2Ax9lGPBr28+BeizYiOe4ap wu/Q== X-Gm-Message-State: AO0yUKXPiBgjBQhDvWNPMC6+8WNJi03+/zYfMIVDuz3bcxvVVgIVRGVa qaUFfJr0O1rs8rbNCzktWrugzTEFDAjfdg2deFw= X-Google-Smtp-Source: AK7set9rxs/5ZpTNOECH4vONmlxmnqBGjqNrEScaagfpTZSjMUyF3DvkFNaQwnXpkNHXdW9ATlAnFA== X-Received: by 2002:a62:7bce:0:b0:5ce:ef1b:a86 with SMTP id w197-20020a627bce000000b005ceef1b0a86mr16749443pfc.2.1677476291613; Sun, 26 Feb 2023 21:38:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 24/31] target/hppa: Don't use tcg_temp_local_new Date: Sun, 26 Feb 2023 19:36:54 -1000 Message-Id: <20230227053701.368744-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476773922100003 This wasn't actually used at all, just some unused macro re-definitions. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/hppa/translate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 0102cf451b..cee960949f 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -35,7 +35,6 @@ #undef TCGv #undef tcg_temp_new #undef tcg_global_mem_new -#undef tcg_temp_local_new #undef tcg_temp_free =20 #if TARGET_LONG_BITS =3D=3D 64 @@ -59,7 +58,6 @@ =20 #define tcg_temp_new tcg_temp_new_i64 #define tcg_global_mem_new tcg_global_mem_new_i64 -#define tcg_temp_local_new tcg_temp_local_new_i64 #define tcg_temp_free tcg_temp_free_i64 =20 #define tcg_gen_movi_reg tcg_gen_movi_i64 @@ -155,7 +153,6 @@ #define TCGv_reg TCGv_i32 #define tcg_temp_new tcg_temp_new_i32 #define tcg_global_mem_new tcg_global_mem_new_i32 -#define tcg_temp_local_new tcg_temp_local_new_i32 #define tcg_temp_free tcg_temp_free_i32 =20 #define tcg_gen_movi_reg tcg_gen_movi_i32 --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477249; cv=none; d=zohomail.com; s=zohoarc; b=mLcIT/jtYctczGdKCLGoBW93U62llv841rLctBbdeTc48K3k+BVETfnIxu8rj7t6NLgcKHVKrv1VlVwR1PKuHcQhxe7/Ti4GSTQe4I4e3wlWZXYwrgiKrvkzVm7gp3dRvPKRfTu7JBfLabRoAsb7o/LWNs/QhrbE4XkpsRBQfmE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477249; 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=xoCNCTfOA+IAeo+WWbY5Cg+uzKY+6Jpeq9pYOaVqoU4=; b=eIYBa8aE9xkA55EUuj9O+IWMYTw4LBY8El/vOmiQG/xxIr038+np69DmTzZ1gVu8V7uIvRF+RwTLRoMwSA61WcsWDia+xASNfIGPd0GQ3OMI36FKljtPSCpyCWGfSZHIGPyX9vMVe//t1XhHQoTs53o1RgkUxzw6rJjlVfCfBvA= 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+importer2=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 1677477249621355.36957207013006; Sun, 26 Feb 2023 21:54:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWEh-00027M-Ly; Mon, 27 Feb 2023 00:39:44 -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 1pWWDN-0003aL-Pc for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:23 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDL-00034K-8R for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:20 -0500 Received: by mail-pj1-x102e.google.com with SMTP id q31-20020a17090a17a200b0023750b69614so5023577pja.5 for ; Sun, 26 Feb 2023 21:38:15 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=xoCNCTfOA+IAeo+WWbY5Cg+uzKY+6Jpeq9pYOaVqoU4=; b=eEXeZYqryIO4esXcaeanL0vDPI8EPf5U9pNPhL7mKmQTize1Y+j2Gr3fnFCvlruJxr fSQamKMTNbOAcRvSv9nXNWdLZL0169oflr0r7HD9IU5u4D3PS3Lf5LN9QszPewDyXulZ gkTlRa8sRgPFL44QGgNIwHA4LsSurAZIpXPBdtETyIHRRXMkpE2/bqIyLUPGqT35slVF cfWpX0g9aBlChvHsfwnVFJuK7Kb9umXaqhF85SLiKvhItBvrkYZC1xJI66Z5ARIYvYKU NWXskdv5fIQhd05hcYu6ExyncAadrgbakyAvmcGKCe0hWT6R1tlGRxFCU2u8Z5E2RYmf +UXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=xoCNCTfOA+IAeo+WWbY5Cg+uzKY+6Jpeq9pYOaVqoU4=; b=f2dTzrHvITT0Hcc2hChfhd5kNMrkBeFLsWYlPTFrk8tsU+tfLbginG0qqqSJCY6ZBU rUaI3Mn9uFRYQ6mfoUwVD3HPnNmugbvMe2mx52tJTeKWiVjcoBVAZxtg3JXVohzxNLNF tuioS2VzRHAcFtrQ5JBXrFrGM09w0aQW0QYh5f20y+jbhhMZBAVLc/X9IBKetZajvX0Q xk9WWOo4Uze9A7jlYMoNqTkEC+INF4BhGjWSUtT69ubtTuuGFUNqRoyuA3Y7gpNPZFf7 ubH1hfy1nWgl7Pt7n2xiIAw8j4ku82v0CVCvAxyaEes0V/wXVTDbMi/wRZt3/YFM33m6 v2nQ== X-Gm-Message-State: AO0yUKUPiLwUnQE6vwVqwuWu+ADjCqMqPNhC8pWzyzyaLehqZ/DkcmTK YM+Knq7AGCZOqzrih1LTo+9H5rDlo1f9kOaWthA= X-Google-Smtp-Source: AK7set9z2fm9shIR7gpYhRF8SgjcXX35YWe+oZeXB0+2khqCH/BJUpkzgkx2hHS4ZeUmI3FzyXHe0Q== X-Received: by 2002:a05:6a20:8e06:b0:bc:8b91:69a3 with SMTP id y6-20020a056a208e0600b000bc8b9169a3mr19386293pzj.46.1677476294259; Sun, 26 Feb 2023 21:38:14 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 25/31] target/i386: Don't use tcg_temp_local_new Date: Sun, 26 Feb 2023 19:36:55 -1000 Message-Id: <20230227053701.368744-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477251181100007 Since tcg_temp_new is now identical, use that. In some cases we can avoid a copy from A0 or T0. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index a47d60f057..baf1cfc2bc 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -3426,13 +3426,10 @@ static bool disas_insn(DisasContext *s, CPUState *c= pu) if (mod =3D=3D 3) { goto illegal_op; } - a0 =3D tcg_temp_local_new(); - t0 =3D tcg_temp_local_new(); + a0 =3D s->A0; + t0 =3D s->T0; label1 =3D gen_new_label(); =20 - tcg_gen_mov_tl(a0, s->A0); - tcg_gen_mov_tl(t0, s->T0); - gen_set_label(label1); t1 =3D tcg_temp_new(); t2 =3D tcg_temp_new(); @@ -3444,9 +3441,7 @@ static bool disas_insn(DisasContext *s, CPUState *cpu) tcg_gen_brcond_tl(TCG_COND_NE, t0, t2, label1); =20 tcg_temp_free(t2); - tcg_temp_free(a0); tcg_gen_neg_tl(s->T0, t0); - tcg_temp_free(t0); } else { tcg_gen_neg_tl(s->T0, s->T0); if (mod !=3D 3) { @@ -6248,13 +6243,13 @@ static bool disas_insn(DisasContext *s, CPUState *c= pu) #endif { TCGLabel *label1; - TCGv t0, t1, t2, a0; + TCGv t0, t1, t2; =20 if (!PE(s) || VM86(s)) goto illegal_op; - t0 =3D tcg_temp_local_new(); - t1 =3D tcg_temp_local_new(); - t2 =3D tcg_temp_local_new(); + t0 =3D tcg_temp_new(); + t1 =3D tcg_temp_new(); + t2 =3D tcg_temp_new(); ot =3D MO_16; modrm =3D x86_ldub_code(env, s); reg =3D (modrm >> 3) & 7; @@ -6263,11 +6258,8 @@ static bool disas_insn(DisasContext *s, CPUState *cp= u) if (mod !=3D 3) { gen_lea_modrm(env, s, modrm); gen_op_ld_v(s, ot, t0, s->A0); - a0 =3D tcg_temp_local_new(); - tcg_gen_mov_tl(a0, s->A0); } else { gen_op_mov_v_reg(s, ot, t0, rm); - a0 =3D NULL; } gen_op_mov_v_reg(s, ot, t1, reg); tcg_gen_andi_tl(s->tmp0, t0, 3); @@ -6280,8 +6272,7 @@ static bool disas_insn(DisasContext *s, CPUState *cpu) tcg_gen_movi_tl(t2, CC_Z); gen_set_label(label1); if (mod !=3D 3) { - gen_op_st_v(s, ot, t0, a0); - tcg_temp_free(a0); + gen_op_st_v(s, ot, t0, s->A0); } else { gen_op_mov_reg_v(s, ot, rm, t0); } @@ -6304,7 +6295,7 @@ static bool disas_insn(DisasContext *s, CPUState *cpu) modrm =3D x86_ldub_code(env, s); reg =3D ((modrm >> 3) & 7) | REX_R(s); gen_ldst_modrm(env, s, modrm, MO_16, OR_TMP0, 0); - t0 =3D tcg_temp_local_new(); + t0 =3D tcg_temp_new(); gen_update_cc_op(s); if (b =3D=3D 0x102) { gen_helper_lar(t0, cpu_env, s->T0); @@ -7052,7 +7043,7 @@ static void i386_tr_init_disas_context(DisasContextBa= se *dcbase, CPUState *cpu) dc->tmp2_i32 =3D tcg_temp_new_i32(); dc->tmp3_i32 =3D tcg_temp_new_i32(); dc->tmp4 =3D tcg_temp_new(); - dc->cc_srcT =3D tcg_temp_local_new(); + dc->cc_srcT =3D tcg_temp_new(); } =20 static void i386_tr_tb_start(DisasContextBase *db, CPUState *cpu) --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477120; cv=none; d=zohomail.com; s=zohoarc; b=EKygNpM/8yun4EHt+EnRk47eRDq4ICB/V33zbm3w+HSu2y180CpPZZk1y0QHTaGgjiMzSOwlOYM+4AzP+yP2Rpa58430fvWyES+HRC+oLETJeLN2lJzkdMn87xKvleD5AEWyVy/GSF+qo5xPdTbafSNefdMtWUgYIYNhJauOXEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477120; 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=q9wHXNcMEZUrRMgfAcdIxce5Bu1q4nxsaHlTAC4B1OY=; b=EOg+1gFbi7ICgMj6qwFCLARs0eEsr2LAsnXU1wBWL0R0qQdjEluSfl3v5KK3ncpQRDA19mzkH18IUF7Finw7Dw9QqN4E4N5+FlmwillOccHTrRyiNvnzqlX9E5np7OYVKmTZO5L72nd4gPLZ/uPysyM2FfOyhbtZGUX6HqNDGLA= 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+importer2=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 1677477120427931.5209575333046; Sun, 26 Feb 2023 21:52:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWER-0000Zt-Ts; Mon, 27 Feb 2023 00:39:27 -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 1pWWDR-0003mB-V9 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:26 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDL-000350-AC for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:24 -0500 Received: by mail-pg1-x52f.google.com with SMTP id s17so2849948pgv.4 for ; Sun, 26 Feb 2023 21:38:17 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=q9wHXNcMEZUrRMgfAcdIxce5Bu1q4nxsaHlTAC4B1OY=; b=EhKJbBxkfjnURvGUl7bln4dtRg6tbtk5xv5/Z+hnTzLmpDyM3dZUfAVkOpmmlWsIk5 3wkM81bfPh1Y5TSFfPOl1ru8B6wmlZLTD8UteIEq1vsKh2FsjnxdzQ3JToDngA3DctyD YcYgigHR9515FJNTFJh8XNU8PIR+WmQBZcwX962JIZu0sj9S3wiPXmEKi1X/yuA8MxW9 1A1x2IJ2C6FceHX1vvKKdWvee/ImK9vTFhkKVYJQ7+yyw5HQn1unWQh4e3VcWBmsaw87 iR2+mWIWxG0dZd4o9YY2rWlG6Ljt5x8Jva43Pwlwsam9LRZvsEHqZfXrhh7UXllctzU3 OtHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=q9wHXNcMEZUrRMgfAcdIxce5Bu1q4nxsaHlTAC4B1OY=; b=I0ZHJb/QSOUUzJkvDNKM3/fYllIQSntss38sA4o2qNObe6HyRGqgsNLTUfReGX4EZe 209qt/kRLtujw2VxgVjsOey4XAiiXI6q6XcXfEjozf+cJzpgz4EWm/lawkSq6nkEzVc2 BcEKfoZg6mMCqETelo6/duJuVDXR6hqMoCPH4S+oHtltT0B/vdxdr/rFxSnNsc3Zg4uL injjkQMtRTXdwCJKfbvgG2vGa2oeINz+DZ509d2iNW1WJiITRGOH77DZ6JPvsbfLrcZt 9bzbYMT5VfLXLKgCYsy8yumeOe72ghksH1lwuUgSGMRthzChj/hHo/U66L92Fj7vvmfe ekJw== X-Gm-Message-State: AO0yUKX+ElLqj2wDnPnSkxQTGe4Jfeotd8rREJba6BQscTG51pKflqgQ zUJIcixPtEWkp3bFGgNcD16wDm96xiiJGWeObXs= X-Google-Smtp-Source: AK7set84qnXwIRwJ+L/A1THi+y4q3XgHWiGWt3Mlyz//rLtjOUG+biaztaKcATRui/flw+bdOL/9Tg== X-Received: by 2002:a05:6a00:2195:b0:5a8:445d:d352 with SMTP id h21-20020a056a00219500b005a8445dd352mr8665480pfi.11.1677476296853; Sun, 26 Feb 2023 21:38:16 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 26/31] target/mips: Don't use tcg_temp_local_new Date: Sun, 26 Feb 2023 19:36:56 -1000 Message-Id: <20230227053701.368744-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477121728100003 Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 57 ++++++------------------ target/mips/tcg/nanomips_translate.c.inc | 4 +- 2 files changed, 16 insertions(+), 45 deletions(-) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index bd70fcad25..8cad3d15a0 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -2400,7 +2400,7 @@ static void gen_arith_imm(DisasContext *ctx, uint32_t= opc, switch (opc) { case OPC_ADDI: { - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); TCGv t1 =3D tcg_temp_new(); TCGv t2 =3D tcg_temp_new(); TCGLabel *l1 =3D gen_new_label(); @@ -2434,7 +2434,7 @@ static void gen_arith_imm(DisasContext *ctx, uint32_t= opc, #if defined(TARGET_MIPS64) case OPC_DADDI: { - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); TCGv t1 =3D tcg_temp_new(); TCGv t2 =3D tcg_temp_new(); TCGLabel *l1 =3D gen_new_label(); @@ -2630,7 +2630,7 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, switch (opc) { case OPC_ADD: { - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); TCGv t1 =3D tcg_temp_new(); TCGv t2 =3D tcg_temp_new(); TCGLabel *l1 =3D gen_new_label(); @@ -2666,7 +2666,7 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, break; case OPC_SUB: { - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); TCGv t1 =3D tcg_temp_new(); TCGv t2 =3D tcg_temp_new(); TCGLabel *l1 =3D gen_new_label(); @@ -2707,7 +2707,7 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, #if defined(TARGET_MIPS64) case OPC_DADD: { - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); TCGv t1 =3D tcg_temp_new(); TCGv t2 =3D tcg_temp_new(); TCGLabel *l1 =3D gen_new_label(); @@ -2741,7 +2741,7 @@ static void gen_arith(DisasContext *ctx, uint32_t opc, break; case OPC_DSUB: { - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); TCGv t1 =3D tcg_temp_new(); TCGv t2 =3D tcg_temp_new(); TCGLabel *l1 =3D gen_new_label(); @@ -3759,26 +3759,8 @@ static void gen_loongson_integer(DisasContext *ctx, = uint32_t opc, return; } =20 - switch (opc) { - case OPC_MULT_G_2E: - case OPC_MULT_G_2F: - case OPC_MULTU_G_2E: - case OPC_MULTU_G_2F: -#if defined(TARGET_MIPS64) - case OPC_DMULT_G_2E: - case OPC_DMULT_G_2F: - case OPC_DMULTU_G_2E: - case OPC_DMULTU_G_2F: -#endif - t0 =3D tcg_temp_new(); - t1 =3D tcg_temp_new(); - break; - default: - t0 =3D tcg_temp_local_new(); - t1 =3D tcg_temp_local_new(); - break; - } - + t0 =3D tcg_temp_new(); + t1 =3D tcg_temp_new(); gen_load_gpr(t0, rs); gen_load_gpr(t1, rt); =20 @@ -3955,21 +3937,10 @@ static void gen_loongson_multimedia(DisasContext *c= tx, int rd, int rs, int rt) TCGCond cond; =20 opc =3D MASK_LMMI(ctx->opcode); - switch (opc) { - case OPC_ADD_CP2: - case OPC_SUB_CP2: - case OPC_DADD_CP2: - case OPC_DSUB_CP2: - t0 =3D tcg_temp_local_new_i64(); - t1 =3D tcg_temp_local_new_i64(); - break; - default: - t0 =3D tcg_temp_new_i64(); - t1 =3D tcg_temp_new_i64(); - break; - } - check_cp1_enabled(ctx); + + t0 =3D tcg_temp_new_i64(); + t1 =3D tcg_temp_new_i64(); gen_load_fpr64(ctx, t0, rs); gen_load_fpr64(ctx, t1, rt); =20 @@ -8650,7 +8621,7 @@ static void gen_mftr(CPUMIPSState *env, DisasContext = *ctx, int rt, int rd, int u, int sel, int h) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); =20 if ((env->CP0_VPEConf0 & (1 << CP0VPEC0_MVP)) =3D=3D 0 && ((env->tcs[other_tc].CP0_TCBind & (0xf << CP0TCBd_CurVPE)) !=3D @@ -8878,7 +8849,7 @@ static void gen_mttr(CPUMIPSState *env, DisasContext = *ctx, int rd, int rt, int u, int sel, int h) { int other_tc =3D env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); =20 gen_load_gpr(t0, rt); if ((env->CP0_VPEConf0 & (1 << CP0VPEC0_MVP)) =3D=3D 0 && @@ -11409,7 +11380,7 @@ static void gen_flt3_arith(DisasContext *ctx, uint3= 2_t opc, case OPC_ALNV_PS: check_ps(ctx); { - TCGv t0 =3D tcg_temp_local_new(); + TCGv t0 =3D tcg_temp_new(); TCGv_i32 fp =3D tcg_temp_new_i32(); TCGv_i32 fph =3D tcg_temp_new_i32(); TCGLabel *l1 =3D gen_new_label(); diff --git a/target/mips/tcg/nanomips_translate.c.inc b/target/mips/tcg/nan= omips_translate.c.inc index 812c111e3c..faf6d679bd 100644 --- a/target/mips/tcg/nanomips_translate.c.inc +++ b/target/mips/tcg/nanomips_translate.c.inc @@ -1017,8 +1017,8 @@ static void gen_llwp(DisasContext *ctx, uint32_t base= , int16_t offset, static void gen_scwp(DisasContext *ctx, uint32_t base, int16_t offset, uint32_t reg1, uint32_t reg2, bool eva) { - TCGv taddr =3D tcg_temp_local_new(); - TCGv lladdr =3D tcg_temp_local_new(); + TCGv taddr =3D tcg_temp_new(); + TCGv lladdr =3D tcg_temp_new(); TCGv_i64 tval =3D tcg_temp_new_i64(); TCGv_i64 llval =3D tcg_temp_new_i64(); TCGv_i64 val =3D tcg_temp_new_i64(); --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477134; cv=none; d=zohomail.com; s=zohoarc; b=NNGH9BBCG25k/ZgKLxb9c/j6dF2NPxamnKU2qtub6GBv1A95mi8//s/jJ3kZvM5qjlGTvndsVhCab3XMO8wHyfX+MVH+ldx1uKWhxozjHwYxKQyiYAj5Hj4EdbqYkyP3rE2tIknCNgRcKxag8iDdeOt7q3sqCDg58fbjGltBllQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477134; 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=18JmFlWEdnV+s8Kjewsq0ZcZnDUj7UiObvsTbLqqvwo=; b=GklfYrVpxxdZTzi1hB4uRxz5aZysDlryAX4AKur1p3c7jLkxRpQEP1jVRgNUTmZ4ovv3d5wTNMssxh7bqsCrim1aAoTTwa0cLjq8hd4cNkLLGO20NYRzorDMLH6tu/wu1AeMRH0Ry72XyU6SU6WxCNPFg+FmiCwEDMVEKqxIjhc= 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+importer2=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 1677477134593995.9875102621323; Sun, 26 Feb 2023 21:52:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWFV-0004fc-ID; Mon, 27 Feb 2023 00:40:33 -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 1pWWDS-0003mP-2A for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:28 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDN-00032r-57 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:24 -0500 Received: by mail-pf1-x435.google.com with SMTP id g12so2833799pfi.0 for ; Sun, 26 Feb 2023 21:38:19 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=18JmFlWEdnV+s8Kjewsq0ZcZnDUj7UiObvsTbLqqvwo=; b=nKhf73df0jSurL3IRj8qoqKAuIjblaKOEdGfsr97j679eUg38Gef6+xIHPUFFjVAik J67oZM4Hhii5vR1AUGM6Uon6Qnzbach33jYxa3k0wv6VIxKtPUi/Q1fUlADYkfdVLLOU 68uqqTuCIGnGhfMD+d9CloS1VeRkHByuNfvOAGw+spv0b/5hwM/nTlS/qJ/RBCH02K+W leKue1HgxG9ndePCmsyU13P7+X+xLEBXZtnBSJhVulXQu/APSrVGqeIiYzGWCY27nTUr R7TtypmYD6ilFCMX3cjFZZ1L1fZfdoeU3E0yuhF+ciAUii/BAH5pi1vUsKZXaWiAyg27 dKBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=18JmFlWEdnV+s8Kjewsq0ZcZnDUj7UiObvsTbLqqvwo=; b=Qd0CHWuny45p85FQ1X3rrYDWezCTNBqYR90cdBTgIHzVI1fvT/ZOR8AHIlhZkmraWL h6DAMsN61Y6l/QScKrzQ/1INpj7kThRN5jZvU5MAulLgL2qWnT0r2oKmg1qDrzOBEKKj kQB8haokg4Qoo1PbiUxjbMV2yF2R0ZaEH5F8A0DLWB5mP7pVhsyRQzIRlGhzNwbJC2JW prUwX658ERQ1C962m+bCIFoK3ZURBd7oRIBgD/qkbUpc9+zUysAnbqKaYhwmia48zxJ0 4u2uZ8zf1VJYuNGFe9DrQYGRHgBZHLuEDFg0c4NhpZjd74x7J2eSPhx2MNPi+EaHD3/P r2jg== X-Gm-Message-State: AO0yUKXklkuNWjWtanZJ9yXuP1iP5dy5WDm72gnRvws4Yo4O/fjKATzY /RN3XipMpEhz5/J6371qVsQQZzCPj2Ug0IrvfKE= X-Google-Smtp-Source: AK7set+Y2UXWQS1BWSdGx5t/xLlYU2Us3PDJJDKnej/j8VU/Rc9PLuUH9CV7COsmVpvcowviWJ0TPw== X-Received: by 2002:a62:3841:0:b0:5a9:c55b:2cae with SMTP id f62-20020a623841000000b005a9c55b2caemr20329570pfa.31.1677476299373; Sun, 26 Feb 2023 21:38:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 27/31] target/ppc: Don't use tcg_temp_local_new Date: Sun, 26 Feb 2023 19:36:57 -1000 Message-Id: <20230227053701.368744-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477135833100007 Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/ppc/translate.c | 6 +++--- target/ppc/translate/spe-impl.c.inc | 8 ++++---- target/ppc/translate/vmx-impl.c.inc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 5fe6aa641e..2956021e89 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4415,7 +4415,7 @@ static void gen_bcond(DisasContext *ctx, int type) TCGv target; =20 if (type =3D=3D BCOND_LR || type =3D=3D BCOND_CTR || type =3D=3D BCOND= _TAR) { - target =3D tcg_temp_local_new(); + target =3D tcg_temp_new(); if (type =3D=3D BCOND_CTR) { tcg_gen_mov_tl(target, cpu_ctr); } else if (type =3D=3D BCOND_TAR) { @@ -5594,8 +5594,8 @@ static inline void gen_405_mulladd_insn(DisasContext = *ctx, int opc2, int opc3, { TCGv t0, t1; =20 - t0 =3D tcg_temp_local_new(); - t1 =3D tcg_temp_local_new(); + t0 =3D tcg_temp_new(); + t1 =3D tcg_temp_new(); =20 switch (opc3 & 0x0D) { case 0x05: diff --git a/target/ppc/translate/spe-impl.c.inc b/target/ppc/translate/spe= -impl.c.inc index 2e6e799a25..bd8963db2b 100644 --- a/target/ppc/translate/spe-impl.c.inc +++ b/target/ppc/translate/spe-impl.c.inc @@ -168,7 +168,7 @@ static inline void gen_op_evsrwu(TCGv_i32 ret, TCGv_i32= arg1, TCGv_i32 arg2) { TCGLabel *l1 =3D gen_new_label(); TCGLabel *l2 =3D gen_new_label(); - TCGv_i32 t0 =3D tcg_temp_local_new_i32(); + TCGv_i32 t0 =3D tcg_temp_new_i32(); =20 /* No error here: 6 bits are used */ tcg_gen_andi_i32(t0, arg2, 0x3F); @@ -185,7 +185,7 @@ static inline void gen_op_evsrws(TCGv_i32 ret, TCGv_i32= arg1, TCGv_i32 arg2) { TCGLabel *l1 =3D gen_new_label(); TCGLabel *l2 =3D gen_new_label(); - TCGv_i32 t0 =3D tcg_temp_local_new_i32(); + TCGv_i32 t0 =3D tcg_temp_new_i32(); =20 /* No error here: 6 bits are used */ tcg_gen_andi_i32(t0, arg2, 0x3F); @@ -202,7 +202,7 @@ static inline void gen_op_evslw(TCGv_i32 ret, TCGv_i32 = arg1, TCGv_i32 arg2) { TCGLabel *l1 =3D gen_new_label(); TCGLabel *l2 =3D gen_new_label(); - TCGv_i32 t0 =3D tcg_temp_local_new_i32(); + TCGv_i32 t0 =3D tcg_temp_new_i32(); =20 /* No error here: 6 bits are used */ tcg_gen_andi_i32(t0, arg2, 0x3F); @@ -378,7 +378,7 @@ static inline void gen_evsel(DisasContext *ctx) TCGLabel *l2 =3D gen_new_label(); TCGLabel *l3 =3D gen_new_label(); TCGLabel *l4 =3D gen_new_label(); - TCGv_i32 t0 =3D tcg_temp_local_new_i32(); + TCGv_i32 t0 =3D tcg_temp_new_i32(); =20 tcg_gen_andi_i32(t0, cpu_crf[ctx->opcode & 0x07], 1 << 3); tcg_gen_brcondi_i32(TCG_COND_EQ, t0, 0, l1); diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx= -impl.c.inc index 7741f2eb49..2dd17ab106 100644 --- a/target/ppc/translate/vmx-impl.c.inc +++ b/target/ppc/translate/vmx-impl.c.inc @@ -1508,8 +1508,8 @@ static bool do_vcmpq(DisasContext *ctx, arg_VX_bf *a,= bool sign) REQUIRE_INSNS_FLAGS2(ctx, ISA310); REQUIRE_VECTOR(ctx); =20 - vra =3D tcg_temp_local_new_i64(); - vrb =3D tcg_temp_local_new_i64(); + vra =3D tcg_temp_new_i64(); + vrb =3D tcg_temp_new_i64(); gt =3D gen_new_label(); lt =3D gen_new_label(); done =3D gen_new_label(); --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477192; cv=none; d=zohomail.com; s=zohoarc; b=Y99zq7px30n8zFAHYD4lx9tWlinpD6EHfigiNUyT4sdwq8V9pIkYN+jyIDkEInwpY6LGOfqgocChmRruRrH6UDtVQ3zinoYB2WWS7iuBnRQtlcdcrRcBqktDveZa3sjCKF1/pixUIYrzPjHG5qGyk5DfXpRsRRU0eIUBjJur4Kc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477192; 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=DKCOLyI/wsJHJKYRWjsEmHI6WWtv0JONwA4WRgdn8Pc=; b=lbaoMouiMU+zYUQ5FpV9WA/6UQVLSjSWX3hingzsznvQE7mNej5840AYZj/qiatX0BbW/+m0AeAVek831UgbkptI0ZS43exMkcAyqy8ymD+Is+JLRbqhrg3saVdydOrBGkbRHYPnygCYPI1sIWyOvQSuLewWhdfwSSSw5ETXn6Y= 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+importer2=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 1677477192461888.8108067333029; Sun, 26 Feb 2023 21:53:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWEt-0003Dk-TT; Mon, 27 Feb 2023 00:39:56 -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 1pWWDU-0003sp-Hl for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:28 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDP-00037g-CX for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:27 -0500 Received: by mail-pf1-x435.google.com with SMTP id ce7so2782677pfb.9 for ; Sun, 26 Feb 2023 21:38:22 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=DKCOLyI/wsJHJKYRWjsEmHI6WWtv0JONwA4WRgdn8Pc=; b=KAmnNQYG7oo7HRbzLj7ZekprHiufPjxwwQEE07L82SEACBph3bvEseJA0yQ+M91w8M Lr01udLhLA0x9CEqn+e2thM8jFPv73np9/YMsYrrTxdltAurbKD7AU9YztRe9gNGwuFb mGXt2GsKFQhinMMiXM70imU4uGc9YklIcSu212TzjJ2YQHAMeoXwt8UZx0RBoi1p6v0S ++Cb7rJCJ0PU7NjxYDPvcQLthlkAWHZkcoHOI854Vh+l9dGXeeNKKXFjDwUQsWMYbMBS zixEX+fU9pVCC9DMUAaWliSAQLHKQHVzl62IYp1RdSTkBNtYgHBOq/YetKzCTJPnMD9h cLtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=DKCOLyI/wsJHJKYRWjsEmHI6WWtv0JONwA4WRgdn8Pc=; b=M04bFfV+gdb2BWm7qkSgY8yUdZ3OU7KVU2J1Dh2r0frmHKGwnBYFBSY5VBnZgthtBV MJopxAO4eSppI/61Ze1jD42NO6WgEMof9W9Zu/gIaCCBY41rT4tq8vqHmctxBiH7PhAA 4SJLRU2aHBxfsN8es+gFyKQ/GN1Swcc5Plhfh//IO5h0BINL+PXiiovfgQNBwSdW53e8 yMmCVlQgL2WMa2rrUQAPRZRnxL/k9YJPtJf0Xo93hwXWYOdQkaFa3gqBKyrA0Wuw00DC pbXsl4puYugFiS86RDRU/j39RwaxDQZxQXyztNdGdwV6xB90fTum6pv1hiTS5enuLpN1 CEzQ== X-Gm-Message-State: AO0yUKWv8Hn4MdfFF3slg6L+4CaxBDm8jfM/1FQ824GXL6HjH0brdYx4 6E2owsGnYxSeukmhr+qFhirh2DxsZDbfjRnXjbA= X-Google-Smtp-Source: AK7set/VQW/UIUnnzxbnxGuTQdK1wnyYqNyN06sJdhIAhsJYrFThJe5/jvRPS3Xnc6UybcZd/awnDw== X-Received: by 2002:a05:6a00:1:b0:5e1:f4e3:57d4 with SMTP id h1-20020a056a00000100b005e1f4e357d4mr9472495pfk.17.1677476301994; Sun, 26 Feb 2023 21:38:21 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 28/31] target/xtensa: Don't use tcg_temp_local_new_* Date: Sun, 26 Feb 2023 19:36:58 -1000 Message-Id: <20230227053701.368744-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477193763100003 Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 8d7bf566de..4af0650deb 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -307,7 +307,7 @@ static void gen_right_shift_sar(DisasContext *dc, TCGv_= i32 sa) static void gen_left_shift_sar(DisasContext *dc, TCGv_i32 sa) { if (!dc->sar_m32_allocated) { - dc->sar_m32 =3D tcg_temp_local_new_i32(); + dc->sar_m32 =3D tcg_temp_new_i32(); dc->sar_m32_allocated =3D true; } tcg_gen_andi_i32(dc->sar_m32, sa, 0x1f); @@ -1074,10 +1074,10 @@ static void disas_xtensa_insn(CPUXtensaState *env, = DisasContext *dc) if (i =3D=3D 0 || arg_copy[i].resource !=3D resource) { resource =3D arg_copy[i].resource; if (arg_copy[i].arg->num_bits <=3D 32) { - temp =3D tcg_temp_local_new_i32(); + temp =3D tcg_temp_new_i32(); tcg_gen_mov_i32(temp, arg_copy[i].arg->in); } else if (arg_copy[i].arg->num_bits <=3D 64) { - temp =3D tcg_temp_local_new_i64(); + temp =3D tcg_temp_new_i64(); tcg_gen_mov_i64(temp, arg_copy[i].arg->in); } else { g_assert_not_reached(); @@ -1187,7 +1187,7 @@ static void xtensa_tr_tb_start(DisasContextBase *dcba= se, CPUState *cpu) DisasContext *dc =3D container_of(dcbase, DisasContext, base); =20 if (dc->icount) { - dc->next_icount =3D tcg_temp_local_new_i32(); + dc->next_icount =3D tcg_temp_new_i32(); } } =20 @@ -2273,8 +2273,8 @@ static void gen_check_atomctl(DisasContext *dc, TCGv_= i32 addr) static void translate_s32c1i(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - TCGv_i32 tmp =3D tcg_temp_local_new_i32(); - TCGv_i32 addr =3D tcg_temp_local_new_i32(); + TCGv_i32 tmp =3D tcg_temp_new_i32(); + TCGv_i32 addr =3D tcg_temp_new_i32(); MemOp mop; =20 tcg_gen_mov_i32(tmp, arg[0].in); @@ -2303,8 +2303,8 @@ static void translate_s32ex(DisasContext *dc, const O= pcodeArg arg[], const uint32_t par[]) { TCGv_i32 prev =3D tcg_temp_new_i32(); - TCGv_i32 addr =3D tcg_temp_local_new_i32(); - TCGv_i32 res =3D tcg_temp_local_new_i32(); + TCGv_i32 addr =3D tcg_temp_new_i32(); + TCGv_i32 res =3D tcg_temp_new_i32(); TCGLabel *label =3D gen_new_label(); MemOp mop; =20 --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677477163; cv=none; d=zohomail.com; s=zohoarc; b=BcbBMaPKz4MIyZev3nbdEcqMz9e6VShhkagF+21mhB5bEUKm+mXgEuR5qkNlfeZ9KkuvCipGXtfBzX1aZylTl01yVoJ7OT+WY5zYDrcttbwVRtzZdRmTw0wMN4QK6uEZYUacyQ0LzV83yhCpgcwT9STpbVIFo3LSx9/O/FYO1EU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677477163; 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=sFtLskBtXQJv7dvYWKC68zyT6F+160XUCfsOjHVKspM=; b=F8NSDKiBgWt5WBOFbTquor8Ol6JigeiGpJwBzIlB1+Ek70n6QHdMMD/9WIYMXHIwKJ/RB9xi9rmfcgcl8F83joNiThCPKpd7/7CR1zGicG10RInywA04qHuGU7VmPvEIS0lBrsZrjmvDwpllvH3RoXTShgEA37HNegwhTj+/doQ= 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+importer2=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 1677477163202963.9746821474074; Sun, 26 Feb 2023 21:52:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWFV-0004di-B8; Mon, 27 Feb 2023 00:40:33 -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 1pWWDV-00042u-MV for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:30 -0500 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDS-00038h-2D for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:29 -0500 Received: by mail-pg1-x52c.google.com with SMTP id s18so2856826pgq.1 for ; Sun, 26 Feb 2023 21:38:25 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=sFtLskBtXQJv7dvYWKC68zyT6F+160XUCfsOjHVKspM=; b=uxkyGAqaf12UHiHxe3ytgXuVwauNSoeV73dDe/22eNUs07Acfbr404tGEIUEUQjGUn t/qGcJKeCZhu5S45SKD/pZ6M4GNAS/tnxaqq963ch68wJSv3t6R0dukh72teYLYxjg+Q FqFchbIX0LpcYy0S7SNiPt71AULxsN3mLdtSx/DqAygVsZoIQR5JJlXRJOM12aBe35hv Au0uiwaxc4RQnp8e+d1EoUfJzFuO6eUQUNKni7LyeM2psYWZG6by/r3PkPw4DBsQ7pgv Sr9hYIiBriB8iW218B5IUlHVfrxKJ3sjQwvlcebm/+9RKBh5CbxoQGhANOJ9FAhkWlFN JnSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=sFtLskBtXQJv7dvYWKC68zyT6F+160XUCfsOjHVKspM=; b=EB/yGYTi5RvULJen6XBiTGQx6I0PDEMIHZQkuUqy0+lfsuTDUTyLmx6qZchld50itL rgvJIGINhONlYkek3qtZmNeXoQxTj1QxpHJalRLmR5HSLWWSz6rBHUmXThwNUj6x7vQ8 mauri65UKsNHgVz09NCBsfqcLb9WiPdqCTNGKfOmug4gqn//73b1/keXxCNqSK5pt4F6 48u/qvnDSNvcigV5pHZi4CMeQTe66qIgV2v+fHN4LWHalwaCBiu5Alw9x8O0JFLsbURF ziuwr2iuMkvQafo7F74p+Gliwpm3aISMoJPYvK+BB4HRQY+Yof0s23WmxF8yjv+OPTPX Z6dg== X-Gm-Message-State: AO0yUKVuZDUS/cjD/LQZ2FOHNcVGN9uaxcmMBApT4I2kGheNMsExG/T/ kJ9tUOslW12ogxzC87PehhogMPiGR5mmiSBwxTA= X-Google-Smtp-Source: AK7set/1gCW3n8mOXezHmixcne4QEMrLyFAZVq6meEFSJGUgKNzrSwddhx/Xy/q5F72lEpmlsmI7bw== X-Received: by 2002:aa7:9e1b:0:b0:5a8:8535:18b with SMTP id y27-20020aa79e1b000000b005a88535018bmr20937619pfq.11.1677476304392; Sun, 26 Feb 2023 21:38:24 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 29/31] exec/gen-icount: Don't use tcg_temp_local_new_i32 Date: Sun, 26 Feb 2023 19:36:59 -1000 Message-Id: <20230227053701.368744-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677477164686100003 Since tcg_temp_new_i32 is now identical, use that. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 4d8b1f9ae5..733a2fb228 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -17,13 +17,7 @@ static inline void gen_io_start(void) =20 static inline void gen_tb_start(const TranslationBlock *tb) { - TCGv_i32 count; - - if (tb_cflags(tb) & CF_USE_ICOUNT) { - count =3D tcg_temp_local_new_i32(); - } else { - count =3D tcg_temp_new_i32(); - } + TCGv_i32 count =3D tcg_temp_new_i32(); =20 tcg_gen_ld_i32(count, cpu_env, offsetof(ArchCPU, neg.icount_decr.u32) - --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677476934; cv=none; d=zohomail.com; s=zohoarc; b=MwRrUD0pziEfs8+KunzoY9YffoK1kXiF/yjbuwtckoMyCvAKs3HY5FIofnLLNVt4to1ZHCp7weXoSXWSCFcU4LVi9svfAEYxAQ6GsbuVhrDxU3sQkoY6pHSGgHK6NSYiYIpvIbW+AD/+ij9gkiLhSg+v2EcpwRQ7mwnkLq4O+AI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677476934; 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=muKWZigrTG0gZJODOQUV3tX7j3/M0bbzqhpHMPJfkYo=; b=NW3lkY3GmXu10G1rc/v2QrVolcJHfRuAL5gKis8F0S0sBAqiLY5L4dkul04L66soq7Veyq7oy1i22ZXT5fKRAzzyu+KUE64noSsAd5Gn2wlaJ/Rh9ivpDua+6fT8Hj9NBWXkFmOkBixV2Int9JfGaWS71NixCrvdgB36Fg38pYw= 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+importer2=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 1677476934619479.9339068689317; Sun, 26 Feb 2023 21:48:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWFW-0004sk-Uc; Mon, 27 Feb 2023 00:40:35 -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 1pWWDX-0004IL-UF for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:32 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDU-0003AZ-7E for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:31 -0500 Received: by mail-pl1-x631.google.com with SMTP id u5so2149073plq.7 for ; Sun, 26 Feb 2023 21:38:27 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=muKWZigrTG0gZJODOQUV3tX7j3/M0bbzqhpHMPJfkYo=; b=Xyt2k5Ud8eiGrcvqCwysPkVoeyDvBNW4qJpXU+br2EzibIoVBJ2Yqu24dH4NMfCkGK PgAXe2EAfxemCQ4TnoNTl7zgTEnyOo1MnpJ88B9wptJPKK2YhUZrqHKVafXYQ+39qN2p GFg5oW4chwgKYzbcPY6F6OGmqpqJh/XOIaqJYf/QFjqzzAiDDFnq+0JvJxP/edpm/8j6 i7YKQEDNBHMuyuPGr/o148tOAoKHi9+soy4DRTb7Y3Bob6qCxFz+1RvPnK31JEfrHRaW 3h0+2Gsh62ZQHpjCz1MaJ9NJjubpT4FQJzOP+3wlZh7y6Hm37SqZ2baVJ5sKlHcBGGTz QCXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=muKWZigrTG0gZJODOQUV3tX7j3/M0bbzqhpHMPJfkYo=; b=a6clFAfprfFqS+cgig9iDXM/jpjgWbuN3ONSh7FSStfpquA3ZS0hNEwi0Xyx2LKSzQ wBlOJ1T9B/fAgP1ewN6ZyUSXtqRN8mIOlRmnugvJmj19wWu8hbNgXShwDeE5Pspeh97B N4XRf2VnveuSg39v/zZqpWkV8NvlteWm07dPByOiE3RWELsBFUMcebP5PXVbT1cGUwUS jpX8Y95MAXvsfS8dcNUdhIxukKeDd5diw0GLGQfANEN85/t1+E1qvRvRLMm8i6MAy+wE +YfH0pkNGdGsrhpYdVR+q73ioRfKafWCnPMpWDOWBiSSbuw9u/UCpx9cWryOidH3mFGC 6m2g== X-Gm-Message-State: AO0yUKUVj3eaPqHl60m7lKKKpJGkWJ9Eor11y0cLwK5V0fVAn77VPic+ 9CpEMKCJr2sPRZ0lk+1wCclA4dg0Hccn2865AtA= X-Google-Smtp-Source: AK7set9/dZfAt+PbcViu83yXnTSbOulqyWT5/3CDn5n65w9+/OiFuS0fZgVCU497F5yi8Xr7dYbX4A== X-Received: by 2002:a05:6a20:160a:b0:b8:a0e1:2739 with SMTP id l10-20020a056a20160a00b000b8a0e12739mr29438519pzj.3.1677476306870; Sun, 26 Feb 2023 21:38:26 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 30/31] tcg: Remove tcg_temp_local_new_*, tcg_const_local_* Date: Sun, 26 Feb 2023 19:37:00 -1000 Message-Id: <20230227053701.368744-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FUZZY_BITCOIN=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677476936837100003 These symbols are now unused. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 2 -- include/tcg/tcg.h | 28 ---------------------------- tcg/tcg.c | 16 ---------------- 3 files changed, 46 deletions(-) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 66b1461caa..353d430a63 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -828,14 +828,12 @@ static inline void tcg_gen_plugin_cb_end(void) #if TARGET_LONG_BITS =3D=3D 32 #define tcg_temp_new() tcg_temp_new_i32() #define tcg_global_mem_new tcg_global_mem_new_i32 -#define tcg_temp_local_new() tcg_temp_local_new_i32() #define tcg_temp_free tcg_temp_free_i32 #define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i32 #define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i32 #else #define tcg_temp_new() tcg_temp_new_i64() #define tcg_global_mem_new tcg_global_mem_new_i64 -#define tcg_temp_local_new() tcg_temp_local_new_i64() #define tcg_temp_free tcg_temp_free_i64 #define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i64 #define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i64 diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 2e220d4040..7e2b954dbc 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -905,12 +905,6 @@ static inline TCGv_i32 tcg_temp_new_i32(void) return temp_tcgv_i32(t); } =20 -static inline TCGv_i32 tcg_temp_local_new_i32(void) -{ - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I32, TEMP_TB); - return temp_tcgv_i32(t); -} - static inline TCGv_i64 tcg_global_mem_new_i64(TCGv_ptr reg, intptr_t offse= t, const char *name) { @@ -931,12 +925,6 @@ static inline TCGv_i64 tcg_temp_new_i64(void) return temp_tcgv_i64(t); } =20 -static inline TCGv_i64 tcg_temp_local_new_i64(void) -{ - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I64, TEMP_TB); - return temp_tcgv_i64(t); -} - /* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ static inline TCGv_i128 tcg_temp_ebb_new_i128(void) { @@ -950,12 +938,6 @@ static inline TCGv_i128 tcg_temp_new_i128(void) return temp_tcgv_i128(t); } =20 -static inline TCGv_i128 tcg_temp_local_new_i128(void) -{ - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_I128, TEMP_TB); - return temp_tcgv_i128(t); -} - static inline TCGv_ptr tcg_global_mem_new_ptr(TCGv_ptr reg, intptr_t offse= t, const char *name) { @@ -976,12 +958,6 @@ static inline TCGv_ptr tcg_temp_new_ptr(void) return temp_tcgv_ptr(t); } =20 -static inline TCGv_ptr tcg_temp_local_new_ptr(void) -{ - TCGTemp *t =3D tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_TB); - return temp_tcgv_ptr(t); -} - #if defined(CONFIG_DEBUG_TCG) /* If you call tcg_clear_temp_count() at the start of a section of * code which is not supposed to leak any TCG temporaries, then @@ -1084,8 +1060,6 @@ void tcg_optimize(TCGContext *s); /* Allocate a new temporary and initialize it with a constant. */ TCGv_i32 tcg_const_i32(int32_t val); TCGv_i64 tcg_const_i64(int64_t val); -TCGv_i32 tcg_const_local_i32(int32_t val); -TCGv_i64 tcg_const_local_i64(int64_t val); TCGv_vec tcg_const_zeros_vec(TCGType); TCGv_vec tcg_const_ones_vec(TCGType); TCGv_vec tcg_const_zeros_vec_matching(TCGv_vec); @@ -1113,11 +1087,9 @@ TCGv_vec tcg_constant_vec_matching(TCGv_vec match, u= nsigned vece, int64_t val); =20 #if UINTPTR_MAX =3D=3D UINT32_MAX # define tcg_const_ptr(x) ((TCGv_ptr)tcg_const_i32((intptr_t)(x))) -# define tcg_const_local_ptr(x) ((TCGv_ptr)tcg_const_local_i32((intptr_t)= (x))) # define tcg_constant_ptr(x) ((TCGv_ptr)tcg_constant_i32((intptr_t)(x)= )) #else # define tcg_const_ptr(x) ((TCGv_ptr)tcg_const_i64((intptr_t)(x))) -# define tcg_const_local_ptr(x) ((TCGv_ptr)tcg_const_local_i64((intptr_t)= (x))) # define tcg_constant_ptr(x) ((TCGv_ptr)tcg_constant_i64((intptr_t)(x)= )) #endif =20 diff --git a/tcg/tcg.c b/tcg/tcg.c index 758b2a3e06..b65f2ffdbe 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1476,22 +1476,6 @@ TCGv_i64 tcg_const_i64(int64_t val) return t0; } =20 -TCGv_i32 tcg_const_local_i32(int32_t val) -{ - TCGv_i32 t0; - t0 =3D tcg_temp_local_new_i32(); - tcg_gen_movi_i32(t0, val); - return t0; -} - -TCGv_i64 tcg_const_local_i64(int64_t val) -{ - TCGv_i64 t0; - t0 =3D tcg_temp_local_new_i64(); - tcg_gen_movi_i64(t0, val); - return t0; -} - #if defined(CONFIG_DEBUG_TCG) void tcg_clear_temp_count(void) { --=20 2.34.1 From nobody Thu Dec 26 10:59:52 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1677484944; cv=none; d=zohomail.com; s=zohoarc; b=BHL9oeeLYcZVy2uAhIT4rKQn3frsS7z5Yu0TVhQGuFwV+ki8j4sKftEwgMb12Q7EKMOmleVRYFln8KtQ+jXIbc0wwlXDQZg17MA8+bG1Ne6fpFZppnyWZp6hPa+XNJQXaecKm3pcJY837wjPPTJLPp4D4r1GgdhzULehpVUqgLA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677484944; h=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=O5Nae+5LEEO3GQ0dOu4+dSvfzca+IGYSp2HQe0g43MA=; b=VkVaNkVHzgnE+cd62Z2dGqHEnrazPKj5VCM20sso+N5FsYT0WfVa3vMm8l+Wvgcx2nU3IDyMxRdy3LorNxq5dAGpm9iaRvZ4BMmWEU54CNCgI8DcHsNjBype8L7RqWWcC+gkvvU8i/ebpCzYFqGKE/MDFotDnNsm6/tW4QDOBMA= 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+importer2=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 1677484944496227.4691499637446; Mon, 27 Feb 2023 00:02:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWWFZ-00056m-Gk; Mon, 27 Feb 2023 00:40: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 1pWWDb-0004Wd-PG for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:35 -0500 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWDX-0003CO-CM for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:38:34 -0500 Received: by mail-pf1-x42c.google.com with SMTP id u20so2786346pfm.7 for ; Sun, 26 Feb 2023 21:38:30 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.38.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=O5Nae+5LEEO3GQ0dOu4+dSvfzca+IGYSp2HQe0g43MA=; b=pW92kyGR8S0yEC054cocPJiZ87hohm3kcWxjN3aakxmoJSWX2Xd29dlvDPX49HlKsB 6qvnWFOfdqC4mW4+7p9Omv0MbFOodEhz8EAkV6XznXtK35DwTVT+PbV1bgEROjqW6NK8 ZYN3kOBeYOGgHEbCnx65PhWJigOLvH94cfIJxWUt/S0aeHeQFW/lJ45PlAJnPPBtSV3n hvL09dXmzT0m0z9fit55aiNSoF8ftdctFIAjIOsmNKlYzJfP3QcjnFKONBmnCUulW+u2 moChZwccf2Snk6B92WjuaZyr5dPimD6TyDTFen6R+Uh25cmcJWZ6RThXsyl92ywg2ehb msag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=O5Nae+5LEEO3GQ0dOu4+dSvfzca+IGYSp2HQe0g43MA=; b=a3vt0NXFxZLQVSXvWQ1VWd2Ozo1sEprXHNBUdhz0esHHj40rWYiIIKVpHFtfjSolUO WNy004H3jjSyMzFiJOaXplrRlxefpEXG3UuotTfxod/k6AD3mOXoDF7rMTRmPkkORcfT BV1VLgbzsV0FzIjPV4L0E5GL1IE+kRknZ7sB9Drtb/YpfdUzGdVWYCNAclprCuLDPLzS +YTXpVtMUf6YPuSVrgVQwDujyqvvfd2m18+21gZ31BVzUIyEECi0rkLfUTFqjwLXnXdc BbnNjwI9ve14VlRA4T51/PnMp5Yu4kxcCf79G008fQGvG9tEHxdgAd9hi2shwqjawvun dm+A== X-Gm-Message-State: AO0yUKV0jpkMe8qlATW3JkT4Hgv51bxjwa/lyt1e+9JTMfr0ELqPiI09 oJooDit9BarQcmN6bM9PijyTECiF65/Tt91Wc2E= X-Google-Smtp-Source: AK7set8Ilm1d3wftTPZXeo1LvvEFd13aBkc8fi8jNmg+Q2mGIc/lgDorlC2nGlHuqlgnk3oMF/4cMg== X-Received: by 2002:a05:6a00:2302:b0:594:26a7:cbd2 with SMTP id h2-20020a056a00230200b0059426a7cbd2mr9281140pfh.8.1677476309496; Sun, 26 Feb 2023 21:38:29 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, Daniel Henrique Barboza Subject: [PATCH v4 31/31] tcg: Update docs/devel/tcg-ops.rst for temporary changes Date: Sun, 26 Feb 2023 19:37:01 -1000 Message-Id: <20230227053701.368744-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-1-richard.henderson@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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=unavailable 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1677484945188100001 Content-Type: text/plain; charset="utf-8" Rewrite the sections which talked about 'local temporaries'. Remove some assumptions which no longer hold. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- docs/devel/tcg-ops.rst | 230 +++++++++++++++++++++++------------------ 1 file changed, 129 insertions(+), 101 deletions(-) diff --git a/docs/devel/tcg-ops.rst b/docs/devel/tcg-ops.rst index 9adc0c9b6c..561c416574 100644 --- a/docs/devel/tcg-ops.rst +++ b/docs/devel/tcg-ops.rst @@ -7,67 +7,51 @@ TCG Intermediate Representation Introduction =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -TCG (Tiny Code Generator) began as a generic backend for a C -compiler. It was simplified to be used in QEMU. It also has its roots -in the QOP code generator written by Paul Brook. +TCG (Tiny Code Generator) began as a generic backend for a C compiler. +It was simplified to be used in QEMU. It also has its roots in the +QOP code generator written by Paul Brook. =20 Definitions =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -TCG receives RISC-like *TCG ops* and performs some optimizations on them, -including liveness analysis and trivial constant expression -evaluation. TCG ops are then implemented in the host CPU back end, -also known as the TCG target. - -The TCG *target* is the architecture for which we generate the -code. It is of course not the same as the "target" of QEMU which is -the emulated architecture. As TCG started as a generic C backend used -for cross compiling, it is assumed that the TCG target is different -from the host, although it is never the case for QEMU. +The TCG *target* is the architecture for which we generate the code. +It is of course not the same as the "target" of QEMU which is the +emulated architecture. As TCG started as a generic C backend used +for cross compiling, the assumption was that TCG target might be +different from the host, although this is never the case for QEMU. =20 In this document, we use *guest* to specify what architecture we are emulating; *target* always means the TCG target, the machine on which we are running QEMU. =20 -A TCG *function* corresponds to a QEMU Translated Block (TB). - -A TCG *temporary* is a variable only live in a basic block. Temporaries ar= e allocated explicitly in each function. - -A TCG *local temporary* is a variable only live in a function. Local tempo= raries are allocated explicitly in each function. - -A TCG *global* is a variable which is live in all the functions -(equivalent of a C global variable). They are defined before the -functions defined. A TCG global can be a memory location (e.g. a QEMU -CPU register), a fixed host register (e.g. the QEMU CPU state pointer) -or a memory location which is stored in a register outside QEMU TBs -(not implemented yet). - -A TCG *basic block* corresponds to a list of instructions terminated -by a branch instruction. - An operation with *undefined behavior* may result in a crash. =20 An operation with *unspecified behavior* shall not crash. However, the result may be one of several possibilities so may be considered an *undefined result*. =20 -Intermediate representation -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D +Basic Blocks +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Introduction ------------- +A TCG *basic block* is a single entry, multiple exit region which +corresponds to a list of instructions terminated by a label, or +any branch instruction. =20 -TCG instructions operate on variables which are temporaries, local -temporaries or globals. TCG instructions and variables are strongly -typed. Two types are supported: 32 bit integers and 64 bit -integers. Pointers are defined as an alias to 32 bit or 64 bit -integers depending on the TCG target word size. +A TCG *extended basic block* is a single entry, multiple exit region +which corresponds to a list of instructions terminated by a label or +an unconditional branch. Specifically, an extended basic block is +a sequence of basic blocks connected by the fall-through paths of +zero or more conditional branch instructions. =20 -Each instruction has a fixed number of output variable operands, input -variable operands and always constant operands. +Operations +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The notable exception is the call instruction which has a variable -number of outputs and inputs. +TCG instructions or *ops* operate on TCG *variables*, both of which +are strongly typed. Each instruction has a fixed number of output +variable operands, input variable operands and constant operands. +Vector instructions have a field specifying the element size within +the vector. The notable exception is the call instruction which has +a variable number of outputs and inputs. =20 In the textual form, output operands usually come first, followed by input operands, followed by constant operands. The output type is @@ -77,68 +61,127 @@ included in the instruction name. Constants are prefix= ed with a '$'. =20 add_i32 t0, t1, t2 /* (t0 <- t1 + t2) */ =20 +Variables +=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Assumptions ------------ +* ``TEMP_FIXED`` =20 -Basic blocks -^^^^^^^^^^^^ + There is one TCG *fixed global* variable, ``cpu_env``, which is + live in all translation blocks, and holds a pointer to ``CPUArchState``. + This variable is held in a host cpu register at all times in all + translation blocks. =20 -* Basic blocks end after branches (e.g. brcond_i32 instruction), - goto_tb and exit_tb instructions. +* ``TEMP_GLOBAL`` =20 -* Basic blocks start after the end of a previous basic block, or at a - set_label instruction. + A TCG *global* is a variable which is live in all translation blocks, + and corresponds to memory location that is within ``CPUArchState``. + These may be specified as an offset from ``cpu_env``, in which case + they are called *direct globals*, or may be specified as an offset + from a direct global, in which case they are called *indirect globals*. + Even indirect globals should still reference memory within + ``CPUArchState``. All TCG globals are defined during + ``TCGCPUOps.initialize``, before any translation blocks are generated. =20 -After the end of a basic block, the content of temporaries is -destroyed, but local temporaries and globals are preserved. +* ``TEMP_CONST`` =20 -Floating point types -^^^^^^^^^^^^^^^^^^^^ + A TCG *constant* is a variable which is live throughout the entire + translation block, and contains a constant value. These variables + are allocated on demand during translation and are hashed so that + there is exactly one variable holding a given value. =20 -* Floating point types are not supported yet +* ``TEMP_TB`` =20 -Pointers -^^^^^^^^ + A TCG *translation block temporary* is a variable which is live + throughout the entire translation block, but dies on any exit. + These temporaries are allocated explicitly during translation. =20 -* Depending on the TCG target, pointer size is 32 bit or 64 - bit. The type ``TCG_TYPE_PTR`` is an alias to ``TCG_TYPE_I32`` or - ``TCG_TYPE_I64``. +* ``TEMP_EBB`` + + A TCG *extended basic block temporary* is a variable which is live + throughout an extended basic block, but dies on any exit. + These temporaries are allocated explicitly during translation. + +Types +=3D=3D=3D=3D=3D + +* ``TCG_TYPE_I32`` + + A 32-bit integer. + +* ``TCG_TYPE_I64`` + + A 64-bit integer. For 32-bit hosts, such variables are split into a pair + of variables with ``type=3DTCG_TYPE_I32`` and ``base_type=3DTCG_TYPE_I64= ``. + The ``temp_subindex`` for each indicates where it falls within the + host-endian representation. + +* ``TCG_TYPE_PTR`` + + An alias for ``TCG_TYPE_I32`` or ``TCG_TYPE_I64``, depending on the size + of a pointer for the host. + +* ``TCG_TYPE_REG`` + + An alias for ``TCG_TYPE_I32`` or ``TCG_TYPE_I64``, depending on the size + of the integer registers for the host. This may be larger + than ``TCG_TYPE_PTR`` depending on the host ABI. + +* ``TCG_TYPE_I128`` + + A 128-bit integer. For all hosts, such variables are split into a number + of variables with ``type=3DTCG_TYPE_REG`` and ``base_type=3DTCG_TYPE_I12= 8``. + The ``temp_subindex`` for each indicates where it falls within the + host-endian representation. + +* ``TCG_TYPE_V64`` + + A 64-bit vector. This type is valid only if the TCG target + sets ``TCG_TARGET_HAS_v64``. + +* ``TCG_TYPE_V128`` + + A 128-bit vector. This type is valid only if the TCG target + sets ``TCG_TARGET_HAS_v128``. + +* ``TCG_TYPE_V256`` + + A 256-bit vector. This type is valid only if the TCG target + sets ``TCG_TARGET_HAS_v256``. =20 Helpers -^^^^^^^ +=3D=3D=3D=3D=3D=3D=3D =20 -* Using the tcg_gen_helper_x_y it is possible to call any function - taking i32, i64 or pointer types. By default, before calling a helper, - all globals are stored at their canonical location and it is assumed - that the function can modify them. By default, the helper is allowed to - modify the CPU state or raise an exception. +Helpers are registered in a guest-specific ``helper.h``, +which is processed to generate ``tcg_gen_helper_*`` functions. +With these functions it is possible to call a function taking +i32, i64, i128 or pointer types. =20 - This can be overridden using the following function modifiers: +By default, before calling a helper, all globals are stored at their +canonical location. By default, the helper is allowed to modify the +CPU state (including the state represented by tcg globals) +or may raise an exception. This default can be overridden using the +following function modifiers: =20 - - ``TCG_CALL_NO_READ_GLOBALS`` means that the helper does not read globa= ls, - either directly or via an exception. They will not be saved to their - canonical locations before calling the helper. +* ``TCG_CALL_NO_WRITE_GLOBALS`` =20 - - ``TCG_CALL_NO_WRITE_GLOBALS`` means that the helper does not modify an= y globals. - They will only be saved to their canonical location before calling hel= pers, - but they won't be reloaded afterwards. + The helper does not modify any globals, but may read them. + Globals will be saved to their canonical location before calling helpers, + but need not be reloaded afterwards. =20 - - ``TCG_CALL_NO_SIDE_EFFECTS`` means that the call to the function is re= moved if - the return value is not used. +* ``TCG_CALL_NO_READ_GLOBALS`` =20 - Note that ``TCG_CALL_NO_READ_GLOBALS`` implies ``TCG_CALL_NO_WRITE_GLOBA= LS``. + The helper does not read globals, either directly or via an exception. + They will not be saved to their canonical locations before calling + the helper. This implies ``TCG_CALL_NO_WRITE_GLOBALS``. =20 - On some TCG targets (e.g. x86), several calling conventions are - supported. +* ``TCG_CALL_NO_SIDE_EFFECTS`` =20 -Branches -^^^^^^^^ - -* Use the instruction 'br' to jump to a label. + The call to the helper function may be removed if the return value is + not used. This means that it may not modify any CPU state nor may it + raise an exception. =20 Code Optimizations ------------------- +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 When generating instructions, you can count on at least the following optimizations: @@ -908,20 +951,9 @@ Recommended coding rules for best performance often modified, e.g. the integer registers and the condition codes. TCG will be able to use host registers to store them. =20 -- Avoid globals stored in fixed registers. They must be used only to - store the pointer to the CPU state and possibly to store a pointer - to a register window. - -- Use temporaries. Use local temporaries only when really needed, - e.g. when you need to use a value after a jump. Local temporaries - introduce a performance hit in the current TCG implementation: their - content is saved to memory at end of each basic block. - -- Free temporaries and local temporaries when they are no longer used - (tcg_temp_free). Since tcg_const_x() also creates a temporary, you - should free it after it is used. Freeing temporaries does not yield - a better generated code, but it reduces the memory usage of TCG and - the speed of the translation. +- Free temporaries when they are no longer used (``tcg_temp_free``). + Since ``tcg_const_x`` also creates a temporary, you should free it + after it is used. =20 - Don't hesitate to use helpers for complicated or seldom used guest instructions. There is little performance advantage in using TCG to @@ -932,10 +964,6 @@ Recommended coding rules for best performance the instruction is mostly doing loads and stores, and in those cases inline TCG may still be faster for longer sequences. =20 -- The hard limit on the number of TCG instructions you can generate - per guest instruction is set by ``MAX_OP_PER_INSTR`` in ``exec-all.h`` -- - you cannot exceed this without risking a buffer overrun. - - Use the 'discard' instruction if you know that TCG won't be able to prove that a given global is "dead" at a given program point. The x86 guest uses it to improve the condition codes optimisation. --=20 2.34.1