From patchwork Wed Mar 1 02:56:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 657787 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp3272457wrb; Tue, 28 Feb 2023 19:06:54 -0800 (PST) X-Google-Smtp-Source: AK7set8FGSjYJ3cWMVi3XWTJd/z0GSO392GzoieXCrAgtU5/utMioZvFV/SrQE7+fzIwsAG+YV3w X-Received: by 2002:ac8:5c43:0:b0:3bf:b8ae:6ece with SMTP id j3-20020ac85c43000000b003bfb8ae6ecemr9000423qtj.10.1677640014189; Tue, 28 Feb 2023 19:06:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677640014; cv=none; d=google.com; s=arc-20160816; b=VeHP4GiSvLwvCT6Rt9Zs5aaSOZeS1zd6IDPbAgkzB/Vcltpb5JSxBgclDzRXPJn3LE 3OWtzFfHgyxFvoosK0A1DQlPxkUFzYiRVKyX4augcFHbCPXMhlxN/mL98ZvBGDIeFThf 3i4s3cLj/iG9rfwO3tMtIYaFIKqsQf1JfikORMhFn8TsWUnP0vgK7oiH2XSWNJP2pcJt 0FmOSyEUGf3P6zmFg+TzKj26Wcsu81rLr0Tmc5RozeVyMmNlQfhemC7JrVNiyY/jLAhB S5clTWaELQuSnXNA4nMQAeGXnV+e/rUEQC59dhywUa7Xpq6mwUu/dGFMkn17M1kTpK7a YWAQ== 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=wY08qeKc21qRRHHHoTekg0Uc+uq0Eu7dfqAq4lwmGt0=; b=Ghsqx2xrwqG8MfIdx5t4sl/EfEwStbXBMPD5vkxtzypvaVB4ntWvH6u4jQloTjvMiF Xse7wwGxosDaUWlaX+sKAaVp3W+efn+NSXQSW4ixOYzPGGA2U36dCrWgHjAUaZRvSPZx zpY4cnIoFV4YtXnYTkvmQ2K0bFHo7f0oOcICLKdj8IUcTFnzrbtRTJlVsecnvY6bYEdo IfK9A3SoJAm8MEK993h6JHxL/UcPoa9qhPYI/kW4V6kWqS9g+xIYBEMGKa1Z3+zvLVgh 0g87cNQBmpPlFqULV6kHo+bB02tndpt0LLXqEAMvadXKxW9F7HG2wbL4BvjRWk1wOEQc eOfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dMp/e76a"; 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 w16-20020ac87e90000000b003b6929824a4si10462172qtj.201.2023.02.28.19.06.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Feb 2023 19:06:54 -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="dMp/e76a"; 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 1pXCio-00044H-7y; Tue, 28 Feb 2023 22:01:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXCiZ-0002Uq-VH for qemu-devel@nongnu.org; Tue, 28 Feb 2023 22:01:24 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXCi8-0004F4-LL for qemu-devel@nongnu.org; Tue, 28 Feb 2023 22:00:58 -0500 Received: by mail-pl1-x629.google.com with SMTP id p6so11728374plf.0 for ; Tue, 28 Feb 2023 19:00: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=wY08qeKc21qRRHHHoTekg0Uc+uq0Eu7dfqAq4lwmGt0=; b=dMp/e76abok66rs6zx+vBEpLKzeE7WBon2rjXA3Z8ToVEH03kHYYIRwCn80Ty0QM9n Gs6xSQ3vTgqf3+o6MVkHrer/6R/wSo2l+Syv5Qz/1F0H1Mis7I5PkwmkUBMuu9gl9HIK EffvK2tGOu0dg2n/Z30DhGpf2tTKLBWSajXaJC5k/sct3xoeUlReGytVBeeOXAeiiCJ5 kQUHsFEptwwHhNI8GCXQRI0PYLoW+hK/Zwg2+4861sPWUPrPtfr3CmgRUZufAWkzWeKd x/NfP36VZro9uOLAb5n7Bo11HIft+CZiMME9sZWFf6rCzmlwicu5ErsJ5fwF9uwx50EQ oYSg== 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=wY08qeKc21qRRHHHoTekg0Uc+uq0Eu7dfqAq4lwmGt0=; b=jwvonndBB/nwlUIYd0DT81sursavVl3kR8KpebjOpt22jbeXUOsZby/Ce9uCSFdT+t gLvKF/Y+DvUCKsgeoooaRKW4kM6UiTdVrjTHQuAu6ClThU5rzwHwiup7E+A3nlqJ1kGO 3Ah5WA3O179tZCvyEKs+qFJuYhkN6YJogKadx3Buu32CyMIGFfIchSetr9CJFlZz5QGC JrwpljSVarWlnB6QoltfmF/MPBnLgq+7AcZV5Y08PhjUrEd1WbTRTe4SUqDjnA7qRnBC bSUYtm/QlrSZ6pJtjpPI4G3f8D81FJmxCME4gU3a2koHjURMx+EOBgVXuzq2CUDjHWTE w43w== X-Gm-Message-State: AO0yUKVwdbhn73YTsvU8c6NjhdbKAOJ5VNZog2dlssELQ6mEVupSF3Wg bdAg4b+JCPZFHWEJJX6F+CHswytNJz4sMGlYCu4= X-Received: by 2002:a17:902:e842:b0:19a:8ce1:2c55 with SMTP id t2-20020a170902e84200b0019a8ce12c55mr6657982plg.8.1677639655028; Tue, 28 Feb 2023 19:00:55 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id r11-20020a170902be0b00b0019aca830869sm7181444pls.238.2023.02.28.19.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 19:00:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 40/62] tcg: Pass TCGTempKind to tcg_temp_new_internal Date: Tue, 28 Feb 2023 16:56:21 -1000 Message-Id: <20230301025643.1227244-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301025643.1227244-1-richard.henderson@linaro.org> References: <20230301025643.1227244-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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 While the argument can only be TEMP_EBB or TEMP_TB, it's more obvious this way. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 18 +++++++++--------- tcg/tcg.c | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 02d5cfc049..8d896bcbf4 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -855,7 +855,7 @@ void tcg_set_frame(TCGContext *s, TCGReg reg, intptr_t start, intptr_t size); TCGTemp *tcg_global_mem_new_internal(TCGType, TCGv_ptr, intptr_t, const char *); -TCGTemp *tcg_temp_new_internal(TCGType, bool); +TCGTemp *tcg_temp_new_internal(TCGType, TCGTempKind); void tcg_temp_free_internal(TCGTemp *); TCGv_vec tcg_temp_new_vec(TCGType type); TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match); @@ -894,13 +894,13 @@ static inline TCGv_i32 tcg_global_mem_new_i32(TCGv_ptr reg, intptr_t offset, static inline TCGv_i32 tcg_temp_new_i32(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, false); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB); return temp_tcgv_i32(t); } static inline TCGv_i32 tcg_temp_local_new_i32(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, true); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, TEMP_TB); return temp_tcgv_i32(t); } @@ -913,25 +913,25 @@ static inline TCGv_i64 tcg_global_mem_new_i64(TCGv_ptr reg, intptr_t offset, static inline TCGv_i64 tcg_temp_new_i64(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, false); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB); return temp_tcgv_i64(t); } static inline TCGv_i64 tcg_temp_local_new_i64(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, true); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, TEMP_TB); return temp_tcgv_i64(t); } static inline TCGv_i128 tcg_temp_new_i128(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, false); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB); return temp_tcgv_i128(t); } static inline TCGv_i128 tcg_temp_local_new_i128(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, true); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I128, TEMP_TB); return temp_tcgv_i128(t); } @@ -944,13 +944,13 @@ static inline TCGv_ptr tcg_global_mem_new_ptr(TCGv_ptr reg, intptr_t offset, static inline TCGv_ptr tcg_temp_new_ptr(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, false); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB); return temp_tcgv_ptr(t); } static inline TCGv_ptr tcg_temp_local_new_ptr(void) { - TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, true); + TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_TB); return temp_tcgv_ptr(t); } diff --git a/tcg/tcg.c b/tcg/tcg.c index 9be3632b94..8662f03ded 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1254,10 +1254,10 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, TCGv_ptr base, return ts; } -TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local) +TCGTemp *tcg_temp_new_internal(TCGType type, TCGTempKind kind) { TCGContext *s = tcg_ctx; - TCGTempKind kind = temp_local ? TEMP_TB : TEMP_EBB; + bool temp_local = kind == TEMP_TB; TCGTemp *ts; int idx, k; @@ -1340,7 +1340,7 @@ TCGv_vec tcg_temp_new_vec(TCGType type) } #endif - t = tcg_temp_new_internal(type, 0); + t = tcg_temp_new_internal(type, TEMP_EBB); return temp_tcgv_vec(t); } @@ -1351,7 +1351,7 @@ TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match) tcg_debug_assert(t->temp_allocated != 0); - t = tcg_temp_new_internal(t->base_type, 0); + t = tcg_temp_new_internal(t->base_type, TEMP_EBB); return temp_tcgv_vec(t); }