From patchwork Mon Feb 27 05:36:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 656814 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2182136wrb; Sun, 26 Feb 2023 21:41:47 -0800 (PST) X-Google-Smtp-Source: AK7set//QEjuQlOMhPYqfU0MeVbdHGSHLcM8AqqfuMcJz83NQ9w0DrgygBbWjV4SUQKUvy+mtqsk X-Received: by 2002:ac8:7d52:0:b0:3b9:b6e3:c78e with SMTP id h18-20020ac87d52000000b003b9b6e3c78emr39518962qtb.8.1677476507282; Sun, 26 Feb 2023 21:41:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677476507; cv=none; d=google.com; s=arc-20160816; b=jLtjSw+z09bIfvWY1qmDHSJLeNjtENCo0d3h4C0897ANDwmuyR7LankDzaMY8D5wIu zlTwnrXVwNbYrYqxSyFTN5U4cG/fBllNWTm0FNa4lJXIuk0QdoyNTqOpObM1btb3C0oS bW24J9/FWrHMc4Wjeb7GSDWaPeUJ7a2usvfTVm2r8RHiNe5gY0XAOx4mCm74wgNRtkqJ U3yMlbDH8C6+XbHOJ1jNjY5dGxtO0XREX6gv+4tcSaOdumEA9gWkRR3HIjC3iVC4/luu Y0U8XgPUNn+W3e2FJFsxSMqkxn3v+87/8pG2k1gqk3zWuCK7SXn60ov09/n6zEZfI0fL M87Q== 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=Zh0zu+o1wMp24XTuQf5yBnq6g51zLV2C/0ZFahclC9Tbb9dZ0Efj2Ctp0zde/mWv1A AwCOplhNyewHKvK7d9pcs4pGS2xs9UjV8ZEaQ5K5UdVBO7BJeBD2lCEYtCfcFuaz2Ih8 qGvc0SOWnyo6ubJ2bZND4faHFSfqysWCbeW/Crcy7pdcRgq1dQeAOrMFE9X/UfhUUHpX 7raWZd5wKP4tBJPfixPinxNDHror96/4xIdh3DQOV1LBHI7U8RPuM77ywJeRDW4k3j1S XoKlxXdBj5eLWDCck4N0IWzqhD2YQ44ZANb2KYU+KfaU5HWso3XJE8CFelzZXANZ7Pf7 x41Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ysgcfs9r; 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 r7-20020ae9d607000000b00706b3aaeebfsi5260087qkk.260.2023.02.26.21.41.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Feb 2023 21:41:47 -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=Ysgcfs9r; 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 1pWWE2-0006y7-7a; Mon, 27 Feb 2023 00:39:02 -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 1pWWCm-0003Ar-8t for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:44 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWWCj-0002Oe-2j for qemu-devel@nongnu.org; Mon, 27 Feb 2023 00:37:43 -0500 Received: by mail-pj1-x1036.google.com with SMTP id c23so4867547pjo.4 for ; Sun, 26 Feb 2023 21:37:39 -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=Ysgcfs9rzRtL/UfwmholIWix5qpAaif42x5oQNvsRF1ffo9R4gFXRAbIdPablttr+h EM2MxebuFqq3Oi+Ywm0wJZADqJb+TDVf8TRv4hYRvd6pxXd4EXCPTIUwmZlVHZgpc2SF 9LeWU41hukxSy30xY1hgdjEXD6gQNXyRazYFSbCNyrF0uciAuYgtoT0eyiXyG+1kHX4l iCIcALqQNti2kDM8DJ3n7UsEb09q+foVRcnqcjHumbxM09uc1lYR5O7dLy/iD+GujUdW 6sfFFznlSkrYTvDgdAMXAsNRyysT74+03WctOEv82dxiYvxdOAf9aeSyCNp1wHI3pAlo rSYQ== 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=NgZ1nh+Vp1ucguEs3jdvmfI+J7R+BUxgDN4oiXHG+rSSr+HBrxXXkF0JNy1sHOuZzE aSzNIMqZe5sC5jttAOurheoTZoR3LMpELiSsQpVgxcxpgeflJ2rTfeimDw5c780t6g7s xgZaL1rs3fwFM+IaeVT72/nbyAopWK361V2dpaDmNO2pOKlcBJ8bnKm9QBND9CLjpGBy EArZKaeMoSmmW5fFP0vbyYO6Ko5dVaREE5tA9bk5GtPKFnLttuSGzNGJ10CguKF+pb4l OL2udM+1FInH1gvi/ctvYoXPGK/sdoat3NdlVIyO4kOTZYr9BDAvhfc3gtRhgEIy5I9L OnQQ== X-Gm-Message-State: AO0yUKVPUHbLz0/2RdV9VlWrhbZXgCVqRVhPaE3vmsBSfSRYHVUpIJp3 niNhe8cY+fFGU19O81Rux2zX4kxBpB9Qbht0+2E= X-Received: by 2002:a05:6a20:3d18:b0:bd:17a4:c35f with SMTP id y24-20020a056a203d1800b000bd17a4c35fmr27404534pzi.23.1677476259344; Sun, 26 Feb 2023 21:37:39 -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 k12-20020aa792cc000000b005a7c892b435sm3342137pfa.25.2023.02.26.21.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Feb 2023 21:37:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, jcmvbkbc@gmail.com, kbastian@mail.uni-paderborn.de, ysato@users.sourceforge.jp, gaosong@loongson.cn, jiaxun.yang@flygoat.com, tsimpson@quicinc.com, ale@rev.ng, mrolnik@gmail.com, edgar.iglesias@gmail.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 12/31] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr} Date: Sun, 26 Feb 2023 19:36:42 -1000 Message-Id: <20230227053701.368744-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227053701.368744-1-richard.henderson@linaro.org> References: <20230227053701.368744-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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);