From patchwork Wed Feb 22 23:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 655724 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp37286wrb; Wed, 22 Feb 2023 15:31:30 -0800 (PST) X-Google-Smtp-Source: AK7set+Iq5GeUmIDLGXFbOD2GtrtIJSBi4vRbTiIvk3al9DnCgmc7r9ozX9t2CWMTdVgDSz3EqqT X-Received: by 2002:ac8:7e8e:0:b0:3b8:2e36:efd with SMTP id w14-20020ac87e8e000000b003b82e360efdmr17682540qtj.55.1677108690690; Wed, 22 Feb 2023 15:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677108690; cv=none; d=google.com; s=arc-20160816; b=MzXIiE6IZ+CVrvXbDVBBwAOtXrDkTn6ZhxCYnvLJBeva8ERyq1JaCerwLBnilfIm+/ yhA0AYbVWTkoGA9s7iVbIimW3qOcc63df46d5rDGCZSaIZpV58Uc1h1b4BLJ+/x4zWdE AE2CjO2XckNfr9fKtxgobPUXKrXahbzGv2vffyKoS/3pDEFN34BFlvhI8uslMs93ZHtZ 1cvNKMirqX3ulZektHac/WGg7fDVEe4F0BISSNCaKpIriiAnGtj65OCghbxDrYScGlCJ yxJYh34C1UFlt7onAFhQV6OgQ0arBpU6zupfl3ArhQ1KIxNlqnvHIkWyfYxEnpKCO1EC rwQA== 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=VjZP4LY1Wxefy+0rLrks1q4QR8IjH+TMsA5bjteWWKA=; b=034EiRCJrlMGw/vKIGK50pmiSAT7aOwD3T7sHyKytpMFuPv6OfY7kPWqiA516IW75h sv1at7m/wMudLjMTyMLsES1pTHLbKKJdjHAup9sH9k8lZqhb0kFF9Iavnon/rcPE4tF1 got1ldkZGiptFvfT9GcZlQbQkkuxEVAo5Mi2g3/99NNwxIBBMq+T5N8bNxWgyxLMLcMP KF8REYBSktlhEiQ27NsgoRjUSnuaL0Z3mgAObNAnyDG706PMtcMqn41PI/L9d5zOifWM /2DPATCpNAsiGM6i9+mPzxGNDh6GPr+7i8cqYOECr0iVsHY9FUySZFHnlpLebNn9uQj8 +r1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TimWdTiw; 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 y3-20020a05622a004300b003b85d8a96dbsi3611109qtw.677.2023.02.22.15.31.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2023 15:31:30 -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=TimWdTiw; 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 1pUyWN-0000RN-5y; Wed, 22 Feb 2023 18:27:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUyWL-0000Qm-6d for qemu-devel@nongnu.org; Wed, 22 Feb 2023 18:27:33 -0500 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUyWJ-0005K7-Is for qemu-devel@nongnu.org; Wed, 22 Feb 2023 18:27:32 -0500 Received: by mail-pj1-x102c.google.com with SMTP id m3-20020a17090ade0300b00229eec90a7fso2871143pjv.0 for ; Wed, 22 Feb 2023 15:27:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VjZP4LY1Wxefy+0rLrks1q4QR8IjH+TMsA5bjteWWKA=; b=TimWdTiw/3U7ur/tP9E6ByhNdznVb1WA8KiiVMq/kaurolfDyY5+m3A+Lf2gs/7tDE go0gPGxvxpixEZPzKFkLVeEgVAR0F3IlBdtSvZpzkwaNQxb5EAPq0y8ithqpkMaLByCw nGjISBR3+lmoNHM3xzz7KMGlTL87TimYQBxvIMzNL+882/0pIK0Xa9uWpiAlV2bkS/iU fekxBItZUHUD/U2XCwvHkDOX8jghojbYMJSTAp2YfNlYL2Z+LRuh8eioGmstfQ8uoXp/ 1vun04FJAh04gFoZEiL57ezx6CTg4nxfKQJ9+xz54P/YNzTlJsioK10APHv2Eudx5V1q xhlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VjZP4LY1Wxefy+0rLrks1q4QR8IjH+TMsA5bjteWWKA=; b=ElKJOTEyZXTnhtKGMRFAsKToS1VNyeZ41ZLvPr0WWSwzbEzcYQmAG2o/w4Jg0G99UW qhi/qSroTreoPaZ2OXC7FAV9sWGqyWwwPSlVgPVS1kZIVYblkin7mnGHqLq1KxEYEf8e /FesVvyuMoA3hVfTgD1lGv32NX6wzR0iqZOhbuNHBSIDzJlSmGhdPb4qEXwb9+Qm0Bnv 9u4/1qNGTVqSjWY59RXQhneyu3+4F3BUFSMqExIoUGXv/cryQFQnGEFdn6N7S1SyR4eb un0hUxHPnjzGRolwcs7EgTm2rdlQi5o63QVCbbvPaUSMzho4DmYagafidFlNQOBDSU1H uMFw== X-Gm-Message-State: AO0yUKXYeV9y1+8VqTj30Ds5YOGjMlpQEUVFfb/EZr+55p/7SrKEekgF DFbbxfgaCMR7zx6XGfA5VKF+MfF7a1IZlDIakgM= X-Received: by 2002:a17:90b:4ac5:b0:22b:f0d4:9e1e with SMTP id mh5-20020a17090b4ac500b0022bf0d49e1emr8880107pjb.8.1677108450093; Wed, 22 Feb 2023 15:27:30 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id s16-20020a17090ad49000b00234e6d2de3dsm5008918pju.11.2023.02.22.15.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 15:27:29 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 09/28] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr} Date: Wed, 22 Feb 2023 13:26:56 -1000 Message-Id: <20230222232715.15034-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222232715.15034-1-richard.henderson@linaro.org> References: <20230222232715.15034-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.google.com X-Spam_score_int: -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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org TCG internals will want to be able to allocate and reuse explicitly life-limited temporaries. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 8d896bcbf4..0c2041bcf7 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -892,6 +892,13 @@ static inline TCGv_i32 tcg_global_mem_new_i32(TCGv_ptr reg, intptr_t offset, return temp_tcgv_i32(t); } +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_i32 tcg_temp_ebb_new_i32(void) +{ + TCGTemp *t = 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 = tcg_temp_new_internal(TCG_TYPE_I32, TEMP_EBB); @@ -911,6 +918,13 @@ static inline TCGv_i64 tcg_global_mem_new_i64(TCGv_ptr reg, intptr_t offset, return temp_tcgv_i64(t); } +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_i64 tcg_temp_ebb_new_i64(void) +{ + TCGTemp *t = 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 = tcg_temp_new_internal(TCG_TYPE_I64, TEMP_EBB); @@ -923,6 +937,13 @@ static inline TCGv_i64 tcg_temp_local_new_i64(void) return temp_tcgv_i64(t); } +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_i128 tcg_temp_ebb_new_i128(void) +{ + TCGTemp *t = 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 = tcg_temp_new_internal(TCG_TYPE_I128, TEMP_EBB); @@ -942,6 +963,13 @@ static inline TCGv_ptr tcg_global_mem_new_ptr(TCGv_ptr reg, intptr_t offset, return temp_tcgv_ptr(t); } +/* Used only by tcg infrastructure: tcg-op.c or plugin-gen.c */ +static inline TCGv_ptr tcg_temp_ebb_new_ptr(void) +{ + TCGTemp *t = 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 = tcg_temp_new_internal(TCG_TYPE_PTR, TEMP_EBB);