From nobody Tue Feb 10 16:21:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508175570153708.4855406937088; Mon, 16 Oct 2017 10:39:30 -0700 (PDT) Received: from localhost ([::1]:34344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e49MB-0004Kn-6M for importer@patchew.org; Mon, 16 Oct 2017 13:39:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e49A5-0002JH-Hc for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:26:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e49A4-0003aR-JF for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:26:45 -0400 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]:44288) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e49A4-0003Zv-DQ for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:26:44 -0400 Received: by mail-pf0-x22a.google.com with SMTP id x7so16317335pfa.1 for ; Mon, 16 Oct 2017 10:26:44 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-104-76.tukw.qwest.net. [97.126.104.76]) by smtp.gmail.com with ESMTPSA id i187sm5594249pfc.96.2017.10.16.10.26.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2017 10:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CKzrL3nrIbxNWEEUClAtJxQyYcnjHcU6IGSZwQDG0YE=; b=ZbTWWpez/7DqTR8WXo+ltznZXYs9OmU3R+UH5rU84ya2DUIN7B7HogfD6xuwfq6kWm nPGsmgNYvf3aIZcJcD4cFj2EPB5+eSz94aw2b4RiVsWcmWUF9cYRGcGAez5FT7tO6pCk UVKjVU+hlnrkB2vnD1hLBH1ypBfkrP9/Gq7RY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CKzrL3nrIbxNWEEUClAtJxQyYcnjHcU6IGSZwQDG0YE=; b=k3AHD6tsF9fijXwmtBf/iHOcZY1zoR0okmK3hSHEQqtLtKghTWZA13KxUzhZs6fr0R pZooFlY2FBqlYdp9ipUHYwl2jSSBSOC7ekku2j52seOHkoj3zwCYxBEEXt9Sx3Qo9ym6 5Kt0LBugcTunuqwu6dJVUMvCICrkA7mQuCzvPZnTexla2rikzOuF1ck9yxytf8Yng+oE loUy504IDNe8NcWYyDz+AMNautDtgMS6afkOysESOiVHJ2qI5XeRZomkk6BqhaaDtbxJ tSBC/ExO8mYNIjU6NGL+Fqg/iOz1eQGMH6o95PmMpk5z3Yo1gTKzAlLmwz9NkQLtyDiQ DOag== X-Gm-Message-State: AMCzsaVgr7PKagMd6pg9hJ7CglZinp3yDPKaFyZXCbpinIk87zkKkXho 0uWn7SPovacdPPuFvC5XOKWkEZJmlXo= X-Google-Smtp-Source: AOwi7QC3Z/FY+BnS6jKqPTduZxfObGkI8KKn5gWhXR9qi16D1PYGqj/dHuWDWdJPsyXhBF032pwP3A== X-Received: by 10.159.207.131 with SMTP id z3mr9724184plo.191.1508174803241; Mon, 16 Oct 2017 10:26:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 16 Oct 2017 10:25:40 -0700 Message-Id: <20171016172609.23422-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171016172609.23422-1-richard.henderson@linaro.org> References: <20171016172609.23422-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22a Subject: [Qemu-devel] [PATCH v6 21/50] tcg: Use pointers in TCGOp->args X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This limits the indexing into tcg_ctx.temps to initial opcode generation time. Signed-off-by: Richard Henderson Reviewed-by: Emilio G. Cota --- tcg/tcg.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index ccf1bcdaf6..d5bf61b1cf 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -741,24 +741,29 @@ static inline size_t temp_idx(TCGTemp *ts) return n; } =20 +static inline TCGTemp *idx_temp(size_t n) +{ + return n =3D=3D TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[n]; +} + static inline TCGArg temp_arg(TCGTemp *ts) { - return temp_idx(ts); + return (uintptr_t)ts; } =20 static inline TCGTemp *arg_temp(TCGArg a) { - return a =3D=3D TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[a]; + return (TCGTemp *)a; } =20 static inline size_t arg_index(TCGArg a) { - return a; + return temp_idx(arg_temp(a)); } =20 static inline TCGArg index_arg(size_t n) { - return n; + return temp_arg(idx_temp(n)); } =20 static inline TCGArg tcgv_i32_arg(TCGv_i32 t) --=20 2.13.6