From patchwork Mon Jan 30 20:59:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 648596 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp1376327pva; Mon, 30 Jan 2023 13:03:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXuKVYXl6qzHil8bz7wZ1kMdSlUlvE3gceTfyt5+y6027oQ8L4mUkQqzYdOpJgjJfScVj8C+ X-Received: by 2002:ad4:43e4:0:b0:534:3013:1d2c with SMTP id f4-20020ad443e4000000b0053430131d2cmr66373260qvu.1.1675112633614; Mon, 30 Jan 2023 13:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675112633; cv=none; d=google.com; s=arc-20160816; b=WAbAMMRhZM1GS0oYMPZEMSjxtbvLXzXknTrD3OX94oQ2uNt4lmw8Hh9Uiq5oXxJKm+ zIqwq0YdqB0KwJ1XdL3wY7xQTKxxUWIdoAJqywB5YBomX3oGFmxS1EMo2/sulpeH4dS4 5krOWwsWJXqHy3Xezpdg3DDaevRhnb5ugwxtRybShYXdVJgJ2EyDYm0fHI6FrFHZn76W UhdYTAX5jUSQ4v05ER2RZikgFLCUoouWDHNP0iy6nuZOJX2/e7qezE50XSphpyakLLM5 GFjHgktElFQsN4ol7NFDQr6JN5ey8HBQhj9rBEMRpKnLWjT+7uC2Ulk8T73a4hseIbbc ix+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=so9vBNsM0K3ib/CbMgVPvTGuV/jF1OapvpvI0+Y7m7A=; b=PfJFGfBIP+4+gUIhbf+oxu+Lvqxck1KYCfGlKmZie4OxNmAxE9wPhc7YRc7MnBwXqK uTSG4+h+NDFL9aCP6AJbGwyK11mmhJgjoWVyIEU5r39LGh7HSmvQLYSYTfHAMPTM9qU4 sTXpO2vdlC5uH/Hgs5lwGrCl1fKZTvkTPlLQ2LIoXw9ds+nWXvIK7pc+TFnECGEPsoZH Bn/qM1j9XBCC25OuGogHGp5Pjoclo36xJA5GFxvhtjLctRgiioI/bBvrWB/8gXUtqIm8 cWKSNta0IZuYFmyOZVqT/4D3r6nguYabV3M3yU/0z8EgnkPK64CEOzRqYDNpuzGh/i3o KmIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NEy4Cbkv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g4-20020ad45144000000b0053766654cb8si6713297qvq.136.2023.01.30.13.03.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jan 2023 13:03:53 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NEy4Cbkv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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) static inline TCGv_i32 tcg_temp_new_i32(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, TEMP_TB); return temp_tcgv_i32(t); } @@ -925,7 +925,7 @@ static inline TCGv_i64 tcg_temp_ebb_new_i64(void) static inline TCGv_i64 tcg_temp_new_i64(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, TEMP_TB); return temp_tcgv_i64(t); } @@ -944,7 +944,7 @@ static inline TCGv_i128 tcg_temp_ebb_new_i128(void) static inline TCGv_i128 tcg_temp_new_i128(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, TEMP_TB); return temp_tcgv_i128(t); } @@ -970,7 +970,7 @@ static inline TCGv_ptr tcg_temp_ebb_new_ptr(void) static inline TCGv_ptr tcg_temp_new_ptr(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_TB); return temp_tcgv_ptr(t); }