From patchwork Mon Jan 30 20:59:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 648586 Delivered-To: patch@linaro.org Received: by 2002:a17:906:c198:b0:888:9ecf:6623 with SMTP id g24csp896868ejz; Mon, 30 Jan 2023 13:03:07 -0800 (PST) X-Google-Smtp-Source: AK7set9oJwPnivWJnpFEtlwjjEx0G9dOog6P7qip/pRMOSSgbRsXz2QjQljI52OrqsHtCYx88Xdf X-Received: by 2002:a0c:f08d:0:b0:537:7915:64d1 with SMTP id g13-20020a0cf08d000000b00537791564d1mr12083537qvk.28.1675112586884; Mon, 30 Jan 2023 13:03:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675112586; cv=none; d=google.com; s=arc-20160816; b=dCZwGERkEWpxvHodoXA79kLGWuVJt9RHxeKZGJK7jFUorjcLx4I3f36sL226XK5csF xTxOYRdMxxJG4+60KOKm6n/YJ3FgUpncvFRdAhmlaoFH0JNOP8+qWYK+Lk7ftIGBkAIe 6oKFvSw1OBfZM/QQ7jo8Vatr0w8dxHU60ddm9+ruQIbjnhETApznAGz2OtMArsSwRszY BJWeiRz5xyryKMmIt4Ps7QKCtoe1+i1RQ3WKbcgjxzcRtT5XcFB8r9pqwtuhTwLfX5KG v0Kf7gEmcFWgWBSu9AcSVsPi6b53jtxIN2aMF6Sjzphm2ifBGvtfq9O7OL8y9+ugLPYo BM+A== 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=v8325g5Oxoa3Q6Nszi20oELSJVGq05Ncj2q1+wr+VKE=; b=o6KQT5iJRYHSEeYG6XknQlTmTeE1CnpoQ1O7KMa4/LEuzTIV7CTay5iqv1x0Nogvvy 563wbkV5zv//84a+LJ9XwUbb+hovqef47LkSULDADdNvwppnUXjKgUdhV9DrdHIp2Qfi YJRGh/QjZ5o5Asd16k1X3O5O6NI39naUEqlDQhFcL4Eg3x+TVZ5oxrxvfA/RKfynTKDJ 48G1rYFR359gVSbE+nPvpqbikcpkP3mtumWlgYaBE1aTqFuggpU7YL3/KFJ9eDetRFSe CArhr4QMp00iZhMIPkLlcAF5AIO2HJLx0Ch48scmRId7VX7+S4z5PinVxkjTowqY8V59 q1nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PgB9eKCJ; 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 ej1-20020ad45a41000000b005351ad6ea18si6353190qvb.436.2023.01.30.13.03.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jan 2023 13:03:06 -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=PgB9eKCJ; 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 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) 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-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) 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) 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 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+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. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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); 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_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); } @@ -911,25 +911,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); } @@ -942,13 +942,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 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; } -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; @@ -1341,7 +1341,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); } @@ -1352,7 +1352,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); }