From nobody Mon Dec 9 17:40:38 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=1675112587; cv=none; d=zohomail.com; s=zohoarc; b=OSRxKwPCg/taCc1+zNPH+4N9kZxsLKN8MpJlm+WdmfhN1lsLZEVH4bXjRgIoYY+3VlPQ4SzEXmArEWnBQajNTzAzvX7yPN5sNDrOjmBsSOUmy0gOIYnkOOChPQquo+34DJJ5GC8Tb6LBM7TNF0ow2zVlEk/JYqgcV+o4w21cUsA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112587; 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=RGdgdW64uwORmCGv84R5SKLfk4HZSsoCQbj1kTogu2U=; b=Hpbi4c3MOhY4mNGkEck0B3T4rjRAyDzQdSFnnnm26EBjE65bIB8zUg8uSB+dRc+1rA74adoIyZzV2MvXzsXkEILfqDPKgoZSc20SXdQtpr7BNDAB+enGRy0bWugHiy2jA3VH2UEj3Qxbere2O0LzHrNkUeJs+vSU0XKIh7RWgaE= 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 1675112587365391.3236903128957; Mon, 30 Jan 2023 13:03:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFv-0008Cc-K0; Mon, 30 Jan 2023 15:59: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 1pMbFk-0007Ui-JY for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:52 -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 1pMbFh-0005C8-TA for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:47 -0500 Received: by mail-pg1-x52b.google.com with SMTP id 141so8614043pgc.0 for ; Mon, 30 Jan 2023 12:59:43 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:41 -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=RGdgdW64uwORmCGv84R5SKLfk4HZSsoCQbj1kTogu2U=; b=zMTLhQF8Pxf9xgr7GbqxaELcNmD4wObiC4/SKB9dOS4SvlJdP0qwF9ot7YCWPE2hWG hRKjxBxsVj/pHeqfhbQ2qJznaKYOcW10zSmPMabUegPhX4Qd82TuQc7NmEKjuzwY6qoe pLHxE4EH4AejMGw26NmNgq66Lx3chJu+d2tZVVDulJNjA+Bk5t2NokQXaIiKY8WbaNjG E1DRM1i0/B1F3zrXQ3Y3XaQ1LcxXJmK7sPOVKHtthhWSfn0vXyxhjMaWGapXq2pWguiJ afWQZ6c1/99tFjcpqv2hLco+ITEsC8tsmti0yMLmPKrTu0r4ZTCGkJtmCKzUGojxnKN8 sQ5Q== 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=RGdgdW64uwORmCGv84R5SKLfk4HZSsoCQbj1kTogu2U=; b=t8pJSTQoqe2vN7rBnZG7wm+o0d/UOO5qQsGb4EfgPJscmUzKW1oXebYXaP09AecOdo eVxXTQX0h104XzcADWYDEqN3jSyOIeacnTDcfYlXAOCgPlKzxq8O5+mhiowZIyDNQQd0 NNksB4PhPTtQRH8BnDrIsNWreZF5f308Kx05fzVd1jqel/KpDrjXfodjtTJ00U6faKPH KyM+dWFZDpjpdIgWIOD+rCr4wdTVaZJSlImORTxUHjDm5hoZjEVxNroRpTUrrQ3hV4Gs ztxqjxywsOyhCM1GTt+HE4Q5YhQPrI+pGx3gWCL7luSlRB/jm4yHF2V01QoX8FcZau5P dX6Q== X-Gm-Message-State: AFqh2koDu/2FXyszJddEz5vCvxxg6L8d/7dOfMFvtbRjr4GWHk+DHyw5 okak6APu2BnKpIoLoyJnhMoluunaIl85/TH4 X-Google-Smtp-Source: AMrXdXvUscvyvZgm6Yr7Di4lF2673Gvo0Eke0fFEENRA4sAg9pzQtvPScM+7qenzsrG9/2JyOgDOKQ== X-Received: by 2002:a62:be04:0:b0:58d:95aa:88a0 with SMTP id l4-20020a62be04000000b0058d95aa88a0mr46007393pff.24.1675112382147; Mon, 30 Jan 2023 12:59:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 01/27] tcg: Adjust TCGContext.temps_in_use check Date: Mon, 30 Jan 2023 10:59:09 -1000 Message-Id: <20230130205935.1157347-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112588749100005 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tcg/tcg.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index fee96b3d9c..0bb0bdbe43 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 Mon Dec 9 17:40:38 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=1675112551; cv=none; d=zohomail.com; s=zohoarc; b=Fqkz34SVrEqZfcPlWgxsipG3Ittf+KCrpGwPRNHTJVL55qoqAC4PJ4PkAvSCNU/AUKU+l1prPdSKG0plQ5PAMK5zngiRkZFV7beqmnXLWCTgpKJQKWDTQLfuvBJva+0Vqwi83wFpreYSby+18wiZWxZ7qWr4K2AJoAdkHeLqSaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112551; 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=xFvqAHF0H7zlHj/UyRlhV/svGJlbiV6IqpGGJulMnWU=; b=E9cFwfzLg76N/d3oPyzy+TYPNK3engmHpGN3FmSDcTOSsSetlLvkbEpQLGIjplZ9OU94kLsOQcxcKzdtGKINuejN0ifijynxDthU8kVYYwa6951uMj6h5GOw9TkLt5QlYxHEjasJwt9x9nZ2H69tIw590QieSULVoyZMhjQomMU= 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 1675112551353143.04347785165817; Mon, 30 Jan 2023 13:02:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFt-0007uS-4j; Mon, 30 Jan 2023 15:59:57 -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 1pMbFk-0007Uj-M3 for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:52 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFh-0005CO-Uj for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:48 -0500 Received: by mail-pj1-x1032.google.com with SMTP id cq16-20020a17090af99000b0022c9791ac39so4460979pjb.4 for ; Mon, 30 Jan 2023 12:59:45 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:43 -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=xFvqAHF0H7zlHj/UyRlhV/svGJlbiV6IqpGGJulMnWU=; b=NbfjuhzYSSAp2+tG98w7BryokOrxZwABs2Xi9khPQ33Uzb/MXZLHkZXYj7rL6Ar3oa lZCGPO3nm8xIXJMb4QmeCh/DPs3neA5p+0eXU20HSYOHG2NlYpNcfAeDzKFIsjw0sMVY j17V0fdJG43gyywzLXrXeYNUHHsAWz1U179Gy6yCwARVLpbMQ8YDHn7U2+Tjm4E11Bwa Ma+S0FiJX0BCXk8gCU2dlhpfgGLqZSRgt+CSVKU9thrLmr899RqsU7PfACRYdEw9Ad38 RkytkOgq4WKVXJj1SbB6q5upbPesRRUAE6Frw/+MC15h2c3SlkGWkoIDLcZmOUROKds/ hatA== 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=xFvqAHF0H7zlHj/UyRlhV/svGJlbiV6IqpGGJulMnWU=; b=GEPxwxxjgsG//xECvLDcjVBlUROvEyYN8WjPluSnDfAap4ONlWPgtfXSd2VkCiTiCR JE8QsOjSg8bWyRpsgqRterKG1GfteNLcMeRr4PmnYYDIGZ8GfJQ8zJkmFuQ1uxWgQFWM /oXJ8tx4e0eZeY+e5P1orqvKsLn+/MoTxsoksUsLe2/3qjeRu84EAFTVtrPaYjfW/tgE mW7trOKdxx+5/csZSOUQS2PD2Nsf43dKVe+WPMxKdGOsTyjBd0RGqCjD82OS76MqO7WA p92PhHCCEKCKcYC7yLjlJiG5f24wUtbCqWCgnpHN/hOI3rE3dbWAmyHn96FR8ndR6oox jFWA== X-Gm-Message-State: AO0yUKWq+cNuVTE9PbVu+Q48zhmIOmmCjlO052MrHLPgPpURlwY3o1AC MT7bFdkFkvGplzDPOLp9c1+aQqcVFUf7C7mZ X-Google-Smtp-Source: AK7set+1VIiPX5Eel65JMLb/CQfvmYi06FQbi+eXTCd5xeAlSPWUuiBQRM8uhiUj6PAuZNRVprScww== X-Received: by 2002:a05:6a21:6d92:b0:bd:132b:8e77 with SMTP id wl18-20020a056a216d9200b000bd132b8e77mr6221953pzb.18.1675112383800; Mon, 30 Jan 2023 12:59:43 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 02/27] accel/tcg: Pass max_insn to gen_intermediate_code by pointer Date: Mon, 30 Jan 2023 10:59:10 -1000 Message-Id: <20230130205935.1157347-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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: 1675112552542100001 Content-Type: text/plain; charset="utf-8" In preparation for returning the number of insns generated via the same pointer. Adjust only the prototypes so far. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 061519691f..08a816bffe 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 365e02fb0b..12eeada122 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9937,7 +9937,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 38ced69803..bc7cff5f3f 100644 --- a/target/loongarch/translate.c +++ b/target/loongarch/translate.c @@ -246,7 +246,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 18418312b1..9e6b6d07d0 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -6389,7 +6389,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 624e6b7786..6dbd262ebc 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -16160,7 +16160,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 4db8b47744..b0dab8d460 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -1039,7 +1039,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 01cc30a365..479fc2b128 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -1277,7 +1277,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 df9e46c649..59d48faf11 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -8878,7 +8878,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 Mon Dec 9 17:40:38 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=1675112614; cv=none; d=zohomail.com; s=zohoarc; b=XFrDQq3FI4pb83r3fRS8SfHygNam+aIciCjfdAhC/ewErnGKowktFpc2mvULmsEK6K8JVnJ8tFAeWWQU2O9hF6IG8vfIG+Lho7rZUXaxwuuLEl8I0b58UIDdoOV+h5HLDHrpApa5e5DJ6q2uVXVvkahIrZ+yxx+PDZGcqBNtW0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112614; 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=sTUZLEFCfr7lT34+spBSQV2zfVIDOr8BydY/0R/vz+U=; b=L5H1pn1K4EDVTX3ro2KJpa9L4nFEsziM4H18rtXyDYpVpEvGKVrqMRcUW5ft1VdeWC68ZmBRlUqjAiaK+l9/BjcK8HBJwAhOyQ5THg+PipX9duTxCTzHsEqGw5bKTd5qwUF3qH2fCyxdQcf29NgNa2ndpfURayqEIAPFSznsNGA= 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 1675112614595756.3386264679556; Mon, 30 Jan 2023 13:03:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFt-0007vQ-5T; Mon, 30 Jan 2023 15:59:57 -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 1pMbFk-0007Uk-Mq for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:52 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFj-0005D8-6X for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:48 -0500 Received: by mail-pg1-x531.google.com with SMTP id d10so8558876pgm.13 for ; Mon, 30 Jan 2023 12:59:46 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:45 -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=sTUZLEFCfr7lT34+spBSQV2zfVIDOr8BydY/0R/vz+U=; b=jxbcnqzXENm8yzrOogANceQlBCWzYok3tfiBo56TQvyE6Z2/E9Yjc/hCIS8kxq2c43 /JZZ2de4ciQEKf4smuInNuAHbUP/b0Zlkjq0DZDtcOtFMSYdiOdcHyBRm6i7S+MvGNrR 9epROmX2lHPjnB1YyNVZVniChUwyApYLP7yYjARJExadQuzel+HsQ4KujvYSVz3KyQ9E I/2K3vFf3lvPf3WT4hr7MJZUSwlKLgbL8yJ2ZDY8GEzO6vtxKcjByAJJRacQ+VltqCot rn1QlJHY+bwFFvklNbgHfFWldpfxUCRam4Ee6VqBSexpJv9xvZZNoQF8lUzPJjedDYG+ rCiw== 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=sTUZLEFCfr7lT34+spBSQV2zfVIDOr8BydY/0R/vz+U=; b=jPji0Nvzkwt6lejSSkXN7K9euYY/iXbKugI1U+RiSjJovcw1Ypqec9INJSbWc3uW4w DQsJcPi3dctJfwlgq3Je3/OG1NYAkRiKUMU+FrHMTjddP+dcxvpMi5/gbXkTyT89AkTd 2n9r80/ivvV0PciGOCXGg0lkcnnaO7t66/OPxl4eIoSuK6IT5QiOrtIHtEYEOBM6ydjl IvwmBcpM0tbdEK4JToEKPL3sUkzjFO+Xiyc4Au+LOyQS2Q6RZgB+Dv/88HzoObqMEs1p m3qrzRmQVSAHZlD0UTSyA6Q0rah8HVDIOpO61qSu/bbpvPtRGraWpDTfwSo9H0EQl/QG KHPA== X-Gm-Message-State: AO0yUKUgFYx1ryawZh1gio/cMTHNaL90Q1EM8yqmA0QTiwEZjHyFbB4/ l9wR72OqDxuQWiZthRAqmdTZ9gq+1ViW+bVT X-Google-Smtp-Source: AK7set+eAKZP26vNr6Q94Zq8GLPJzcX9bGtZ9mZKQpXvam6s0PCc6rrWB4EEV9DOBrUMAAN7LTgDBQ== X-Received: by 2002:a05:6a00:1f0d:b0:593:b470:aeda with SMTP id be13-20020a056a001f0d00b00593b470aedamr5261352pfb.29.1675112385638; Mon, 30 Jan 2023 12:59:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 03/27] accel/tcg: Use more accurate max_insns for tb_overflow Date: Mon, 30 Jan 2023 10:59:11 -1000 Message-Id: <20230130205935.1157347-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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: 1675112615143100017 Content-Type: text/plain; charset="utf-8" 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. 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 08a816bffe..250647eb49 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 Mon Dec 9 17:40:38 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=1675112472; cv=none; d=zohomail.com; s=zohoarc; b=QBOpMA+sZH7b8xT1gxmthTz1iZ6uWwa9yyA/3wkJPDNql6kUXRvxLqbiatCjdAnpY88ZVX7pZrLB4mY/jJ/DSDodzJ9Wxq+IGxFzLXJms7IeByFxCEvvTykI+0CIEl4qGTMzZng04GIRmTIX82N7n17Hv8ZU8aKcWc3wkk0Z260= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112472; 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=k0QQj1V4HE3kyNzJq2NL4R3goe68TydpAVl4hV+umL8=; b=GLkvspnvUyTiVk5OkBBZww+QLOLr2DErMTW0LBko7Om82I9G0CAFraIAK7xAM5bj8ah9rgmWnYUvwbJZpnMA53xmLiSuhQ1tjjGoFDwYg0KRixwE6kRTCzzBs3vGq7StNepc84lcw65qLOb1yNM2h3NU8SHu8SDKajqvY2CBttM= 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 1675112472923337.9392807278599; Mon, 30 Jan 2023 13:01:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFw-0008EL-DK; Mon, 30 Jan 2023 16:00: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 1pMbFm-0007Vf-9A for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:52 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFk-0005EY-Mq for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:50 -0500 Received: by mail-pg1-x531.google.com with SMTP id r18so8566498pgr.12 for ; Mon, 30 Jan 2023 12:59:48 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:46 -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=k0QQj1V4HE3kyNzJq2NL4R3goe68TydpAVl4hV+umL8=; b=yRAcliXnSwbAEuxzit2uequ++G4dzmh94UIF+X26a8N64+vEebPbQvfKGU41x3blnX Pq0zWaoDCzZ7EvF22ej0Ubl3gXDjQ0VCGV4qomElNslvFvpPro8IYSeJ/HWwFOcN1oNw /AJ1K6ApMtK+EXP4HDszrYjXKaje7za/9sxYz9D0S+6MJJcc/0P/lbS25ObH0/wmGHaU TEd0teXJsHViXMYy0u//0VcE0lbvoxD6zq+mr6nN7F0gUkP037awJlm+lp+Zoi5YJIU8 z1yVGytSaycUOi/Pibg7j8FQrDLlUkyDNY044SgCpjr3E36jzGrCiiyW88yhMFIVs7OS PjtA== 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=k0QQj1V4HE3kyNzJq2NL4R3goe68TydpAVl4hV+umL8=; b=Qi+z/X+5ayPBLYzaEh8rkGtJ4Y+Zi0lPiQBA4rvYgLeyt77BwL3+w6T1YLGYdniR/I ufIHAcrPtO12ZHkfnhk44gSKE5uaVu84GOHJC1urASTfQAqOcopFV2LBmbVzagc/SnEy zFwq4/hUog2crYZv8Vji6x75QUne/zLyvmTzHlNY4Y6kiED63Wmh/ndqW1LrI1dSMj5S gdRVLtQ3mx9b3sFecJO0qIBbDiXs+JDxiesNWuqfVbXwCTkU+MkGm0fvC1xF1t+wJ5TU lYh3+RSDGMHjBpg3id97zoPqR3O8SEJDurVZ1PqYPNrO7I3vMAVXYxMZQAY7TqM17zDV jaqg== X-Gm-Message-State: AFqh2kqm1xsPRMpAWgNhVO8Qew8rfcvghgN+taywE0Yo4Cc9hGHdL59c EwNm4QAFU74gF4TbNiaMpFWxHt0BDVHzKnF0 X-Google-Smtp-Source: AMrXdXtL7itEulAkjBF0m8Lr7R3oXyPsCzvoulhkYmIFzqjG6c/Uf80Yuq+BFbttG6j2Tp3ghnPJdQ== X-Received: by 2002:a62:4e8e:0:b0:580:fb8e:3044 with SMTP id c136-20020a624e8e000000b00580fb8e3044mr52621079pfb.22.1675112387233; Mon, 30 Jan 2023 12:59:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 04/27] tcg: Remove branch-to-next regardless of reference count Date: Mon, 30 Jan 2023 10:59:12 -1000 Message-Id: <20230130205935.1157347-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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: 1675112473841100001 Content-Type: text/plain; charset="utf-8" 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. 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 0bb0bdbe43..fc0de1dccc 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2636,7 +2636,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) { @@ -2646,6 +2646,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 @@ -2659,21 +2675,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 Mon Dec 9 17:40:38 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=1675112435; cv=none; d=zohomail.com; s=zohoarc; b=gmYGX+lOeCwpvPl0Au16kP9fQND5xLkFE+BkE1D4MglC0EHFEjttfkitP0u06mVC+FgkYFVosW2r9UuQ7p9WPLO81z9nrUgas2Gq0pDfxpT5XbwLIVDXqRMbegXoDPSSc/P7qEh6sKXjJVpMFQ66tNvV4ecvPUIl9BJkTQBUkOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112435; 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=2E58Iw876uTd6FlkZzM6tT65+aYePaxETl7ncokxgbo=; b=h1SnOp12TCpHI/aMpEK1tkr4GQNDBnGeGzgy5PdSvRsWFZFqQ7M5t9uihssydkLkmWI2bssA2jTzSKx6/c019g178v0KTPEAII54Q4Ft4fyhj5MPi7aLnZyu4yCotwjRgvWokm9T1RTR64I5R6euJNrb6IdQrb++Tfz2wwOiLBk= 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 16751124358281000.9586514563591; Mon, 30 Jan 2023 13:00:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFu-00088f-QI; Mon, 30 Jan 2023 15:59: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 1pMbFp-0007c4-OT for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:54 -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 1pMbFn-0005Ey-4W for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:53 -0500 Received: by mail-pf1-x435.google.com with SMTP id z1so5765894pfg.12 for ; Mon, 30 Jan 2023 12:59:50 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:48 -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=2E58Iw876uTd6FlkZzM6tT65+aYePaxETl7ncokxgbo=; b=aJmPGhhHMw3nd1pu8s4Nymoo+IbHVRRTxMEAOpjvhDbMkrE2+d1jPlZmF8dnl/RV9a 02JSqUc0qSZHfdU8NCRE5Ydjd5rSkCR8R3BxKuXQlVvp2bAEg1u7JAb/21FiyLasB4EM segxId4yj45iZwsrtKC1gOX47TuDPtIOoDjOQSXSAVc3GSagpjtq5SJx5CAVLXo1GwRi QLNkRm7rl67nQJH9iS6FQFDisFwx/p1HQ0V+O8c1VFpd4og1vNKQpZhr8pVV9uAPMpTW eqUmUN4z+b3noT7zrc88l0g+WeEsQL/LFYByGgiLEfj4T06DXaoYIcN/l4xtmxzYzCFr vW0A== 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=2E58Iw876uTd6FlkZzM6tT65+aYePaxETl7ncokxgbo=; b=2VjbZP1Ntbdl5uvyFvf5c13wzeJB0DpEYeYJa1/VihumBXWQDu6No0HPHwcCJ6VhrH 1cc293KT+tchRc61mL7rJCD6yRM3/ACh9wQnGcs+bhglZ/M3QOtzAD3dTjy7Uo0Kfgvv 7UoE5IdHJdewT0JllDPuaw+jA6LgpmlbC3+4h0IiqXvoh8OAi5f3iXZornwFcOwr2pzP 4VpeKTxaXfFij5qyYrTrGNegi2V47yt5CigOs5mtX/6Qy8nilN2sWIdyB6f/Sb3Wmolw quvB7rxVZrqfkAmScjDPKj/cud0+1Ku12QpZflPevPvXiIa0o6G5KQm5lZnIaMQlWTQr 63bQ== X-Gm-Message-State: AO0yUKXk/814i5R1qPvuAsUOnYx2Zk0EO9uYacBzPMOX2tRq0TdTBUt9 ivowivMPn6NFuwljqMheCPQwixH/VF2P5H2S X-Google-Smtp-Source: AK7set9GzmaHfTnAratYr6bGPUUtirOUBk+4KaYXo34KfyNKeZaqpI3yNIZD7Je1fE9TMZi/FBo/AQ== X-Received: by 2002:aa7:9159:0:b0:592:d3ce:fdd1 with SMTP id 25-20020aa79159000000b00592d3cefdd1mr10999950pfi.25.1675112389336; Mon, 30 Jan 2023 12:59:49 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 05/27] tcg: Rename TEMP_LOCAL to TEMP_TB Date: Mon, 30 Jan 2023 10:59:13 -1000 Message-Id: <20230130205935.1157347-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112437717100003 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 7a8e4bbdd7..8786607510 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -431,11 +431,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 fc0de1dccc..3e12053229 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(); @@ -1913,7 +1913,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: @@ -1935,7 +1935,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: @@ -2757,7 +2757,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: @@ -2802,7 +2802,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) { @@ -3494,7 +3494,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: @@ -3782,7 +3782,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: @@ -3819,7 +3819,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 Mon Dec 9 17:40:38 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=1675112610; cv=none; d=zohomail.com; s=zohoarc; b=mTXueRQaJteUwILjsizbLNGJ1CXt5Yjv7BhlFugqXemlfPhdDaTWSJOCXNRaM+leLWDaFn8aDAZi7zKcHiKwYPZ5s/TSW1HOPz8+sQZb9hJ5n1mAOu5Paq7booGT44kY/fuyVxZlVOLrP4I6wZINjyknLTP0vscoM7v52cvQpq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112610; 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=bEaUywT9yyO/FtIlPM94mPtt+7ciBwT5ZJGBWHxwoOY=; b=S2bQYR4K4OzB7weU9x3DX7B5p0khUpcQYexeP2PjfhHn+mqUDe4bhnN+PSh/hP4YTwsgBw9d/B6RjjFDjt1T9gl05i31P5d2iHtg2wqj0ufrAQgY+eo9+htqdLdDaOAeOt3nEfHLC/Pio42m/VxX1fiFDzM+RZBqbvfoiWzjV8k= 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 1675112610169798.9800962530461; Mon, 30 Jan 2023 13:03:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFt-000817-Oz; Mon, 30 Jan 2023 15:59:57 -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 1pMbFp-0007c5-S7 for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:54 -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 1pMbFo-0005FO-AZ for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:53 -0500 Received: by mail-pg1-x530.google.com with SMTP id 78so8578219pgb.8 for ; Mon, 30 Jan 2023 12:59:51 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59: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=bEaUywT9yyO/FtIlPM94mPtt+7ciBwT5ZJGBWHxwoOY=; b=UL7c8tIN6e73mk6BhS2v/KLHUpSr1XPTGmL31BVZ1SSIyTYiWpaeKvxBbzsa3xznMJ FFMufjsK3mU2Ol6tNzsOkAJHh8oP4PAoVEmn7+ERU2edrzvzPhjvvbsRlrd+ejT5dY/W deVlZLXHif50JDD6J5HqxXIP1kVsZP8PmkgzsxRITKYduRb4x/4+pyNSojCmVc0HeEPH 4w3me1oT6eaUcOxnRzD2jlnfe+iaDPMMqFTKqcGdXrep36HYigFdhpMh7unOsJzRKh8n LIkGBWf+2bDRPBKZ3XyYoO1RDoVveqHY6NrHbdP8SIdmsNSSbRgS+ihVo8BjCE6wMh09 bK+Q== 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=bEaUywT9yyO/FtIlPM94mPtt+7ciBwT5ZJGBWHxwoOY=; b=0QQe0NnMWYcW8gftL1jY9S+9oyOd7HHchARM9JnW5Nae2mfq4CTnG2pgi6NBLg6Hq2 Eio8ljHV70b942l7qP94StJsvpRQ5lCtMvBkFU4lND4Ew48f7oN4I6pXD6uEMGYKqBCX mIvep/svGdJowfCT1UeTzfO+Cjgd/tlW6g7axX8PSA+J7iEcxexrnNOvUg61KhM922yv 9fsHAPLMTUHZBfPSvT31niTIiTFhz3kzbBDK0+ViJjo7nRpqSRofaHUxlLbf36tIMm5p fbY/8+O+eGfXXxyl4y8fUgcYDfEOsdvEtvl9XdLopFQatGtYeEtMKuDNB6gxwiKXbeCT cwIg== X-Gm-Message-State: AO0yUKXd3FaPL7XP02oF7s+5B1rvssBcKyTfYlk1MoHBoS+yTdeojv6Q C5XBUBGkx3rsOmQjIwY2cGxXNS0cA9kY30c0 X-Google-Smtp-Source: AK7set9XAiiYPX2gXKJKMHH69bc3W08+JGkBggfAImmvAKkoElW9TqOqGN6hc4ztEpy4eT+DAuXd4A== X-Received: by 2002:a62:14c6:0:b0:593:2289:f01c with SMTP id 189-20020a6214c6000000b005932289f01cmr11895320pfu.25.1675112390893; Mon, 30 Jan 2023 12:59:50 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 06/27] tcg: Add liveness_pass_0 Date: Mon, 30 Jan 2023 10:59:14 -1000 Message-Id: <20230130205935.1157347-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112610964100001 Content-Type: text/plain; charset="utf-8" Attempt to reduce the lifetime of TEMP_TB. Signed-off-by: Richard Henderson --- tcg/tcg.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index 3e12053229..fb9ab967ea 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2855,6 +2855,74 @@ 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 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. */ @@ -4867,6 +4935,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 Mon Dec 9 17:40:38 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=1675112535; cv=none; d=zohomail.com; s=zohoarc; b=kQP51a4DPjy0VfizJ7Lh3zdVMtjT/QpDsc7w9v262EyAgXmbKG+OhfNV6I/bpgppB5BfQ2/pjSfYepgcKu0vUL35CFzbDpRBy66Un5R0W2qUsa6ebiW4LptY62IGLv2NBQVd6dKFkO+3cE9HuArpHqWCZ2BQmhfkWVzxcifNhsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112535; 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=hsnVbtUsNvcT2lLRbZgtaNtUs4XL0a0c4I5MMD7HBSk=; b=k7E/guPdtOkxgfyHUqcrjPnqN4a9bWMNTECvkG8ZXA0NFPtlWhemYXSEwPFiy6k3syOGrVdbjuGwW6V9IPObe+/ZIaxTiT2jjueIvBrC/D/qZnBDhPJYB3ck/Vq8Zn6lR9UCbFD882rIFJoiVUdp8U5O4IxprfHMAevWe1ka3K8= 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 1675112535568512.6526835776618; Mon, 30 Jan 2023 13:02:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGG-00005c-9q; Mon, 30 Jan 2023 16:00:20 -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 1pMbFr-0007pN-L9 for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:55 -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 1pMbFp-0005FZ-R5 for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:55 -0500 Received: by mail-pg1-x52f.google.com with SMTP id e10so8574358pgc.9 for ; Mon, 30 Jan 2023 12:59:53 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:51 -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=hsnVbtUsNvcT2lLRbZgtaNtUs4XL0a0c4I5MMD7HBSk=; b=xmEDgCwkvP6j36quHZASghdKDQmArklMRCSo3BHoK5FIF1GnHVYCH/kiG3Qhu1eBst nkfQjFBlQqlYn0tH1hAwM45+ZIBpcoGgGy+lomknNarKyuX5/oWf7u4zUL2lB0AbYUiB XfQEQBhSeBT6qh2PSsHEdIdILhD3026+xRPwD2YL5VdVF96qpxzmKWvy5+GjjMscMVik 5+0b5/+8IxjQxZkAKzuCRmMkj6JG24lX9qgK81jinbQYODfbe+DgGt8Os1DJuR485NEP xi5QGauvhjfIS652NlVUREIXkO79gKozfvjeAnFmEDNKP5PPaVBHyGLi4tFBjWxj3+H6 IW5A== 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=hsnVbtUsNvcT2lLRbZgtaNtUs4XL0a0c4I5MMD7HBSk=; b=e3bWck5bsjgIWNf9LBiwFoeIu/XcoyhFJRxcs/IqsWy7ftVBtn/vbZ/ytLgG4dwBA3 4kkpt7S2yOsVf6J1jTaepuNopCgUJlxRJojQCketDF3gZPEoXIPguditApKVUBHNv8MN 3FMTdvoeymTy6ENzOqspp1lQqAsUm6txKuVR7EzzpBgiYm97nhk2+BMqEWx+F1IhDNr/ CoQKIGwPCjjkTKCg3oiF8lLqn8+vhSco/2f1RCDI+kU5dQ3167Pe49VXfxSrXgtztA4k fNMEe7CDQW8qVqxeeJkwLa3tNTon785B13hacosOpSPb1C/f+Y1mn9/sqIbTLPt2pP7t 6UwA== X-Gm-Message-State: AO0yUKXd89CNWm5rjIPEKE4pqKjyNBUCINp6oxjlaF9+fwXI3yO8kTqQ /cGi7jXBmRmhbtM2QUaxz4LcfggeFFgjghQd X-Google-Smtp-Source: AK7set8EvLWQ3qZ+cUOmzF3UVjGXmJrZUHDbJD/CzG6l/njACdEq2870Kmy7tcOHdaViVxrJgqIweg== X-Received: by 2002:a62:fb1a:0:b0:593:e4b9:dc8b with SMTP id x26-20020a62fb1a000000b00593e4b9dc8bmr1755152pfm.27.1675112392373; Mon, 30 Jan 2023 12:59:52 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 07/27] tcg: Remove TEMP_NORMAL Date: Mon, 30 Jan 2023 10:59:15 -1000 Message-Id: <20230130205935.1157347-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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=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: 1675112536433100003 Content-Type: text/plain; charset="utf-8" TEMP_NORMAL is a subset of TEMP_EBB. Promote single basic block temps to single extended basic block. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 8786607510..ace910cf3b 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -429,8 +429,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 fb9ab967ea..da02a180b1 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 @@ -1909,7 +1909,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 */ @@ -1939,9 +1938,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: @@ -2760,7 +2756,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; @@ -2809,9 +2804,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; @@ -3565,7 +3557,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; @@ -3853,7 +3844,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. */ @@ -3890,9 +3880,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 Mon Dec 9 17:40:38 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=1675112587; cv=none; d=zohomail.com; s=zohoarc; b=TrhvGeV//yPs3meM5v9I10svVu+fq1bgS67O9CYQ/xDeQSWrhhBOKy8lbg2RtTLlSoUfWqLtwQyWvgeU8KaVzrfTWzz+B3KGF6I6LY0qtUtxMrl/MeBpfzlHsCidRlBOkXy6TiCD+gfSLCf7qbV9PYUsxVVnKfGW3PHDa9Xzhiw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112587; 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=v8325g5Oxoa3Q6Nszi20oELSJVGq05Ncj2q1+wr+VKE=; b=Mk9M9U0rcaw2CDKMU+PfYColftfDDYDXqRQuiCS1frbBRbyM2agouasG1/S16EhP2hBp6hFI0FxZCU4tU5WR392nY1mb/s6PJA+s8b2c9/58I3UNMCwe8ow/h8KGy4QdXXft2ly90HS6ywzQpcdsBRFABr3RsR/bwahFXj94eC0= 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 1675112587376857.0944533120262; Mon, 30 Jan 2023 13:03:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFv-0008Bk-BP; Mon, 30 Jan 2023 15:59: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 1pMbFs-0007u3-PN for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:56 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFq-0005Bs-NP for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:56 -0500 Received: by mail-pf1-x42f.google.com with SMTP id c124so8750427pfb.8 for ; Mon, 30 Jan 2023 12:59:54 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:53 -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=v8325g5Oxoa3Q6Nszi20oELSJVGq05Ncj2q1+wr+VKE=; b=PgB9eKCJqwRdnx+OzYcMd3jfD0E7pNDrsC6o+jHiPTv3rzh9pvk9lllA2V/updHGOO XeT365Ua2CJtUMq8VjbJ7qvBOY63IgsqIBZ/Z4y1jzs1XC16YjOa8V0ap33GL6dS5R/w vysHfaVGdfGkXWeCuI5nwgaqWKlJKjzi8phJOQJ+nAmTx9Fzho0pf1w0U0F/xJBYXyTN VF+7HyYtb7MIm0x0dTsHbJR0bzTHga7TUc6g3r1hl0QqqRXtRfI/o2vTze8pcGf4rARV Poxru23NSfQ7N7Z6YSOB5XDwRv5M5SOi04S+iNSMvbM3Ee2yPelf/oS4Qc2eegD7ym+F 0TSA== 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=v8325g5Oxoa3Q6Nszi20oELSJVGq05Ncj2q1+wr+VKE=; b=T1jhr9dvHIcwE5ihI14lA2bXxMnM2RVyMp/Iqg/CfY8URA3wUPsDp2VQg1WpNe2Iwt EC6+2DDBqR0wZiSoQYPOzju9gpP0zaaod84DOaG41UulpVDaOE50f4j31xGTV3yYAayv z5/uR4OvOh0ZJvl/+Atyhpp+7fXNO8X7bLMJ4WBJHCTBc4GC50a4YMJjRrSdMucgxVYz YADCRi5j1S1exU/A4CoDGCvgjbkZtiDu8EG9+g+R93A907etTISr+nK6TtQXErsYOzwC A6ROY9XlQCPceNCiSaGCiOwMtCiWjZkCWEMQ9afGGKqs8eAbOifr2rKW4+0Qi6pCFkij /Cwg== X-Gm-Message-State: AO0yUKVWLnkYJNWU7K3zRkHN1MX043C7PDCHKzIZNduQRR6UCdJNZujf D1YWO25OvXRoEgVTF7pJZq7t6mkwp5cn7mry X-Google-Smtp-Source: AK7set/0zztyiMq/dagZeNxs9abaeQQ0fbczoqSpUERH4D5CGF46IlFkKrKu/xI358MONxiHmf08bw== X-Received: by 2002:a05:6a00:854:b0:593:d2bc:fc4c with SMTP id q20-20020a056a00085400b00593d2bcfc4cmr3568984pfk.13.1675112393953; Mon, 30 Jan 2023 12:59:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 08/27] tcg: Pass TCGTempKind to tcg_temp_new_internal Date: Mon, 30 Jan 2023 10:59:16 -1000 Message-Id: <20230130205935.1157347-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: 1675112588779100007 Content-Type: text/plain; charset="utf-8" While the argument can only be TEMP_EBB or TEMP_TB, it's more obvious this way. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 ace910cf3b..bbede1e900 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -853,7 +853,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); @@ -892,13 +892,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 @@ -911,25 +911,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 @@ -942,13 +942,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 da02a180b1..dceb120be9 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 Mon Dec 9 17:40:38 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=1675112588; cv=none; d=zohomail.com; s=zohoarc; b=ljnlH3BdtEJ5WMTMjcnqHoANIdr9czXGLiQMa+7/hDsplm1bt8A6V4gtOMocx+0GbNxTPqE7hxIQm5Xb3namDQhbFhmcV6XR6u8w37dnQ50BfRnmFZ8eMc1PaLeP2jczoubjZIFHBWk88rT+nBIsY3CivwUu9QR6vjHRodUIlTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112588; 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=cdYpQpQ5SYl2o8UdmBXZaO2pRh3PKqoimMJzfCpHVmg=; b=SUp7I0GO1gGQuGoI1Y6DSCcknODSy5dchHgr1zGYoVYCsAs0eGwzPRhrf4kwHAjM8MwOuwsZRxrUZTfFc34ifOFWgJg2t1CphOkHICEjKwUnyr/e1y3ElaUBOqkBU+UxDXfN7pVMRMGaYJcx0q2c06sA5Np6DZtMK/huCPm8mX8= 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 1675112588377480.75774493942185; Mon, 30 Jan 2023 13:03:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbG3-0008GZ-JG; Mon, 30 Jan 2023 16:00: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 1pMbFu-00086i-HK for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:58 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFs-0005GB-Rg for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:58 -0500 Received: by mail-pl1-x632.google.com with SMTP id m2so7980705plg.4 for ; Mon, 30 Jan 2023 12:59:56 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:54 -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=cdYpQpQ5SYl2o8UdmBXZaO2pRh3PKqoimMJzfCpHVmg=; b=T/FTpHGmWftTaoUCPzcEiz1/FoyA0SxhO3Km1srnWKn30CjHyhb+zTzdhCFLIPkerf DwTLrc5IOCakJw2lLrtrxd9aUMS5MOeAvutbNSit3whP5hTaLlr6ycnySAW68MyMMV+C O3ukPzltuiBc/8wdKlkwBVi41QOg8uFIxpUUUtYX5HhQWD+cYopSqCl0hovVcI0tP0Vp Y+DcQBVzZWFYwpvgqoeQtSD4dKvhU78xNVgq4QMYI3EdowNWJ3hHStsdADuYoddt6woV RYjHliTWDadXe0AW2Owe6I4bv1zFBYCZK14PDatwq5D8leGkRqYqR2/BeULN16/RAGua ecKQ== 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=cdYpQpQ5SYl2o8UdmBXZaO2pRh3PKqoimMJzfCpHVmg=; b=J9/rmIsyl6VywG9DBcduO3riDmPWueuniXX92qINdHslyqDl/6y9q266rFdgQhJIBd nO3DUTD7Rxf3RIgj1ZvWJ9eSEYULU7/BXCQgoXSrPijglCXEYoo8WRq1u4HVJ0YDnN2j kmX7v/TBmQ8C0fAboT1jC7ZEL5T5KZxvAZP12MqM6wiM35tSZ3XbDT0wvgFGFLC5v4ue H0Je93bp7xL+7zMB4uD4Rph8VXIRwm/FQq8UVholWVOCrvuQmfbKaA3E+Kc+cpRPQTVq q2t0uBoMVjtDE3zk56cd9ANLFSkyXQlMxRtJ5yrOker4RTUsVrQwtM/wZ5cRmSx5ctEi XqIw== X-Gm-Message-State: AO0yUKWXLkP0iAXlBs2G7z6mbpjJxvCNNeJjOxI9WvC2AuCvjclZ5zqT EtMzxDySgU6E2u+nwCvr7gKMZP4xyzFCi7h8 X-Google-Smtp-Source: AK7set8l70+kuZomfbkKDzxndppvjnjt9GpP6fQmeiufQ0yiu/OyvyOzktKSeHbCDZ3h16GB+biE4A== X-Received: by 2002:a05:6a20:938c:b0:bc:bae7:642f with SMTP id x12-20020a056a20938c00b000bcbae7642fmr9989251pzh.58.1675112395401; Mon, 30 Jan 2023 12:59:55 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 09/27] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr} Date: Mon, 30 Jan 2023 10:59:17 -1000 Message-Id: <20230130205935.1157347-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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: 1675112588756100006 Content-Type: text/plain; charset="utf-8" TCG internals will want to be able to allocate and reuse explicitly life-limited temporaries. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/tcg/tcg.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index bbede1e900..fe57373d4b 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -890,6 +890,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); @@ -909,6 +916,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); @@ -921,6 +935,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); @@ -940,6 +961,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 Mon Dec 9 17:40:38 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=1675112804; cv=none; d=zohomail.com; s=zohoarc; b=AGIDAbXDvMnhbq8keXOhfR0SOyYsPXQ2HpQvb7AVMin22QSOxXAKRt+/dKZW7HNduwLncYYljrOplFrGADyDEHr7TuecwPUotmY/Tv49HU5Qiefte314hVx+1PCnnI2Wt6Gp/Nwsls/wlRvcmReuR8+rHYTQASk38bqG3uSckU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112804; 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=YgVGCieNlPxoyEgaWXSxq/bB4MIJjGptm+RNX2KPXVY=; b=CI6zA2WnbBJSDV8Ff8F/sYQSgcAgWQ/npaS30gYcV1JyiTm0iYxiw3WtUB/Zxu0/uJMAsiLViRzexwa1IZwgM2BKeQtxyQVTLjgguoGhW1cwdrVflkpGgnqjTO91Eu5/TU+lSpJEsUUpIgmkaKIbP6wTVedr7nMhZXf78kZtSDY= 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 1675112804703706.8663167341919; Mon, 30 Jan 2023 13:06:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGH-00006j-5F; Mon, 30 Jan 2023 16:00:21 -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 1pMbFw-0008EJ-3x for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:00 -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 1pMbFu-0005GP-BR for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:59 -0500 Received: by mail-pg1-x530.google.com with SMTP id 7so3671489pgh.7 for ; Mon, 30 Jan 2023 12:59:57 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:56 -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=YgVGCieNlPxoyEgaWXSxq/bB4MIJjGptm+RNX2KPXVY=; b=y4qb5gQz1a9K5hNGoGTKmnvScFYL73Vp2HPHu16JeoW+psppiGg0IR53sYnZX8rZZG 2CBB8mXzt48ezKdDGfqNdONpA8TiKNKuawPJEUPrkhzufgF7jRb/kUEB8ivqi/JBRK2v rCg47k2lRex7s4SY6Cyp3dj03POAab9cZhxA0NcMbkqYqa9IGc9c4o2ZKtqKqtVD0Vfu wX4rcZesRkeVfpFZALRVxAaOaijIaP/vSsqhKsn7/QT9YHNS4zMoGgQESQxwhrWUfWcK GsG7RfFEeb2mPYrscmaQXqMvr5XMf6F5Pi/4jGIQCf8UHr0JfrKgXjbRF8eHOsVFA1lO T17Q== 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=YgVGCieNlPxoyEgaWXSxq/bB4MIJjGptm+RNX2KPXVY=; b=Lm059egxpFZeOzoX6Prt/o3uzsObFVbenF3JGC95rc0PEIeJOslb/qdHz9/RL6A2sJ ddnHV7tCHTkJoyL2L1AUTynAHJiZFPIzc5yhIPisPeXXtGhTsS+3ODHWq6mI5boXKzQf /vcdSIiS/2Ut2N1CSRhblu9p0iokwlX119kIpU54Oe/RHoYihiq8wh7Rcw0tH4RnjYhr 4Nz8CrfYoR1WBJMldZq03etjdyM/ih99N5eIPK1EX+kw4cmbzQx+RTlZ4n+5Anj2QLaE yMCVIM2Y3igtg/5Pn4q+94Fp1mr/kkwx7xizfUMh4wIkHCM2z1sg7iBKa0fHZfjt+OgE tQ5A== X-Gm-Message-State: AFqh2koKbzqHXuHPGkESvCkfUxTBC1KPGkiaqTl4nyX2pg+B2xcfb69b XtzH971xHeXve49LuKDvjlkQbdoFeC52mCSx X-Google-Smtp-Source: AMrXdXvySXxzcSrw41TeSeV3/DmfO95/1hPowPFFAKJKmYysEtQo+aImMod2g/EZoHw9ZDlW2FaUNg== X-Received: by 2002:a62:1488:0:b0:586:b33c:be2 with SMTP id 130-20020a621488000000b00586b33c0be2mr48636969pfu.26.1675112397048; Mon, 30 Jan 2023 12:59:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 10/27] tcg: Add tcg_gen_movi_ptr Date: Mon, 30 Jan 2023 10:59:18 -1000 Message-Id: <20230130205935.1157347-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112805963100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Mon Dec 9 17:40:39 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=1675112553; cv=none; d=zohomail.com; s=zohoarc; b=RhXS6Q+0K2l3Pe7WQQB6zoYcwyF30RicNLULJbHo+ghYwp92j/fAA4LPYKodJozh4uDAWtPNTTPNzX/nVZwSuyrL2SWGwNgr0++C9l8XEhm9TSaWl99AuHN7YAJaR+mfixc0RRh1ygI6a8h9vb/qxj/4LTGt9XtNVOqEjNi5p+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112553; 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=jrbB/jyNl0+/I5QCOX2u+WVryaCrHg2gHj1ZSUlZ/Hw=; b=BXDQQqDyBsjUV5m8rzZ7L/wLX1FQINtdTVu/0n1coI2Kv8xEfM+U02AhdGU31pvLbBxlaG+0BcMRd9ZCJEtKmmW25JziFgizolQcP5HJPPDWCqVMbNdfmm4Vs4HNPNZwCu3dYK0kUZDMymg/OIO+xEr0MgV54StanoZMKYs6OKA= 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 1675112553874402.84757622770815; Mon, 30 Jan 2023 13:02:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGL-0000Jo-UG; Mon, 30 Jan 2023 16:00: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 1pMbG1-0008Gi-QB for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:07 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFw-0005Gg-Ph for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:04 -0500 Received: by mail-pf1-x42e.google.com with SMTP id g9so6701480pfk.13 for ; Mon, 30 Jan 2023 13:00:00 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59: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=jrbB/jyNl0+/I5QCOX2u+WVryaCrHg2gHj1ZSUlZ/Hw=; b=O5ekH/HBvg7sdz2gW/UIjfTzoRQaIxHod2XCI2GV7NHaJV2I5fZEZ5XQZzhR2X390h AGHNVLyFYF3Raty+GFfW98qMF841MMqxGhNpoTnrtK1FMPmAv7NWS0iiKt3XjeW5OasG YxVVHXleZ0i6WHEg8TqLV4du0jV/bDFbmrl7zYTpZkJEpodOoBV6teOT3vQpHEmPCmuh AsUmpBSqvEq3v8q2VjHa1pAWHb97bDbl39gMQi5pKTwcUiuk5xDSc9MoEZW7Eb0Ubp7s 4BcLg46Kd51fGcFqXMYSWnQsx+xx2vOw8yIOigj74xcEsV3DxSGIY5LuU1ycezGJJQrG 0OWA== 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=jrbB/jyNl0+/I5QCOX2u+WVryaCrHg2gHj1ZSUlZ/Hw=; b=KDgGospGT83S5DmtLJGaG6L3jyCfa+6hG8TjCjAGzYo5AHq9sK2tDQvUGTF7lCSJpx 7HAGiIVU123BrXh76QeOlPXAtEnA9UlbBaUr049MVM66KLfpXe/R4wDYN5u3W6VSy3Qq LUs2meM2C7r8nOSAXpXz2sh+3s2HHdOm2aVFQkc6zAfdSRiqDjvDw92/VgbkisHcMbjr wtmn2K59tQFaauYwl6cF8VeRHqu6DwRk9S68YJ0Qy+/r/s8Bmd+6TfQjeku4YXzPoy/u 3W75Av0ss3hqxm+KfxNbRLv/NlrW1nTtSSSjPMczJAMMFN2qlmnEowtsv6CjGSKlY1cI UfCg== X-Gm-Message-State: AO0yUKUQ3EPQ7X60gQ9oLVLpDiKmF3Jpcxjrx0xInzTRDD8Ex78OQneK VhjhUz+tkvP7ao1LQuw7688MCJtrpjj20238 X-Google-Smtp-Source: AK7set/k32JohX4SgVgBsydOvqEkEDb38DOLowLbQDJcefCyyJXHlOjJwxKCiwIhXG86DMUL9Fpo+w== X-Received: by 2002:aa7:9097:0:b0:592:5e1d:c7d2 with SMTP id i23-20020aa79097000000b005925e1dc7d2mr12978987pfa.23.1675112398917; Mon, 30 Jan 2023 12:59:58 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 11/27] tcg: Use tcg_temp_ebb_new_* in tcg/ Date: Mon, 30 Jan 2023 10:59:19 -1000 Message-Id: <20230130205935.1157347-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.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: 1675112554616100005 Content-Type: text/plain; charset="utf-8" All of these have obvious and quite local scope. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tcg/tcg-op-gvec.c | 270 +++++++++++++++++++++++----------------------- tcg/tcg-op.c | 258 ++++++++++++++++++++++---------------------- tcg/tcg.c | 2 +- 3 files changed, 265 insertions(+), 265 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index 079a761b04..d895011d6b 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); @@ -705,8 +705,8 @@ static void expand_clr(uint32_t dofs, uint32_t maxsz) static void expand_2_i32(uint32_t dofs, uint32_t aofs, uint32_t oprsz, bool load_dest, void (*fni)(TCGv_i32, TCGv_i32)) { - 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) { @@ -725,8 +725,8 @@ static void expand_2i_i32(uint32_t dofs, uint32_t aofs,= uint32_t oprsz, int32_t c, bool load_dest, void (*fni)(TCGv_i32, TCGv_i32, int32_t)) { - 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) { @@ -745,8 +745,8 @@ static void expand_2s_i32(uint32_t dofs, uint32_t aofs,= uint32_t oprsz, TCGv_i32 c, bool scalar_first, void (*fni)(TCGv_i32, TCGv_i32, TCGv_i32)) { - 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) { @@ -767,9 +767,9 @@ static void expand_3_i32(uint32_t dofs, uint32_t aofs, uint32_t bofs, uint32_t oprsz, bool load_dest, void (*fni)(TCGv_i32, TCGv_i32, TCGv_i32)) { - 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 4) { @@ -790,9 +790,9 @@ static void expand_3i_i32(uint32_t dofs, uint32_t aofs,= uint32_t bofs, uint32_t oprsz, int32_t c, bool load_dest, void (*fni)(TCGv_i32, TCGv_i32, TCGv_i32, int32_= t)) { - 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 4) { @@ -814,10 +814,10 @@ static void expand_4_i32(uint32_t dofs, uint32_t aofs= , uint32_t bofs, uint32_t cofs, uint32_t oprsz, bool write_aofs, void (*fni)(TCGv_i32, TCGv_i32, TCGv_i32, TCGv_i3= 2)) { - 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 4) { @@ -841,10 +841,10 @@ static void expand_4i_i32(uint32_t dofs, uint32_t aof= s, uint32_t bofs, void (*fni)(TCGv_i32, TCGv_i32, TCGv_i32, TCGv_i= 32, int32_t)) { - 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 4) { @@ -864,8 +864,8 @@ static void expand_4i_i32(uint32_t dofs, uint32_t aofs,= uint32_t bofs, static void expand_2_i64(uint32_t dofs, uint32_t aofs, uint32_t oprsz, bool load_dest, void (*fni)(TCGv_i64, TCGv_i64)) { - 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) { @@ -884,8 +884,8 @@ static void expand_2i_i64(uint32_t dofs, uint32_t aofs,= uint32_t oprsz, int64_t c, bool load_dest, void (*fni)(TCGv_i64, TCGv_i64, int64_t)) { - 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) { @@ -904,8 +904,8 @@ static void expand_2s_i64(uint32_t dofs, uint32_t aofs,= uint32_t oprsz, TCGv_i64 c, bool scalar_first, void (*fni)(TCGv_i64, TCGv_i64, TCGv_i64)) { - 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) { @@ -926,9 +926,9 @@ static void expand_3_i64(uint32_t dofs, uint32_t aofs, uint32_t bofs, uint32_t oprsz, bool load_dest, void (*fni)(TCGv_i64, TCGv_i64, TCGv_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 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 8) { @@ -949,9 +949,9 @@ static void expand_3i_i64(uint32_t dofs, uint32_t aofs,= uint32_t bofs, uint32_t oprsz, int64_t c, bool load_dest, void (*fni)(TCGv_i64, TCGv_i64, TCGv_i64, int64_= t)) { - 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 8) { @@ -973,10 +973,10 @@ static void expand_4_i64(uint32_t dofs, uint32_t aofs= , uint32_t bofs, uint32_t cofs, uint32_t oprsz, bool write_aofs, void (*fni)(TCGv_i64, TCGv_i64, TCGv_i64, TCGv_i6= 4)) { - 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 8) { @@ -1000,10 +1000,10 @@ static void expand_4i_i64(uint32_t dofs, uint32_t a= ofs, uint32_t bofs, void (*fni)(TCGv_i64, TCGv_i64, TCGv_i64, TCGv_i= 64, int64_t)) { - 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(); uint32_t i; =20 for (i =3D 0; i < oprsz; i +=3D 8) { @@ -1386,13 +1386,13 @@ void tcg_gen_gvec_2s(uint32_t dofs, uint32_t aofs, = uint32_t oprsz, tcg_temp_free_vec(t_vec); tcg_swap_vecop_list(hold_list); } else if (g->fni8 && check_size_impl(oprsz, 8)) { - TCGv_i64 t64 =3D tcg_temp_new_i64(); + TCGv_i64 t64 =3D tcg_temp_ebb_new_i64(); =20 tcg_gen_dup_i64(g->vece, t64, c); expand_2s_i64(dofs, aofs, oprsz, t64, g->scalar_first, g->fni8); tcg_temp_free_i64(t64); } else if (g->fni4 && check_size_impl(oprsz, 4)) { - TCGv_i32 t32 =3D tcg_temp_new_i32(); + TCGv_i32 t32 =3D tcg_temp_ebb_new_i32(); =20 tcg_gen_extrl_i64_i32(t32, c); tcg_gen_dup_i32(g->vece, t32, t32); @@ -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 dceb120be9..73215741d0 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1863,7 +1863,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 Mon Dec 9 17:40:39 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=1675112547; cv=none; d=zohomail.com; s=zohoarc; b=VJcPgJpjQ2SRKBfiFQfwVrvLmrs2Zms0li1Y6kKWLDJYhOvCBodc3KxTphke6eRAd1jMaexEJXb7Jh6cG/3in2Q6IpDz7meXY7B7eVEsGGi13Gyg3NZtPZsMyIn7z2MnJfc4JspL++ZBcnsJQSEqXPkxn0FKZC3D68wjiWnxwp0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112547; 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=9QzDuYhpKFFA2gUguenBfDgLvy1ufqCAqRSkJft3ioA=; b=cBxu/zJ8kBVV4fHivAU0ap0Ok/lsppKWU92dVVMhH4alLZrvtNtnXvK70mmOjuGgF685IJJ9E2btO1u6rZDUFH12uPE89P2nOgQx1FfJq8z3XSY3MQtqsDr7xXwD8eXDW+Fd5uQiqtNu2FqWNfgm9Wr+FN+asrTwXR5yQ6RpnpE= 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 1675112547241322.850876344806; Mon, 30 Jan 2023 13:02:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGR-0000Ri-1j; Mon, 30 Jan 2023 16:00:31 -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 1pMbG4-0008HS-0p for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:11 -0500 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFz-0005Gu-La for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:06 -0500 Received: by mail-pg1-x52d.google.com with SMTP id v3so8583094pgh.4 for ; Mon, 30 Jan 2023 13:00:01 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:00 -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=9QzDuYhpKFFA2gUguenBfDgLvy1ufqCAqRSkJft3ioA=; b=BpDTKpfL0DrBEX9cTkmufwPCKPUM8pCpR4EDfAebKSgCCvBWx6ejloPli+4fmkr79t kncdTQ0LaznwK5pW5QeXNcbGpiHtaF30RuEPllGOG+M+CC58SYiMHxdROMTxvepQF3u4 gl05WQrma39/NHftE0H/ieice4p6Bwl4tKVfs8EqXVNV55rLHX9CABAg0Yk6alSIEH1o 9JZZHwJe1nbpEYVPpekKA3udqtsU/vO69nHK2noruLSUkprT8UA2fjKSv0duJ1QK9bdL tc1NvJbLhgTATEP27XRgKwtQCwPR6Anr+9BiG6VTWppGZQ86bkivbdcS1Is2zzyg5AJW uotQ== 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=9QzDuYhpKFFA2gUguenBfDgLvy1ufqCAqRSkJft3ioA=; b=BsmsC0iSI1jPbV6E1UyE4BfRMvAmYtgrXMRdhxOQcLcoKNd1xQ/F6WG1nponhPgscx 6wKLQxRhUBWT8xtLoDyVOZZ05PZ7OXBTYaHEUrh98pO2P7AJQMhvhLTXEeD6/C32Jmpb +jRBo/owx589kjZirAMXD/vcjkOu00AEAOeBXXdqpYg+DpOkdn77QbSiXvzi5EKxP0fo 011iSuYD+TQJJdtVjOXOwt4mj7WmTv70klvJjVxUS8jB7o5pjpjtYXNGilWfHx+jWC2k NRZhwzKfT7YVPSV6n2wnZivkPzMuwjAMd69f5apVdw9U/Sj9jLZPZOBlyGN7ZnvQ8mGZ vuGg== X-Gm-Message-State: AO0yUKX1e6zJEux5e1McBQ+uzYVmnRNPX1Q9yIH4e+QnSqVLA79bgUe5 Usev36Na8DQV5Al/IVRB1hCX3kR+XohUcqch X-Google-Smtp-Source: AK7set+qfDunj1wcLCBd0ZPpUGc/QFKilmnL0l6pqqG5Mvv+exIrvWO4q02jzplmVk0kgs/r8oo2yA== X-Received: by 2002:a05:6a00:1404:b0:58b:bce2:7eb7 with SMTP id l4-20020a056a00140400b0058bbce27eb7mr10377945pfu.10.1675112400540; Mon, 30 Jan 2023 13:00:00 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 12/27] accel/tcg/plugin: Use tcg_temp_ebb_* Date: Mon, 30 Jan 2023 10:59:20 -1000 Message-Id: <20230130205935.1157347-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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: 1675112548450100007 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 c7d6514840..ea875c0990 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 Mon Dec 9 17:40:39 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=1675112547; cv=none; d=zohomail.com; s=zohoarc; b=SQ47ZN8YThart45mhKhAOD6KA3oLmLYwDMlbUk1echtVUQnH5kCI4OgK7WOROFE810pQyCuyNOrtrPXTVeZSNaeLW/JeyADn2vl163V525xR+2zjoiOH0fkZ79aOGOI2ddZ4CVjB5T6502WUUkRYAMx3d1en86BBx5HWanZoVCk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112547; 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=9K53aBZoJGec2fQ0xkaUEgHlBXe38uQUbD7Y6F3/ZGQ=; b=GfeHkFpNpbsPgkXYg/JkXKdqmtnNy9uFYBDKukKI1OcLnU/pAjdrY2fjHqxowP19+as/BQTFM7DWCiKrpNR1EGMp5SrvfnuuIIX7+ihspLhzEMvCXOG11v5lv3U3RGXBl6yIf/tSdZ7uZRYkY8zZpmXzQ5CI7l+RcpeBerBllN8= 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 1675112547156317.47917831783866; Mon, 30 Jan 2023 13:02:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGK-0000DM-Gd; Mon, 30 Jan 2023 16:00:24 -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 1pMbG4-0008HT-1R for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:11 -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 1pMbG1-0005FZ-Fx for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:07 -0500 Received: by mail-pg1-x52f.google.com with SMTP id e10so8574662pgc.9 for ; Mon, 30 Jan 2023 13:00:02 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00: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=9K53aBZoJGec2fQ0xkaUEgHlBXe38uQUbD7Y6F3/ZGQ=; b=Eqpj6U2dQa5XUDes4WG+B58wyQEMACz6uOz+hY8T7DE/OGLpQZfiFZFJO6RzX3Nv4o TamQA8nICQtKL7Nd8OQveTgI0l/s8Y5o6O5w7n9CaVTUUvu+rAVKtv9uQo38/VkweyNU IIMVmlpSh1HI8KL8bLb4GPqLYkJG1jMKFobxIgHJOcSUwhkCi7M3k+01gXuisrOu35me zoMaUtUKoTlOiYFObHSN30hQ1wuZXGC098qX3fzQLDHOMR5WZao4AeTWSlhW/+Jfasm6 zF/He9L7E+NKC8jW8saZTfWpv4D9PQ+QUcr2PIBSH7WMOFGekNgfmsnduBTTKdJSzgHp Y6og== 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=9K53aBZoJGec2fQ0xkaUEgHlBXe38uQUbD7Y6F3/ZGQ=; b=T0a3hcMUl2KyV5KRqrctxIVRhc9wu+p9hI6XMRLfJJMxzKHRV4ETDcq9W8SugztDwT eEc+BUkVGefSiS5yLmIp9VzdpJRuupqJqFIkp9R2utsYK43eo9/6zzyz0SDaz2NCzUVw +L10YwzWsOb0nZoNerww7xbIXIx0VEO9VMiv4ifTZfvKRtMS90kAUr2bo6COTfDPbmuO l2fSdF0Wbh+QYlT+2WrEUSo4RdiuMeWblFlk+0z8vO0eqYW6I5SptKUjfDpI1ls4oP7n iWU3FAX0t/k3kwZu2+QB4/4pAb4pEGC2VSLgw0BRNsqjqyhrTmwSKzRAa5B4Q1SEmjRk FXRQ== X-Gm-Message-State: AO0yUKUPOZySRJyjpVBrzjOXHr+xFWjD158qa6l5uZ8TQMz8TVsIM1+O J4GVm3aL7eGejsFLFODMVKGjmAVOX9vvOXSm X-Google-Smtp-Source: AK7set+T3FVDUmdSCIBjex89v45coB/WTaw1PiThO7Ro0Z1phul7nN31Dd/BcVPn5RzUNMpGD+6Rjw== X-Received: by 2002:a62:ea13:0:b0:590:13f4:e08c with SMTP id t19-20020a62ea13000000b0059013f4e08cmr7030670pfh.0.1675112402050; Mon, 30 Jan 2023 13:00:02 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 13/27] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers Date: Mon, 30 Jan 2023 10:59:21 -1000 Message-Id: <20230130205935.1157347-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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=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: 1675112548412100005 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/plugin-gen.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index ea875c0990..ae2dbd7ad0 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -628,16 +628,13 @@ static void inject_mem_disable_helper(struct qemu_plu= gin_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; - if (likely(tcg_ctx->plugin_insn =3D=3D NULL || !tcg_ctx->plugin_insn->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)); tcg_ctx->plugin_insn->mem_helper =3D false; } =20 --=20 2.34.1 From nobody Mon Dec 9 17:40:39 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=1675112807; cv=none; d=zohomail.com; s=zohoarc; b=nlmFW5VbtWqerfxLug892gcCdevF3WLeGBKhzl0LdPpTy7msQNRQiGCxQcKwIgbMUDQPQb2q6TYECW+1/Uco4eKsoqdv+KcBaECublYJmumSeohrPSENHxnzk0zKBSg4GMxJUfiCVlFRU/WkBqjoYG5UFPNK047UvXVMfhadRXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112807; 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=Trv2GbQGU2eQ0a/JYI3lFvtQZzMz/mSyCgNFUg9TkeU=; b=HQpYPmzQdhVnbWDP3E55khXr/jPwA+vGsoBax+bI9MzB4u4NSsRzueLi3L0c1xD9cgarbxvjgUesXh2CmFvp9hlYDNxJuQqFIzShHGC55mt14V+ScpBucJYuc+3cfyHlFVrvNViF7nupd4bcTjT8NeI107WWuykDDjtpZxfuleY= 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 1675112807137564.431793427973; Mon, 30 Jan 2023 13:06:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGH-00007I-4G; Mon, 30 Jan 2023 16:00:21 -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 1pMbG7-0008TT-OF for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:15 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbG1-0005D8-Gd for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:08 -0500 Received: by mail-pg1-x531.google.com with SMTP id d10so8559448pgm.13 for ; Mon, 30 Jan 2023 13:00:03 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00: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=Trv2GbQGU2eQ0a/JYI3lFvtQZzMz/mSyCgNFUg9TkeU=; b=XzT8uQkKnvHyct4UhuVk/Qaqwb54yZUTNGW5SuUmh7mOaPIO3qEJsML5PhoVcpI+XF EKqP8mOGnqhGcBCjYTThCIRnTO0foDPxdKh3ggYso4lIV2OoK03owwabwhhHAMOG+CDE ReLmMRV1UlUyUekcEi6xQ65wANomsJDVUjsQpG5ARMddJvtR6htB6oZQBvYoikui3U6X 5BoRim48+3GqTaQkMKN1JSXh2gMt+txT3zhSGNgkAPKkJIIRUrDiVSFtniJxIQJm9xqN wR/V/ftPFNvCc8ZoTPgw9HGbCktKrg6pmMk0ZXmYSia2vRXucOPUR0vKiMjE9FVKW0ZR Eo4Q== 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=Trv2GbQGU2eQ0a/JYI3lFvtQZzMz/mSyCgNFUg9TkeU=; b=e6IECjmlgcVVLzvTdrshzX+JKU5W5aiBw83E+PLPXFJ75757llRf8Jfx2sALjNphDv n+y2ntJ8ldDPXPHdfuNl1VxFKSFbYSF7rOdYzGX1aoGjmD+gB9lWb1I4I2nWKuQ/cZTz CbmI5Ztadg6jwoQNK6tz72i0qZUXaj104gpmMbg4p15htO+mCXd7U8Xgn0VUjQHk34XO 8xQtOrJbHQvWE6ZdXBqBlUqOfDQQ5MUnTRWuV0WFi7QFZNgUAg0SfoYkRwREOX2aY6ap vqRDFo5+I4+IjethvoT75OmbavussqWjz4pG78WT1TSUwHPKA6TgkE7jLez8yaCcpvsO yFyw== X-Gm-Message-State: AO0yUKVX8Ausm8KSP9PIifIEn+pUop4+S69l5LjuDzh/gXu84HjEkrtq H3cSi/QE/YmLzmThTWYhyXKHraq5ijrCiren X-Google-Smtp-Source: AK7set/8jYp6h/wi9X/tvq2EHX6yyfmUvWFJfEr/+N4oGIYINpYVs9d+Kf68gs4J6MrLqBsGJ/fTMw== X-Received: by 2002:aa7:8213:0:b0:590:762a:d387 with SMTP id k19-20020aa78213000000b00590762ad387mr16169973pfi.31.1675112403500; Mon, 30 Jan 2023 13:00:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 14/27] tcg: Don't re-use TEMP_TB temporaries Date: Mon, 30 Jan 2023 10:59:22 -1000 Message-Id: <20230130205935.1157347-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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: 1675112808049100001 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 --- 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 fe57373d4b..0a3d14ce66 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -610,7 +610,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 73215741d0..1dbba58167 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 Mon Dec 9 17:40:39 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=1675112633; cv=none; d=zohomail.com; s=zohoarc; b=OeYXfF4Iqnoql12dGZavQa7mtjNb9aCUAOS36avTtmuqDlfYv+Z/rw7HbuWS3m7RAMa4Ikm8N1J9lbt5KFGeSij1oMfwTQJZT3KoDPPjjJz3F+AQX2HLShXGJJkKQHnfaQQUjpsghdsBRLK8qpiNmcuBEjXRTr10/rIaEaw2Nxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112633; 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=so9vBNsM0K3ib/CbMgVPvTGuV/jF1OapvpvI0+Y7m7A=; b=BlaQvILQzdKqj0bYGZeZzNA0SD7BZ3/600wmsV1tKuBCfzAOH2m/VMHhU7x7aDmtQduEpzFBtVytpJmKxy1RolyjLOl1Jlo+HCp/U8lpQlgVTillZNPbdhidRWz0u8mtE4lzR7HvPDp2VV3RD6AIHtop4AUAQGp+/iuBn9IWUqU= 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 1675112633791703.6332962352488; Mon, 30 Jan 2023 13:03:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGN-0000OH-7V; Mon, 30 Jan 2023 16:00: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 1pMbG9-0008Tg-Jm for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:16 -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 1pMbG2-0005Se-CP for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:10 -0500 Received: by mail-pg1-x52b.google.com with SMTP id 36so8573030pgp.10 for ; Mon, 30 Jan 2023 13:00:05 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:04 -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=so9vBNsM0K3ib/CbMgVPvTGuV/jF1OapvpvI0+Y7m7A=; b=NEy4CbkvPTI7eQ5xhfYGF/ENJh/JNJ6m2M77WCwz6xkxTHKOycSk+rIaNXbiHRJgSh PXQWJSiNEklda3xXaBvBzzToLbpVsqINOO93Edk2J4zw+zqKUKywRAs8CyBlr+jZiZrn aNGCDq7GJTqIedS3/+p3MFuuRdfwa6HEwJkLy0WNRD55FUTfledJKxA0u0gWozsrbPi7 oWmAfX/F+tvVTtpwpzXTNHRZ84NdaT/+Ryo1ZedlKEVMA8KO6gPC3SRdg3lozZfQdZpV E72uvo9zzTBPIMrq+EkoqSto0ldFe0f2WUIduzNWR9Q66+1UgoM1n5BExFDjwc5unEqn 66RQ== 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=so9vBNsM0K3ib/CbMgVPvTGuV/jF1OapvpvI0+Y7m7A=; b=vOQqVQ8V91PT2d+O71jtTrN6jURNBftNj8Drha56OPaT96oqr+X7i6x0S5tTlY9EiN 4dWKxePg/PDRoRc65SmHgK5QC1a/ALvafJcnRTxKuGBHCUWj8BhCHSuPJ+MiamXEu6K9 azoXHxPDxrl7KcOqjEmrf0pv5XKWGjMnGit70gXQugLj/MKxJV5o6lv/0Vd7bewobeKR nCSusV5ArAy8TbBuyu7ma6hOaISDg6PGmmcB3y/RUB7zCk1sJqbeg5yNvoJM9pkaB7YN ps1MFSVxqQq16zpMSEt02c+GflnYeRXN0mqReeiHkyy82XOFOi0NQmDxfuvQQRSQ8+5i 13Qg== X-Gm-Message-State: AO0yUKVRSGFRTOU6wFowv/8lLZP6bJvCcoZa7lZCBdSrWTkI61pN7Nlo kw2X9nxPtMVvKadRhdhhE+bbTjZ+gSF990ci X-Google-Smtp-Source: AK7set/thrPP93r/9BPQ+2zNLnGdTWyLew8ZyVKupYFmZUeLM9SGneFW8OIghAgLrwaUmhLDaR0wyA== X-Received: by 2002:a62:f250:0:b0:593:d5de:f02c with SMTP id y16-20020a62f250000000b00593d5def02cmr2339017pfl.27.1675112405037; Mon, 30 Jan 2023 13:00:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 15/27] tcg: Change default temp lifetime to TEMP_TB Date: Mon, 30 Jan 2023 10:59:23 -1000 Message-Id: <20230130205935.1157347-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112635129100005 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 0a3d14ce66..a6512ac53e 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -899,7 +899,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 @@ -925,7 +925,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 @@ -944,7 +944,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 @@ -970,7 +970,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 Mon Dec 9 17:40:39 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=1675112501; cv=none; d=zohomail.com; s=zohoarc; b=ZnWwMRkR5Bw54SXCHBnv2pGgdByz+EmDM7FPhC76XYUO0vgIQd1F47GGzZcAex8oLXy4R0lT4xUuPV58gEolGBDz1tSvFmeTYzznZ3HtZGRzVS47kFNwZdzjDg//Ate3hFJGx1gO3VAFkVga+xDi+SuwfRMd48Jj4IaGSeGu81M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112501; 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=rSZ93NVjOlsJYs+Stnm1Qc6iqCekYJyqCbNnbkt4a10=; b=I0yU65QtjCV9IxaIMMlEjvS8XuasoSYIp/ak5wD4OXEGCZy7ZDNmlhsxQRbgOnK61l5NiYh1ZcqSiJIBZKH0UjLo7c2mW4LQ8AqOSrefCkJ8FpBwBDNarkMxQuK/OlE8DwCxjNp5Dqh5YnG6GCAXDuYFHmOkueMIEWoAMUsAMIE= 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 1675112501575497.16631078155945; Mon, 30 Jan 2023 13:01:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGK-0000Dm-Hp; Mon, 30 Jan 2023 16:00:24 -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 1pMbGD-0008Uw-FY for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:18 -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 1pMbG6-0005TH-Gu for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:14 -0500 Received: by mail-pf1-x435.google.com with SMTP id n2so8773231pfo.3 for ; Mon, 30 Jan 2023 13:00:07 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00: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=rSZ93NVjOlsJYs+Stnm1Qc6iqCekYJyqCbNnbkt4a10=; b=RPAkL56HzGTFTafafSZNEGBMk0/vyWqtnwtUQJNTWjb1cR8AY0K6sve6gm71FitD8h D++y5IkbxOL49eTlVJMzYnh0wvMImIo5Tyh6rLJ39AnfFb+pvzh+Bzl6AQ3txoEVCxI0 H74K17cVu/GjYtVGX82zGiazztafN6V3rK5YbyFvIfxvwjxL+vHQRdIf2CnzmPpPvp5A LhSOwZ45Psf/fgie5Uq3BJ0FYbMR47/TdgLVlrLwptfbJb1oIgQvWdlwJe/wqBNBlsI4 gflgRmFTatrg88GJGMb+KtF7ABvIk+jyL74ZKUeBuhNfa3RPQqhK2WNxUL8wYehE6TvY e1tA== 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=rSZ93NVjOlsJYs+Stnm1Qc6iqCekYJyqCbNnbkt4a10=; b=WxgMAqqHklGcNHX87Y8QtWTe7pTL1kIVLOLyzn5Y8wIa8aYp1lPV1TGcA+I6SuFMWM KMbdy5LPmMo2LoVUMfiJDF+h/dOxQwzIA9se8GToyyKiPAjKJTc6UUyH7jqRdUSEnlzF 2SQlU9ng9Son0v+yDy3SXY+halaWpTf2NWXmH8pOtCYtSgtu/MPS7vO4TGzTS9B26nkh YRo68zIYXhKrA58GOtolSMdpAR9FESyCYxC58WhPsABcdWdMPN37GJKQ25p5p1Qmpu7m 7ZUdYa2910JeUtxYP9abPRMvidj/8cpE/U4U6gdPQ88cXlLFG/hHVwZXTtuRfbxH79XG vxgQ== X-Gm-Message-State: AO0yUKWBpKTh0kf5qXefTF/YPetbcQvVdSqgkN2ZXMiGDhlOm9DaG2O5 MinYr/pGV98Fc6qYRHllZTHf9XnTiuN55s/W X-Google-Smtp-Source: AK7set8JPXuv9PIspvKLZ+p/cUWsSu99/EbbR80HC3jPOt5qAIXldvSyKODUs6/aU0lsHyy/YGRQeA== X-Received: by 2002:aa7:98c6:0:b0:590:7526:713f with SMTP id e6-20020aa798c6000000b005907526713fmr17946261pfm.25.1675112406608; Mon, 30 Jan 2023 13:00:06 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 16/27] target/arm: Drop copies in gen_sve_{ldr,str} Date: Mon, 30 Jan 2023 10:59:24 -1000 Message-Id: <20230130205935.1157347-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112502232100001 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. 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 6678894ec7..aed8b2eed1 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 Mon Dec 9 17:40:39 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=1675112611; cv=none; d=zohomail.com; s=zohoarc; b=CrzqBRtJ30o6Hmdth/YFjccjyB10BHECi8zJ6JW3HgvQS0yUunsXDd6ZKuyfV1umodqBHBhxX5Uhi6LA0sxVfUCFY0mv1BWTfp0dIXfklpCn55yuq0zMzkBMkenF3W0Dwu6wN/JM15dpI0glWsLoYDc2fIzGgDy0tr8LJoxhFhw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112611; 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=ReB1vaX5bh+3X6AkZ6hIM1RvSLfgvq375cN+IdwrJjc=; b=bYM91I26kK7HoN0UY3Jif5j/A64kafLJGvEzKePsDNVGt1XmUzBqKLKH2AcMixQLPXZcwuHP+M2H53ourSijpjQJPWHQ/2+FQWb3gSeQqKn7AF1CzQGEtkOCF+jCbBoAKps3gonT9mANQ4eTHYNij13uZtHulgvbDlmaCHDMqM4= 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 1675112611105455.5086230810997; Mon, 30 Jan 2023 13:03:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGR-0000SV-NZ; Mon, 30 Jan 2023 16:00:31 -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 1pMbGD-0008Uy-Gv for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:18 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbG9-0005Tb-F3 for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:16 -0500 Received: by mail-pf1-x42e.google.com with SMTP id z31so8774800pfw.4 for ; Mon, 30 Jan 2023 13:00:09 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:07 -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=ReB1vaX5bh+3X6AkZ6hIM1RvSLfgvq375cN+IdwrJjc=; b=ZNR+SzHo8ZheErYcJW5OzjBjOP96PRIguhJykxOlqIu2hX07mAP6UqD7dcQL2fRiXl qLaTGFkCJnexHCrInWEFcf98MLV0ix2kyypBZWS7Er64vOllt8yZnmvZuDtrP7ZDA0lc oqC1iAqNM02lgE37fO7nyjpKe1XaG0gy6lc5Y5Aho+8Mx5M40V6NVtF4F/QwHJtuzVcB +oC17DpY9Fjn2PDK6eBIFUT/s4I+mA3Z7IEzUKUjhXbKlRAF3Xgx3sLenEpP2yl/jJSZ +NzZ3BmTJihMvFh3I0fkszvj5fPJNxA1obJ42IDPI0ggSwEFE6Zx8ZyxYTrn8sSCT3KP Fxpg== 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=ReB1vaX5bh+3X6AkZ6hIM1RvSLfgvq375cN+IdwrJjc=; b=ifdygeGp24iEpffJKCVt07Aa70mu3PgdwF2XPvzAhujfXTK9exWva85Geh2ijUmQZf /wMRTvxJGDRPu3mwWN3nDisCqJ07lWFiMVbxtebY0sFhIkdR6ZPZomAqnYh9o2N9lvhw fygw50OknRzx6A2zfF8aulQ0SaTTofpuA7m1j1A4Sy9eb38dRlUCocereyNm3AeiXShD M/73kj4iZB1luu1BgwTJrurGIF3GqmanlK0MhQ3MNaCQ8H5/O2SLNzbmfLy9/dHBzyYI 7dAHi+KrBPdkW9OQVnPyZoadCzunpyJRYwvsxXm6a/Rhg5XcygFnWmpWAdzAHzXP0wKF SKZA== X-Gm-Message-State: AFqh2koLK9QrWU8s2L0I8HqJCxQn3T1FIKqKCO1eDbO0gk81mnZ3tmb3 fowtgSrJR0gN15t5aojamuqQfia0q/ZLDBcV X-Google-Smtp-Source: AMrXdXsScnovJ3iPyOUCJ7jgfH2I1r9h6TTpVmSr135XAkb8ENs1qMq37T4btj21cEqR9q/32uEsLw== X-Received: by 2002:a62:5e81:0:b0:590:22b:c29d with SMTP id s123-20020a625e81000000b00590022bc29dmr22984783pfb.10.1675112408109; Mon, 30 Jan 2023 13:00:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 17/27] target/arm: Don't use tcg_temp_local_new_* Date: Mon, 30 Jan 2023 10:59:25 -1000 Message-Id: <20230130205935.1157347-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.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: 1675112613063100013 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new_* is now identical, use those. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 12eeada122..7f70d9c78f 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -7110,7 +7110,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 @@ -7263,7 +7263,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 @@ -8670,7 +8670,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 Mon Dec 9 17:40:39 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=1675112587; cv=none; d=zohomail.com; s=zohoarc; b=N+KMKY3JzgrpKexfJqNvTfOrubUJmKzMXaF3IRZA5yvEL4xvj4Kxu2AAWhv1+xtZgz5pEMDK+yPrShcRrwdzjoVvuE23Ewx6pM8HqgqyHyf1VUkoKFVOKwgRv76H0EQi4U0FYomE4GAjdbOtilMOX6/gVxV6ypaXFFq/Y7K43I4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112587; 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=bSXSMaC/L9LQ4Mcvjt9A88GO6mbsN618bFXkABaOrpQ=; b=eTcKeXl2m3ai9TfiZQAGMhHSa7qVc4fx9bhLbPbVQ9flZY5wdZ60+/qg05bpRFvLLDNlkerg04HCto1DQ2eb8ugop6hNkOgPRiXoaBrF5ImA9Lncp5J8sBD1kzRpbnRVqW7JzFL8dYcF5bQdo3zoO44KscTggGWTatp9sM4Az9M= 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 1675112587672197.10994359609447; Mon, 30 Jan 2023 13:03:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGQ-0000RQ-My; Mon, 30 Jan 2023 16:00: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 1pMbGD-0008Ux-GM for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:18 -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 1pMbG9-0005GP-9z for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:15 -0500 Received: by mail-pg1-x530.google.com with SMTP id 7so3671951pgh.7 for ; Mon, 30 Jan 2023 13:00:10 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:09 -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=bSXSMaC/L9LQ4Mcvjt9A88GO6mbsN618bFXkABaOrpQ=; b=R4NzMTireX9aWHiVRYwGxJti/lkb/JdEXgyam9Y+gbSTUUQbRHR3n7FUOWN6o9oFUQ HZCmoT5/5JJ6Ex1Rr3CRJnU0LIxfxHjSUi9YGTh1H87qweLt4IWMuOHUNozIsODKCcMN MUpjgflbFBLtr0lgaQm7A/YTb7q34M3QsGmO2ZDMrlcdI5NcWrLnvTEdv9q8PfTO7iYD lRQpciLNd3R/jwtvO1C3sJZ+UfLBelVYsqCAxF96NHjNp4Yv+kNKOAr7P74aKyvi6mCP tIk/4vzcG4spLnUuS1Fh/q8/rOJcZjFD2s5WHMlarrQqJgVAs6Pn/K/xW09/R/bEwFsB x69w== 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=bSXSMaC/L9LQ4Mcvjt9A88GO6mbsN618bFXkABaOrpQ=; b=mKWNvDjjntXCJbBxKO39rzpp/TuA1xSwpj3SkyxLQ+caEj6IpMOCoofLHVhczpgIGD W5DKck5ReQ1emi3FA2V4vSw7UxA3s5DWhW3DUd3/hs7xDU4b4DlQXFHesrt4Olr85N1H /zC8n4AmJJZHSC+yTLNMgRPXccNRdzG9cJo3JLSYMX5X41/6DK2wXjH4s/uxkUcgsRXg 1hbBvhpaWBW4gQuRfNzCNwxcneG0FuZbpBwjRlESXCZAXZNjkEp32VuT8O84xD6dt3Qv Np450lE8Ko5mcyrPOlDjJSdo8RRpLTu9Urn1AuXvjMeWpACTwVSYH583xYtLJ0MmX8mv Iewg== X-Gm-Message-State: AO0yUKXUrze8qR+jKztUfnS0XZ+s4/ajky/xTGn+786QiX4HUNsl/OFO s40KCzzU9oN7LSnHxQHs0IKMuTYsUTdhea8n X-Google-Smtp-Source: AK7set9Ef+/to+jR1bXQG9LCoVrc36mbGsCET3EmMb8rOiINbfAwNmVhIc/gYsl6UnhJRuQdbgfhEg== X-Received: by 2002:aa7:9479:0:b0:591:6436:12d9 with SMTP id t25-20020aa79479000000b00591643612d9mr8947880pfq.2.1675112409630; Mon, 30 Jan 2023 13:00:09 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 18/27] target/cris: Don't use tcg_temp_local_new Date: Mon, 30 Jan 2023 10:59:26 -1000 Message-Id: <20230130205935.1157347-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112588783100008 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new is now identical, use that. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Mon Dec 9 17:40:39 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=1675112666; cv=none; d=zohomail.com; s=zohoarc; b=kqeJBPGbHbsJY3mzLGBN4BH3+ovWTHvC5bPqVfOmtXiZquFEBv9VM1T/VOodHfr6rdSW+qECy0UTxsfLej3LepXUlnd0BwjGD8/HWVAlMOibvjzn8G9SLIQcL62vQxT3gzGBtgwNnEsqkrU/DoVHnQEvdJjXb4Q6X4m+hJ/4DSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112666; 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=mOKjD8VcX83ClTq5mGX1ntqAaj2G9IXj65v9tpjAGTg=; b=il6iCqF9b1b1YMzHdfXaOskzVhbJ5L8jVZQj7/h9Dihw5UF6jgqbg1VCOi0CYWcvQmKCg8xBbDT3UsHZ30z7vRxbGv8Opj1CtC91A7DqZgalO6VunUS91jVFf1cVNcwPEfJEMJ+yzMlb4UT/+yfX59YOuOcb+uG6+Xv87R1UwIY= 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 167511266625143.08849958370672; Mon, 30 Jan 2023 13:04:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGN-0000Pv-W4; Mon, 30 Jan 2023 16:00:28 -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 1pMbGE-0008VT-CP for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:18 -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 1pMbG9-0005C8-FH for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:18 -0500 Received: by mail-pg1-x52b.google.com with SMTP id 141so8614941pgc.0 for ; Mon, 30 Jan 2023 13:00:11 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:10 -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=mOKjD8VcX83ClTq5mGX1ntqAaj2G9IXj65v9tpjAGTg=; b=vIQ22O50rvgg3l/JBOwGeDAdUEeQshy62u7SBfIv076ocV7W6WjSigA51pywZnUunf I3feAz5p2GlqUNL7ulYXr9BeKIWJnbqjP55QdQTcVnBqftJzXuMB5SXhIxMrZhFqWCdi ctQ++g4z0ckRKe2AgkTcW+TrREkdfKYNWlRIYuJQSTNgv6RUztTGPRKyNyzIDhDWGEYP XfPtBd4cj2bjEXdeeDPlkRJ6UbRk3+Sa+kdbPumMjJYJ3jkWuHL21PEO2gbI4DPiaUMr ayzVTiY+mvzSfkU2pYMVxi4W6yIkQ4h7mNo9s8BaCAKsVJPajtdOuSql3k3Zm10iuZBW 0+xA== 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=mOKjD8VcX83ClTq5mGX1ntqAaj2G9IXj65v9tpjAGTg=; b=cHRXn5Tcz40cIxwqht0VwCDOrgqQBW54N47ZmgPaOeUvH6wVd0exiAuI25G7h3QoNc GaqFecnLbYstmJICCpfRrBNwJcywdXyf/hZ+52wxJpkwZQKDPakKEcoD5q9L4P49lR0e yfqL8FPE2G5iDCQkWoXpcIDioq59bqpGJJiG+bNqQpmsEwb+uLRKAUdamNYXf0MYuwv5 fOtCFru4LT+w3ddWSM0myYceCk4IJ02bWoYKeJw5rLUhdqG4Oza6ybw3hmNVaQYAodj7 6ZalCbmVZfZqRVFNbLFC/ZGOU1uCTEAZS8y3+qFyijUvqUIpuAZ0bKEFszUgSDt+JPUB jGLg== X-Gm-Message-State: AFqh2koN9kF6VYkl7y5M6fM+9sCEva3XSCGnbatydj4h5bn6NBNubOwy lRz2ckZo31lxomvyLNhdZ3ERY4JSvhyz/HVt X-Google-Smtp-Source: AMrXdXuLPpF0tn9Ecex1jWf6lgVa8taLBf2KkEKKRDkV99M+jZlHdR64fIbRkTKoPQ8yGIHOpse99g== X-Received: by 2002:aa7:9259:0:b0:58d:948f:2acd with SMTP id 25-20020aa79259000000b0058d948f2acdmr49721955pfp.33.1675112411336; Mon, 30 Jan 2023 13:00:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 19/27] target/hexagon: Don't use tcg_temp_local_new_* Date: Mon, 30 Jan 2023 10:59:27 -1000 Message-Id: <20230130205935.1157347-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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: 1675112667298100001 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new_* is now identical, use those. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Mon Dec 9 17:40:39 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=1675112789; cv=none; d=zohomail.com; s=zohoarc; b=Oe0jVQw7aqxIQSDVjmXiriLkYjepgjLLtFej8Wa9revQBsHKTtrtqoi0pHnJ7qlsNjtZnEeYtB+rF3eepuhoK0xXMA3zggQuaUNi7OYKsS+wz485WW0QVdKG3nUAk8HopOrZKyP00+5X9OGeI7w1pKm7tkb1NHQgd+f1v3w58fY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112789; 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=QwpLnuYCUpmcV4+JYwkmOkFpg7UmEeQL/zP2GZlbo7Y=; b=j9vowO2Iq3xEOJVfKa/gYowM30wt/d3YNenkJLUi0WpyHPe0Tp376n2xdY+a1KhRpweDjnhZK4+hDbaD4CnGpjRuTkdE9WE8KXyCmdGHFMwwTTxYLdHhTvc0b/JRW887JlXKsH+NJpxEpQNLH2xtuXyEPzP7PYBGQXEFCZ8UIuk= 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 1675112789700777.8343141141556; Mon, 30 Jan 2023 13:06:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGQ-0000RN-2e; Mon, 30 Jan 2023 16:00: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 1pMbGF-000058-93 for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:19 -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 1pMbGB-0005U2-7C for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:18 -0500 Received: by mail-pl1-x62a.google.com with SMTP id 5so12994643plo.3 for ; Mon, 30 Jan 2023 13:00:14 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:12 -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=QwpLnuYCUpmcV4+JYwkmOkFpg7UmEeQL/zP2GZlbo7Y=; b=bKDRmcPTLhibQxqaeBplk9xLkwE9vVqKxKmCj4i7dmYQ+WIRg4LyalrbQfpmsWZ0aE /mZi3HAFIAoqhYbgeMmMVQFS+jLU9fDGosq/dt9nVsF1Vsy+mCPRF9/qKECllwDVzVgB 7FKcYNZOtQqJdQW2fX0VzTv/OXY+pwcaTQwshVrrhXIqUHYlLamOoLHlOEECuQlTkAuB Byw7qniaatbawPh4GoMxaMYjfVzOB6EkWHosJMfgkQAPzFW1t5PlvqA+k0FjQDer3lzC zHAxngMW5MbdZgvJGDjY+gUaPll96q4Fm4FHowJluJxUHT5H6LRzSVEbP7qBsHYgXskL Y47A== 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=QwpLnuYCUpmcV4+JYwkmOkFpg7UmEeQL/zP2GZlbo7Y=; b=kdPC9Sj2cSOd9XxYnOy5X/CD66Yw4Tvg4lXY3VBzBTQAheapNQByQEu4Xa/V+uLE7D VxQvo1JKkGhYf4TLioM2pfPWa6jbS6+ye+k4dnKuRRn0+m9Sz68oRG3ovtBB6t7gJdnU C4tnGgq994k19pwYtm2YZJaYH7MeuHvcuy1Yd/y6t3anHaxiZ8mf7LRhIMs+fbBCNyta ymj1KteX0PxkwYwJv8Ymf+y6/ibYu2cmdYm63CjmuGtpOJoSG7O4CP9/uyfu+Wvlg75G XxnTME9oO7MlbSkUKUYBAhQPF2tNN27dsvtEvcNhOkyYm0I9OZ20EyeTHpnEhT2q+CL9 X4jQ== X-Gm-Message-State: AO0yUKWJFJVIwoyZCJki0aCxoAbJoyLE925wc3u3cugK5GUCmkzRcmLK 9+EOZeIW+ER1hYtajGhrmkQi9TQHbqr/q9xS X-Google-Smtp-Source: AK7set/+KKiUlQqGg5DshQ354PYYT/xeM0hsZQ5giiW7qxj3YWT4qpQm7EnyEfp5xDuUWln9FPoQ9A== X-Received: by 2002:a17:903:244f:b0:196:4643:e1eb with SMTP id l15-20020a170903244f00b001964643e1ebmr21248035pls.36.1675112412836; Mon, 30 Jan 2023 13:00:12 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 20/27] target/hppa: Don't use tcg_temp_local_new Date: Mon, 30 Jan 2023 10:59:28 -1000 Message-Id: <20230130205935.1157347-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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=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: 1675112791856100003 Content-Type: text/plain; charset="utf-8" This wasn't actually used at all, just some unused macro re-definitions. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Mon Dec 9 17:40:39 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=1675112758; cv=none; d=zohomail.com; s=zohoarc; b=TC4lvSC+YUi1tL+a1JdkY5e0MaM8irjtPmvf50SplgZdOS1nwFcSS0YVMu57cQxF5jJMaqE7K5584NG/OeoSjmj9FgfnnRWV56g/olAgrigrJ8NgN60hpFgCnvS6ld0Ps8qXCHzMDUJzJh2wq4khYlZOdTADeO+171jEOYybDnc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112758; 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=0u20gsf2ENiHja2ejvMJsVNYAIujBWIKn6lzC+qXv58=; b=Wkq6n2wVJan+wfZOt/M4qlP3iM3Uk7ofHKxyg9PDgLJ0EPMNYitNRWc6hBE96OnjYf861Um8RR+gUyeS9XezqwteBS1i4N6+/eYvllzwKnPpt6NmohK8ojMTsEqJDwzSSRFdts/2joGOQktKbJeCyN+UQZ1sS+hjyR/fXq0ONVo= 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 1675112758590661.421492212195; Mon, 30 Jan 2023 13:05:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGL-0000Jv-TK; Mon, 30 Jan 2023 16:00:25 -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 1pMbGF-000057-8o for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:19 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbGD-0005UI-6n for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:18 -0500 Received: by mail-pf1-x431.google.com with SMTP id u5so8436874pfm.10 for ; Mon, 30 Jan 2023 13:00:15 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00: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=0u20gsf2ENiHja2ejvMJsVNYAIujBWIKn6lzC+qXv58=; b=uZh52Yit3q/NgpfSk7mgTwW87hiVDkYm17t9NenGgpLg2BVHVyAfpSOMnmBatjon4Z 3M7pRKmfiwrMnQfIHLmGDetcyAVx+NQL491zmZ8LgSp45nWD6oPe6HPt3OaRaO1IFoGR QQILZv3vVKbrTZSvRUmmq3XoOuMQ32t2Zf7ftrmUdxPeQyQ/7gOd4P3BeSMNUSZ9CeyD 35P8Mqgaz7BdiBDKH5gKLBFwkERKnAYLOc05HqmQ3hY9k8iMqMXsv2el1IupioCxU6Y4 eqOEiUeJJDMbiE/THrgeHhym0mH54E4jwPvAhn3gMGe6Tj1EZplJZNaDrBjul0aU25y6 MlPQ== 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=0u20gsf2ENiHja2ejvMJsVNYAIujBWIKn6lzC+qXv58=; b=qwYNAMhm7DtzD1plqKj6vL8+KVTkTOgRBSIjJB+R3sVAoIYpTmzdnwyzIOzi05bZAF pNH7h0SsK3T9LRbkJTupkRYWySuBUQpb8LuWUefQss4K3lF5d/k7521WdWYWUs2oFDLD X3bRB4dpQMI8lDlgLbdGu2yZwIu6NxCKloRan/BtKIgZIb6GvBXah9WYyaMmkaIhkg2r jFEArxEE/MmYGu+tuJw2z8OsXzLLtuW/2Pcqa3mkXnoF6I/0ZWTf9LdzPEO8DUoA3mr0 hFWSLjXaOtsARTijXe+vJt0hOvcwOUcDGTRLwOkygsrAqUA5KbFYo7WqGUU/Luh9xbkP QYtw== X-Gm-Message-State: AO0yUKVJ6fKzn/kaLS16l/186Z2c2hgLSuKNS3LQq4+Xrw6udJTmpKU4 gVJcBL41aTJi+BHES/i7nAJKPp7F4V4mUaOE X-Google-Smtp-Source: AK7set+RpPjNaVQWEkW3SfCzMRRo3J/TdoAn821825rnCRiZUHtbiw2XqsLslOglgTpwmvoo89nBGg== X-Received: by 2002:a05:6a00:2289:b0:592:fc9f:8ae5 with SMTP id f9-20020a056a00228900b00592fc9f8ae5mr12808835pfe.23.1675112414350; Mon, 30 Jan 2023 13:00:14 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 21/27] target/i386: Don't use tcg_temp_local_new Date: Mon, 30 Jan 2023 10:59:29 -1000 Message-Id: <20230130205935.1157347-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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: 1675112759773100001 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new is now identical, use that. In some cases we can avoid a copy from A0 or T0. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Mon Dec 9 17:40:39 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=1675112611; cv=none; d=zohomail.com; s=zohoarc; b=CzYSSrVRinAsiaaSZZpMPHefd06vu0GIOJRgf0ubvBI8zbdWNssxfvAMhv6PK5jTVlr+J9M6ESNRovZJlIGZ1uDBD0OWtQADhdDamRvRejYSVRoPMPIKJ9qFQddesA3vPkLbpb8cBeFZNAsonNKRfUs5mSDDe0HwwpHawcbaFgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112611; 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=92cLwvWKpQSlnRj9OzB9tWYtr/L5m9d1YA/FHn+sjqo=; b=HsTjS2SJif/UQCkEUCSZCjXj31qZPLFiMYW6PvQgzKLFnH50h9yeWr41oxjvQjMDXdhQlpCMMPOboBfrAM8j/lb5fNuA07E4DmkaI9qCHntlT5P5R8YOCvS4DXmHQMgedfxVH1pB4GoWD1B8Q3evNnDBVGb06nMxYqSiN7IHgv8= 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 1675112611603254.7065316395923; Mon, 30 Jan 2023 13:03:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGN-0000OQ-7c; Mon, 30 Jan 2023 16:00: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 1pMbGF-00005o-JW for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:20 -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 1pMbGD-0005US-IN for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:19 -0500 Received: by mail-pg1-x532.google.com with SMTP id q9so8581637pgq.5 for ; Mon, 30 Jan 2023 13:00:17 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:15 -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=92cLwvWKpQSlnRj9OzB9tWYtr/L5m9d1YA/FHn+sjqo=; b=xdcW8QLWnmxTxboqg15p60L59Cc4sfusbOM2jNmCz9dOwtsxdSON19E1N/4x/+R6G+ dDcTKO61zN0HkCh/SRkNUNO+Tv/Q85IJim/7HQNRdrquWzR/3ItKE+t67cD7Wihq6Lfh GBEv/IXoffPFFiJXDUBiTu/iA3k2hZYXfHWBhy6wTvNzvYmFehlj7o/Zxq5mc0DE0uRy ++IesUJd9dcT9PweJAICzM5O2oDn5FnckUBZo01ibE+HLzANzbEd4O2+2v3753D59ouk 7LYo8GBMFb/elHbhudUobvB50Tdg78u7jcMVFTaEB3WAfArn2bgxLMtb81qg9Lxf1QRg hsdg== 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=92cLwvWKpQSlnRj9OzB9tWYtr/L5m9d1YA/FHn+sjqo=; b=Apl/+OOxnBEcabfQz8tFPN+hrkzB1Kem7/BnwvdP1oJ+HS4o+fcrN6wMHu6LYdpF/B Hqgb0klx8hnUp6/oFhhHAUakW+Vg8kXENt7QG2e07EFci78KE8899CMxy+cExGBj/Glw 77oco/ZpRc67PH8adhqGRTuT0kJBmRfVLwqDWaQBRQjdNiZuSSFi+ZJMJv5KHkODoaer bKGYiXPjNL6RZ61N+7Tvc7rZT3tKUh5BzPfCKVnfhWmFayaCuu47Z1S5f1hG2wsodE8U HTe3Asn8dAs9WH8SFh15QLhFGOqnJYS6dy6uhVn/t2JlFMmYmm4it7T+W1x5rfB4uwBJ 2uIQ== X-Gm-Message-State: AO0yUKXETYWWHbVCTq/wcF5m/HkH2QSzVjYTDqdYjs2JpqYcGb0/feEp /8eBBrJwUNmwTosq/xkW9M6Ci7mcwtlvz38U X-Google-Smtp-Source: AK7set8aCwuHQFktxS7BF48ma4/7BpvGQfucIF3l7+5ks4+xmkr8xWmwltUHxJWQpkfFZt0zwmO5IA== X-Received: by 2002:a05:6a00:1d02:b0:593:d7fd:aaf7 with SMTP id a2-20020a056a001d0200b00593d7fdaaf7mr2206152pfx.16.1675112416042; Mon, 30 Jan 2023 13:00:16 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 22/27] target/mips: Don't use tcg_temp_local_new Date: Mon, 30 Jan 2023 10:59:30 -1000 Message-Id: <20230130205935.1157347-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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=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: 1675112613079100014 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new is now identical, use that. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 6dbd262ebc..d01a337541 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -2401,7 +2401,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(); @@ -2435,7 +2435,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(); @@ -2631,7 +2631,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(); @@ -2667,7 +2667,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(); @@ -2708,7 +2708,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(); @@ -2742,7 +2742,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(); @@ -3760,26 +3760,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 @@ -3956,21 +3938,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 @@ -8651,7 +8622,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 @@ -8879,7 +8850,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 && @@ -11410,7 +11381,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 Mon Dec 9 17:40:39 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=1675112561; cv=none; d=zohomail.com; s=zohoarc; b=cgs7qwoCrv/qWy/kxLhzqqWf3NQUOMJ1GJmiyvU786D+RY0CBS0LptrGwH0vBG57mcsfxlvq/IQ1zCKzJFux2OsRSRouBDFcn02qaK+E8QBBlKWJRJ0pUashhpJ+wpA8g0f+W3kdaVZFPcIHqhcxVJK7Uzi98XI5hNgEteRaXtY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112561; 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=To6atv+Obg0cImM5ldna6ZejhtwXEvl+wmUMgROvfPg=; b=LuU7ZmQ7QYPO5b2Td70welMroxLGivaL2dnkN4fb0utw/2ZiXQ7UR9tbPaLvala1C2Tvk80OljsHiOVpXtce9y0LoNyY9kQPpEdvn7bOQX5rOGLKkA09Ewxa9acsIj8ixitF89LLnbPkHRkopZM2FK2f1Uw/lBb6P+75QA54oZg= 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 1675112561513820.0349203246187; Mon, 30 Jan 2023 13:02:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGS-0000Sm-Gj; Mon, 30 Jan 2023 16:00: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 1pMbGG-000084-SM for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:21 -0500 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbGE-0005Gu-Qq for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:20 -0500 Received: by mail-pg1-x52d.google.com with SMTP id v3so8583698pgh.4 for ; Mon, 30 Jan 2023 13:00:18 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:17 -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=To6atv+Obg0cImM5ldna6ZejhtwXEvl+wmUMgROvfPg=; b=m15OleTD8IDlPx7rwSwocA1rgG5QmtbGcBCfC5t0LlO21SEYi+rT5PxVZJS5m7tYX5 9EJlIdWiKCIxBtzJhZt21iQfbdgifD3H3AClSB9ZjkOaJ8Dtga/TT6IHnks2O8laGz9+ OQgmY4AC4TByPOSmG3ZbhV/cTTw85eTiORvNVjqxx9PcBi9EkuWNUoB6aSGJw/s324/u TgErLmucm8/erwkZrXuCiXngW7bzf+h3uvxv3O85vfKnjDHgtWWLgSoGP2ihL8rtKzE8 ch9SF0z1+jODgrbrGIW5VpFiDp3/hk6RnWvxooBQML1vIfeNa2LtUwvW89GnDd4A5h5o DMKQ== 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=To6atv+Obg0cImM5ldna6ZejhtwXEvl+wmUMgROvfPg=; b=4YGeuSvLwHAqE+q4EDE4tEQPdp4rcm/gufj7F5fARUQsJW9GGMO2B7hqEySEUMQQKP CA0d+53tx0vp8jaIzlfUVSxrvQD5Z00Dev9abIQqfBQJkc3OFYtQOdnJoIl/BdILyodF Ojeqv/RKOzo8Kj2XbjR1bhMYsnR3GMZWcDLV7GocE2T6LH12fbfSMoChlePdJfvBGaqt GVnYSIV9b18Iusv4Xo9y0NEK96TUGPy7VUokpWsR8nc3a5JobSU6yyq98E80MNqdja9B oHIyoh7ItBsR/EQLVxUMZ1rIru/mvYahQh0TPZMeKD1lzR8N69z5ibDG/mhc22vttUam QA/Q== X-Gm-Message-State: AO0yUKVprooVpk2ZvpShSQq5gDt1V9brozj+mIlWM4HBnQVOTLea3zYK GHeCizM7KVHdEBR5QgMLqC8YH9ov3luRjc6n X-Google-Smtp-Source: AK7set+37qDIMWCpfv8+E0s41gO/1Ko5J+7OUht+RDJ8FpGaXDNd+eu7PaWzbZsCA9aSFscv4JEr6g== X-Received: by 2002:a05:6a00:114a:b0:590:cef2:a632 with SMTP id b10-20020a056a00114a00b00590cef2a632mr7869903pfm.30.1675112417660; Mon, 30 Jan 2023 13:00:17 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 23/27] target/ppc: Don't use tcg_temp_local_new Date: Mon, 30 Jan 2023 10:59:31 -1000 Message-Id: <20230130205935.1157347-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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: 1675112562498100001 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new is now identical, use that. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Mon Dec 9 17:40:39 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=1675112610; cv=none; d=zohomail.com; s=zohoarc; b=CM8GJu7Hkaf3n9YVwppXGmlxmpRjbyPTh71HhdY5mveHXCTruF4nvo4QyRGpG6ZS/SX3Pcv8hWG9qimHEq3hjERDvyLl/HOm4pcp0gn1lpDXneUc+2/xENH8TqEjuzNRiqCzQ3vHbTjOgTUyTQbFjmulc2R52u/+c8COmlTAoOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112610; 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=k+RB2lzG1WSTf4vy/OZmWeI3pkurVycFuFuWqjGN6Hk=; b=ZdBMl2SEO2DUnt9/ipnGuByq8WcCtRnWEYRfwfhQQDycWm+9LDf0PLyZJj/cJBdp+263+WON1Dd0jWrPeTtL9vpBfvBAnD9zLN+enDTTceLgVbnX7QWi/MdEyltfUcNuKU7p3pYHdE8oezZn6yXnrLro4ycwPl3lXp1K8HBlx48= 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 1675112610152133.0874512104865; Mon, 30 Jan 2023 13:03:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGS-0000Si-9v; Mon, 30 Jan 2023 16:00: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 1pMbGH-0000Ag-Sh for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:21 -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 1pMbGG-0005FZ-1H for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:21 -0500 Received: by mail-pg1-x52f.google.com with SMTP id e10so8575304pgc.9 for ; Mon, 30 Jan 2023 13:00:19 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00: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=k+RB2lzG1WSTf4vy/OZmWeI3pkurVycFuFuWqjGN6Hk=; b=mipyR8MAE2rwJMt3/pbkOxkTejWJkDZCF2KuY0yhVsc2sLCXIeYLc/m6yhhQDPDfBP 0LDqNB+5JS+WUtJshPdyeO8fTuSuVKTbbdG6XA9Khk4aoqudaUuM53so/vbIB98NBdPW OG2AaVzX1HfLZExXN2gKsAevXY3F7cXoH4L3Ud6mZ4f5C/leWlpPxXORc2+0Y2bIjHeV X8c8wumMNvXjEtk31+FjTdwMsfBwdz6CovC/IQzZLDG8Gal34QkjBDN71HWSuq6rHWIy xC3fnSnVjeFcSfFAZi8fsRkcOV6DgrTGXel4XQI9Q1fl0PYb6sIIxlPAgeMulqaSCsp+ ZxVQ== 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=k+RB2lzG1WSTf4vy/OZmWeI3pkurVycFuFuWqjGN6Hk=; b=CAg/rHid/W6cl8mgXBwvfE4wYXDz4qhu8wSbLFFJyWC2LyWg/tFiCun5I4qwIpRz8m trVf9vqQ4laIlRRygiwvVQ3xlSsjx892e9LK/l5OsQ5Cpq5KVILyNUWH2Xk1mbyEpJTK mw3PJ8m7D4DyWN9vd9KZhILpdMTyM6OeSDeHNUQ3KPpiFN4gxeVwEGQynxeqPYUeD0/J FA69lwKuDIe4A/apccWTMHRpkbDSfgwf6jGjIM++SUWDGscG7e8nbTcGccaY4n6raBO3 f82F5KFTslfXu3E56D2ddEQDyYfxRpUfmEk+yIdLv6dK3OCLT9QuBWFrdE48YRBTtIcy rbtg== X-Gm-Message-State: AO0yUKW2hCJAxq7UdlLZ7wQq6Z/Sm8ZCJbJrtsfNlSRT0HpqOig39KqQ uUsR1bkWNS3/U+uKUjLDaZK+t4Z45dv12YO0 X-Google-Smtp-Source: AK7set9w1Nh1Ykrxz0rgzw0OsrWtz//amQSZaKaH+eycX744PXaLh6CUWe6LJ/AbbgLhhz9woeQ8Sw== X-Received: by 2002:a62:84d8:0:b0:592:613d:ef17 with SMTP id k207-20020a6284d8000000b00592613def17mr10479907pfd.30.1675112419240; Mon, 30 Jan 2023 13:00:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 24/27] target/xtensa: Don't use tcg_temp_local_new_* Date: Mon, 30 Jan 2023 10:59:32 -1000 Message-Id: <20230130205935.1157347-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::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=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: 1675112610995100002 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new_* is now identical, use those. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Mon Dec 9 17:40:39 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=1675112679; cv=none; d=zohomail.com; s=zohoarc; b=lmeRDZBJnohKFIm3qyGNGIvNje76BHLSWq6rBqcCm9wLzQ+wpKmtVKUeWcicuy6K4Njozj2iDFfpLGfrG8cQbOa9tSpfcJuQX8Ou4IQ5mQu6YYpSBuivh9ugWIwgg+dRho2kyqu/pS5al3uhMx+Vj9tWIZjxH0kemJA6CrSZXic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112679; 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=TYlbBIJa3L4VxKtWFLrCymT5XGJJmqWmz+eEQQNGFFc=; b=YMxDhkMueOFD9cvZSGbiNjbILbGPPX/heR89QI0tmhyOs/uR2Eda1duntMT86YD0mxsWaiGfV164NDvrOo8m1D+MYsbkvnRqytscPHUEnlVXcp4phcgzgVg3lR/Cz6dUoAJt/As2xhgQ8eZkrMnZWYP0W2WoPVTGimbC6fn+QMU= 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 1675112679864887.0972789815505; Mon, 30 Jan 2023 13:04:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGO-0000Pz-38; Mon, 30 Jan 2023 16:00:28 -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 1pMbGJ-0000E4-OE for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:24 -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 1pMbGI-0005XE-3f for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:23 -0500 Received: by mail-pf1-x42d.google.com with SMTP id cr11so7081721pfb.1 for ; Mon, 30 Jan 2023 13:00:21 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00:20 -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=TYlbBIJa3L4VxKtWFLrCymT5XGJJmqWmz+eEQQNGFFc=; b=PiEMRmhmmBua0+T345WVGtB1rACpYO/hgL5PqbXmrI1Bc2cDNBDK9uOA4Ttd1URshb GBjFTv3lCZ6Z9V9K2Og2ChXVhKTvlyODd0Eh7jgUiAeHUFrf5GxrkAHlotAjbbm6TtJD w6CDhv4tjuD2MhNlcJjkWZGELUfsjaSwXl84fZbtrZkAr+GC7hcEK2ackUFwHUx9mW0O 8K+p62uOORXpdhVQybI0hU6zQFvSrD+/mDV6bgHI/qwA/9dQNR4ab3PCsVJXvumej7Ic 6gv/PJ8ZRRl4feqodEUETTlXIeCYl2kRXNnPd1ZCuPPTQrMieQlz/MBC1+BvetJCfmWF WxnQ== 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=TYlbBIJa3L4VxKtWFLrCymT5XGJJmqWmz+eEQQNGFFc=; b=rocW5OH+Fq4wdkhdCiLS9WwPDHdC0bE06zBDg9CX/fdNbCPq8TLA85HI+zxi512ERP 7oWp660F46wkqugnuwcWYOKAoM0lW/O/oaDs1Ad+oTbvK/TD9kszDoC7G24FSP9vHub3 RttCTSiAH5cxs49GM3ITwVY9FoE0aaNT5UCW7D5o+qKJosEOXuvw79UwPNh83OyAu2b1 ifBJV/KJdROtJPXCi79+qgmUneS3fFYIQkxwwjJSA45STIkfljAJwAA/PO43ReztPJba fPBM5Mnh+5hd4M54vEmsQiKzf8g74LmPdAxQnX2p6vun04j8xtEaeqZNVRYEQT45i5tf IYuQ== X-Gm-Message-State: AO0yUKXSZWNAqvQM1YhG9bsnTVxjApQgw4begMO5Bst240bn15PhW7N9 +DLN9R52jkpkj/gFVK5eLYMuf/k4JZXp83Ks X-Google-Smtp-Source: AK7set9fD28JrderBnQjgVoRreFn+UBQpXYM1ogC+J2JQRqACYVfHHhRLNIhA7ghiB60J5DMwXN5bA== X-Received: by 2002:a62:5484:0:b0:593:bc80:2d2d with SMTP id i126-20020a625484000000b00593bc802d2dmr5518222pfb.17.1675112420724; Mon, 30 Jan 2023 13:00:20 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 25/27] exec/gen-icount: Don't use tcg_temp_local_new_i32 Date: Mon, 30 Jan 2023 10:59:33 -1000 Message-Id: <20230130205935.1157347-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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=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: 1675112681452100001 Content-Type: text/plain; charset="utf-8" Since tcg_temp_new_i32 is now identical, use that. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 c57204ddad..21a1bff8b7 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -19,13 +19,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 Mon Dec 9 17:40:39 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=1675112633; cv=none; d=zohomail.com; s=zohoarc; b=Kv+y+s+qk8uZZh4T4HfioiQZgShPgjK1QcmoJuy87xE8Va8d7QJIczqud/vdgENvqJ70K4DMPOrK9B20Bjo7K7Q1wne7Yc+TgMtVKKjlWkFtSC/URi0Qeo0yNKwtcasTA2vZmcJklnbuTNkJa7pp0YIvzdTr5SKeLF4/r5drJJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112633; 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=Gcq1GqPJ1PamHZjvqnlc7yOJ/YfB7s6YLYGHgpLNodU=; b=ipb46BKzcdoUdqq2wgS0p6GyIHtjp8QAmnWDExFxXN3cRfkj6SggIaolk58Cx1pheXCDwlm/sOtH28NBdVoGtQLYBSsi3p6W927jQCncnZyHlsD1m+A6edKfVU8cfhJRO1AyunQzKLnLc5nGs+0LEqay1xzjJCczEiD02+HJaYE= 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 1675112633860797.1067544281293; Mon, 30 Jan 2023 13:03:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGO-0000Qj-PE; Mon, 30 Jan 2023 16:00:28 -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 1pMbGL-0000Hd-4j for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:25 -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 1pMbGJ-0005FO-7H for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:24 -0500 Received: by mail-pg1-x530.google.com with SMTP id 78so8579302pgb.8 for ; Mon, 30 Jan 2023 13:00:22 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00: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=Gcq1GqPJ1PamHZjvqnlc7yOJ/YfB7s6YLYGHgpLNodU=; b=gAmtoQBwEGc9tG5N/HtSXtc5Oy36mp9RN7fw2lT/ZFPmhqgZnBYEWOYQbZ7Xxt/LQ+ AAxhnIwiRr7cLS0oYIhoqcQPtCOyfSbh2RHvRIcJF7l8JvoK/qsTplNArPzCGxQSgdzN Y0tGHSY1A54i6I5WqGFETNh1RvhjmXoF+EE/zhmiaqG7CbgTaKxhAIHFK3Q0EQizoNn+ jK0LNXsyKOxOWsZsXOSix4MOhas6kF4TlJEtA9RkUzUZfCh9lfarcNL1TfPzdEIQn5Nm lCaOrs3sikcQS1fq669NIxi0fo8Xc+jxp1/EYguBZ+EdjX5VpvPSPIWh/v0M+5CatJJL UWLQ== 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=Gcq1GqPJ1PamHZjvqnlc7yOJ/YfB7s6YLYGHgpLNodU=; b=ovtSvZnqtdMahdS253y2UVJZr6j+5iNgTSSuLTF61TyJB06jJ2+Yfriqh+9scO9rGM BuN0kGiFxZE0ta8nY15XGqdzbw7alucPssCFXOMK3S+JKcp2DVT5MKWcT/GwqNgpEY3V obAkTRsepyBsc22UvHez8Xsj7ubPFqvbaFzTz7nVlnEQKd2vBfSklPh/lUtvoPXgFXgb 1l4xSoMsNSUKlpG4Gy2L0ZuxPymPq3AFfti7xdi7AGYut6tAWccUVlk6QmdpOyVqO4W2 ybxJ8j6ge4wRKhSsWRD2IKv1gIieX8iZ/WBr2XOKSMmhYJ6CXFPZDUI+iSdS+8LLGHKH Kogg== X-Gm-Message-State: AO0yUKXxIeiVZ2xtjeQKFktGzT8GqiETQtv6Rmna4KLD/eZqKKUNSEVH RhR+QrLyn7JlOJqGXsmDSZo7bfV1mTG4ZLh3 X-Google-Smtp-Source: AK7set8JlnKaRt086P/kBq8EMMQZXgLQVurE9Ie72B4EevyijVxKPm7hbv5DJkiQDTzyF2KA9TWWwg== X-Received: by 2002:a05:6a00:1d96:b0:593:893f:81d7 with SMTP id z22-20020a056a001d9600b00593893f81d7mr9152455pfw.16.1675112422231; Mon, 30 Jan 2023 13:00:22 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 26/27] tcg: Remove tcg_temp_local_new_*, tcg_const_local_* Date: Mon, 30 Jan 2023 10:59:34 -1000 Message-Id: <20230130205935.1157347-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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: 1675112635146100006 Content-Type: text/plain; charset="utf-8" These symbols are now unused. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 a6512ac53e..5432e1dbdc 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -903,12 +903,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) { @@ -929,12 +923,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) { @@ -948,12 +936,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) { @@ -974,12 +956,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 @@ -1082,8 +1058,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); @@ -1111,11 +1085,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 1dbba58167..0191ba486c 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 Mon Dec 9 17:40:39 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=1675112810; cv=none; d=zohomail.com; s=zohoarc; b=OThpYVNmyvN6/yeprOQzE7Lz3Xd97Ay7i8IjgF5LxVXdhe4EzEiTdp4BJ4/z8zpw2oPPsxqxr+T0pB+hHBlHHteqNGjs20SnkYIsUKmFpBnoet2Ja62C+IPZUQjb6zBeQ6aXVs+iSQYEhOUP08hk25Xd127qLVp4gkujZLfJbMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112810; 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=4KRif7Wsoc/WAay8HomgguVyT4DuSPlLucVRpmBwnfo=; b=SWiIgi8scT0Uc0UaV9fM6Ntp06Lr2LreLtObAh5qucJ0i8FppP9p+PeK+cl7KQYAPsuFavRyHa673m5dSuXIJKR6P8Lhix62BQv7y0U+4IgQE8IrV/TOM2Zd8t3ISh17ZMztMau806aq/U8eJlggx/21AxCf5gIYl09BcbcZuLw= 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 167511281066611.524106636937518; Mon, 30 Jan 2023 13:06:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbGP-0000R1-E0; Mon, 30 Jan 2023 16:00: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 1pMbGN-0000OT-4f for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:27 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbGK-0005UI-US for qemu-devel@nongnu.org; Mon, 30 Jan 2023 16:00:26 -0500 Received: by mail-pf1-x431.google.com with SMTP id u5so8437156pfm.10 for ; Mon, 30 Jan 2023 13:00:24 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.13.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:00: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=4KRif7Wsoc/WAay8HomgguVyT4DuSPlLucVRpmBwnfo=; b=zmokCOA0+ofzHbOQeDkwra3ovsYQfM9XYLmMfjqDA25KzWndGY4DX7jc5Gej4rrN8I tFTqx+dsOvBi6Cffmw8b45FhWjstvQkHgEewAIS0p8TZT+I23OZVNvcz47FOOOh/YnQt QkPi3JVOdDr8Hdt6+rQ3XmMmZ3tE4nLRRgtqcby3SUnK5ZdYVP/niglGJtphY0hUywo/ uKlurHSmQVpWSCojbnWHTMGNu8v6q2FUJ2ynViz5qp2B1gJ3YgynAE1/YV1r+h0sEOJE Im98IgYvICnM6pHFuDkl1Kuzqq0SdLhGp96HtdBnghDgkcBPa0wF3oCSMZOtHCpADBKr LWag== 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=4KRif7Wsoc/WAay8HomgguVyT4DuSPlLucVRpmBwnfo=; b=2K7oKafpMZ9LP0rh7dP/cw4CDCWjt0tLjI6FhcTZ/6vCudHxESQiN5EaZrm6y/zqAX z7jELgy7WqrbtR7wuIiKmGvxell/P+Ngf1Y2sjbs2zwF+/jP2nMs9JNZTJAnNAVlb4dy iGsQznl6NluaE9xcMvCRJKhe7E0c8eGFVvYF8jyRSdVoOaHGRV21HkEl/z0jSSPpawm8 M9TFujFcFle8Cf3FxA5V+TeHokAWqudBcoENHKRArMclOiAlBhACqahyh4yGcHXjbCgp CWKpw427x50sPKpk64ZUtqlvg0JDzkTybI66DHCL5vgUJGJ2OwNquFEaCbKGgKwfVj8Q jYiQ== X-Gm-Message-State: AO0yUKU1fPxOpjHZZnKgNC1wWswbWwLmvBK78WOYnu80lgxFliL5btn8 4EA5cKpdezyX0nGC6TVfUIrs2v7MHLk+sJC9 X-Google-Smtp-Source: AK7set/oR4bio03uQb9STxXYeyP61LeP47+6z3IGAG6EJUPaCmUmpD9UbzQd3hWh4szywXwBU8MUVg== X-Received: by 2002:aa7:90d2:0:b0:593:c67e:e6e7 with SMTP id k18-20020aa790d2000000b00593c67ee6e7mr4269953pfk.24.1675112423918; Mon, 30 Jan 2023 13:00:23 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org Subject: [PATCH 27/27] tcg: Update docs/devel/tcg-ops.rst for temporary changes Date: Mon, 30 Jan 2023 10:59:35 -1000 Message-Id: <20230130205935.1157347-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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: 1675112812076100011 Content-Type: text/plain; charset="utf-8" Rewrite the sections which talked about 'local temporaries'. Remove some assumptions which no longer hold. Signed-off-by: Richard Henderson --- docs/devel/tcg-ops.rst | 103 +++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 49 deletions(-) diff --git a/docs/devel/tcg-ops.rst b/docs/devel/tcg-ops.rst index 9adc0c9b6c..53b7b6c93b 100644 --- a/docs/devel/tcg-ops.rst +++ b/docs/devel/tcg-ops.rst @@ -29,21 +29,42 @@ In this document, we use *guest* to specify what archit= ecture 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 *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 -A TCG *temporary* is a variable only live in a basic block. Temporaries ar= e allocated explicitly in each function. +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 -A TCG *local temporary* is a variable only live in a function. Local tempo= raries are allocated explicitly in each function. +There is one TCG *fixed global* (``TEMP_FIXED``) variable, ``cpu_env`` +which is live in all translation blocks, and holds a pointer to ``CPUArchS= tate``. +This fixed global is held in a host cpu register at all times in all +translation blocks. =20 -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 *global* (``TEMP_GLOBAL``) is a variable which is live in all +translation blocks, and correspond to memory locations that are 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 -A TCG *basic block* corresponds to a list of instructions terminated -by a branch instruction. +A TCG *constant* (``TEMP_CONST``) is a variable which is live throughout +the entire translation block, and contains a constant value. +These temporaries are allocated explicitly during translation and are +hashed so that there is exactly one variable holding a given value. + +A TCG *translation block temporary* (``TEMP_TB``) is a variable which is +live throughout the entire translation block, but dies on any exit. +These temporaries are allocated explicitly during translation. + +A TCG *extended basic block temporary* (``TEMP_EBB``) is a variable which +is live throughout an extended basic block, but dies on any exit. +These temporaries are allocated explicitly during translation. =20 An operation with *undefined behavior* may result in a crash. =20 @@ -57,11 +78,11 @@ Intermediate representation Introduction ------------ =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. +TCG instructions operate on variables which are temporaries. +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. =20 Each instruction has a fixed number of output variable operands, input variable operands and always constant operands. @@ -81,17 +102,19 @@ included in the instruction name. Constants are prefix= ed with a '$'. Assumptions ----------- =20 -Basic blocks +Basic Blocks ^^^^^^^^^^^^ =20 -* Basic blocks end after branches (e.g. brcond_i32 instruction), - goto_tb and exit_tb instructions. +* Basic blocks end after conditional branches (e.g. brcond_i32), + br, goto_tb, exit_tb, goto_ptr, set_label instructions, + and calls that are defined to not return (``TCG_CALL_NO_RETURN``). =20 -* Basic blocks start after the end of a previous basic block, or at a - set_label instruction. +* Basic blocks start after the end of a previous basic block, + or at a set_label instruction. =20 -After the end of a basic block, the content of temporaries is -destroyed, but local temporaries and globals are preserved. +* Extended basic blocks are a sequence of basic blocks that are + connected by the fall through of conditional branches. Thus they end + at br, goto_tb, exit_tb, goto_ptr, set_label, and noreturn calls. =20 Floating point types ^^^^^^^^^^^^^^^^^^^^ @@ -120,18 +143,15 @@ Helpers either directly or via an exception. They will not be saved to their canonical locations before calling the helper. =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. + - ``TCG_CALL_NO_WRITE_GLOBALS`` means that the helper does not modify + any globals, but may read them. Globals will be saved to their canoni= cal + location before calling helpers, but won't 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_SIDE_EFFECTS`` means that the call to the function is + removed if the return value is not used. =20 Note that ``TCG_CALL_NO_READ_GLOBALS`` implies ``TCG_CALL_NO_WRITE_GLOBA= LS``. =20 - On some TCG targets (e.g. x86), several calling conventions are - supported. - Branches ^^^^^^^^ =20 @@ -908,20 +928,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 +941,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 From nobody Mon Dec 9 17:40:39 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=1675112474; cv=none; d=zohomail.com; s=zohoarc; b=cSzwTtN9qb4bK7BNGR1HJU2RC8TT4gzX9npY3j5Zid90EzOU2eBIBCS/whH+e7Lwh21YbkNFMS420bOK7HKl3oOFVxsBM4fazsWe+Qg4Vxxm7RZvWTPQD6TsFhNlfTZJj9tkhESwfE2uZyTfVTEavrl2XtpDtDKSdL1aUMZpL04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675112474; 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=oAq23tFP3V7GoWjZJ9sICzNMmPCjvQ4jyu54tebclPo=; b=kd3xo3WmCLu4KzdndH6Hao9YR7syQQ6oSKBqCKjy/urFOmMixBCiK1Tg6kZTcttlLvU/r68/mEM3aOaAHtUx2WsaWmslEI8GPPXbmXHImW7kb6hSaxpOBqXjyR7wE5tKT6V++azxmGQ3aceqOXBiG1AGrwy/etGubj4d1bNg+54= 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 1675112474238894.4388276858299; Mon, 30 Jan 2023 13:01:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMbFs-0007s0-2e; Mon, 30 Jan 2023 15:59: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 1pMbFi-0007UP-Nz for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:48 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMbFf-0005Bt-9w for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:59:46 -0500 Received: by mail-pf1-x42f.google.com with SMTP id 144so8751981pfv.11 for ; Mon, 30 Jan 2023 12:59:41 -0800 (PST) Received: from stoup.. (rrcs-173-197-98-118.west.biz.rr.com. [173.197.98.118]) by smtp.gmail.com with ESMTPSA id x10-20020aa79a4a000000b00593eb3a5e44sm102933pfj.37.2023.01.30.12.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:59:40 -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=oAq23tFP3V7GoWjZJ9sICzNMmPCjvQ4jyu54tebclPo=; b=qjQiZGB93/f0oBHU0w7HbzFnLfeIZcG+X+RObLIoh3CAPm8jFSc39N6utnjMKHWslO Pnhf4btS3E0jbc86VKqmKJLswQCXzrLOs68QZhqr5XmGwD6xB7gdYQ/N9GGMJuWloD9k EonqPWoXmJE2husTCDWHgiTqTPEqxekO5pdXLsQL+Eh1vK/J9LQqPjrVXkINuC31asJO Go2TCa2sqLj+jnIRkd+MH65eHXF7ufiXbaqjpg9dNyUZZdbRpLXgzrOh72BKtt7Q1N6K Oe2/TwncXCqBxMvDAx73oA6tkQ7d3VBwn+bDaSCxaoTOU9yLmmaPwyZXxJAC+hbfkT7Y WyRQ== 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=oAq23tFP3V7GoWjZJ9sICzNMmPCjvQ4jyu54tebclPo=; b=uqxY/PB5TJ8UZmXmRt6GDYgedSX2FisqWG6rhl7qATcPodgocYmCjpFiRXRDDKU1Gx 69N0qo+BaQS2b2rpi7I66wWeimU2j497f2qtRTwxfQ6EafFA9C/orgClFNgB8r7n9dCL 9K/d2ujVqAZVSM4bv/BcBpVm23ZiTuwVDPOwaGAXkoB7MH+pdKORN2kL6/Mje2xljX0g lE9CLWYgTMXMFgZS13fENov0Q2pQnINfU/SCx4KRoYaSLSQ2ksvrOJF/5W5MFfdT4vsO 1hBf2g5CMA2In+Hu+AzpdniUeFXL6ShwLu0xj9DB+lZTkpSZbwESyfkyOZQQl7DWs9Tp 6WHA== X-Gm-Message-State: AO0yUKWEmpUVsDIxdV4WAkv7SbD2LOLfCyb8OZ/DD48/kdpYh0ld9QzT FJx9jX1iPzLh6R0iZ8dSN5o3AmK5BWBrKl1m X-Google-Smtp-Source: AK7set85pJziVDmPs9wNw8lH0fhSt6NqGdC+uf15uzTG5f0FAAE9di8a6UfEU2lfviZJxD6OgOCzvQ== X-Received: by 2002:aa7:8493:0:b0:593:b538:760a with SMTP id u19-20020aa78493000000b00593b538760amr5341858pfn.5.1675112380636; Mon, 30 Jan 2023 12:59:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, cota@braap.org, qemu-stable@nongnu.org, Sid Manning Subject: [PATCH] target/arm: Fix physical address resolution for Stage2 Date: Mon, 30 Jan 2023 10:59:08 -1000 Message-Id: <20230130205935.1157347-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130205935.1157347-1-richard.henderson@linaro.org> References: <20230130205935.1157347-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::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: 1675112475825100005 Content-Type: text/plain; charset="utf-8" Conversion to probe_access_full missed applying the page offset. Cc: qemu-stable@nongnu.org Reported-by: Sid Manning Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking") Signed-off-by: Richard Henderson --- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 57f3615a66..2b125fff44 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Transl= ate *ptw, if (unlikely(flags & TLB_INVALID_MASK)) { goto fail; } - ptw->out_phys =3D full->phys_addr; + ptw->out_phys =3D full->phys_addr | (addr & ~TARGET_PAGE_MASK); ptw->out_rw =3D full->prot & PAGE_WRITE; pte_attrs =3D full->pte_attrs; pte_secure =3D full->attrs.secure; --=20 2.34.1