From patchwork Sat Dec 24 23:57:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 636683 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp931589pvb; Sat, 24 Dec 2022 16:08:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXsLrdzpEhgZgMjhsqtfYoxHKhHQZc+EhERk2z8c6KlQLmymnsh8WTv1D0L854VtHvKDgnot X-Received: by 2002:ac8:775c:0:b0:3a5:31cc:50ff with SMTP id g28-20020ac8775c000000b003a531cc50ffmr16743771qtu.9.1671926917326; Sat, 24 Dec 2022 16:08:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671926917; cv=none; d=google.com; s=arc-20160816; b=LFYahp/scFcmFtnXh3ttZmiinsYfXsmgDwhupR0bWvau4y/tFxJIRMPTFNcjlJ5rDm GuiOz6TYmxn6SKOD9u1yRgQbaTY8+zze19cOp2GKAWCdIZLDf844aonTEQ95ZgFvVw9Z wyTRPwO4tYdDsUeIow3msTkSFinKRfTx3rEhNcOipv7xy2vxI9F/3nCxfWP6aAE70ai2 VjhH8ReDkYS8bogyzHXiSAPZSGoktLZviAgMS6RJT3XUZ689Cv8YIwNkv44y8J8sqn+r YLXXHpwJ/JXdPAxolHKZQOIQScC17niA0/Z4YnlYh34pPLCXNK8nl1dmoucINp9HL36v dPaw== 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=8dgmD8yUJnIF7Ep3YQaKEZ2wvp15A3Cnw31rhHlanTU=; b=irsOxzOtruQ6da2bgCe95wslaqKDGh80Y9/U55Q0i2bHTX2KLUS6A7OWcajjDqoTf1 RyS4fQ78wh+UUepT+gu5z+FICx4/RIqjJJqD4szg8CaYsO/ZMqBnyIYJTY+Ne01GBcG8 mizXUZ0sdAmiUa7lRkNvfLN7aF1A+/oEJiiIPx+MCoF1ddRQZFIJSG1Gvpq3nomYdfPm g4qI+9L1ZhAYLsPwX+rY8QeGp3fi8xzCIOuYmGCsCaslXJZZ5VpP9MrhQdWDHHE/4cwB DSqi2ATvtA5geMjqBpnMqCPPvRDhHRF6hsnJyZv3j05gWYp2c13kkAJ+gpfXOahqQomJ NPjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m3H7dc98; 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 r13-20020ac8424d000000b0034b66d9bbd2si2551145qtm.652.2022.12.24.16.08.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Dec 2022 16:08:37 -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=m3H7dc98; 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 1p9EOy-0002es-J0; Sat, 24 Dec 2022 18:58:04 -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 1p9EOi-0002Nz-96 for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:49 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9EOf-0006Kj-Rq for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:47 -0500 Received: by mail-pl1-x636.google.com with SMTP id m4so8047257pls.4 for ; Sat, 24 Dec 2022 15:57:45 -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=8dgmD8yUJnIF7Ep3YQaKEZ2wvp15A3Cnw31rhHlanTU=; b=m3H7dc98BF7DX867RrmDfoYxf914v6tlrVq4fdc3HJkWHgpzn5x/VuxOLO2+YgPiat 6F3+fA1vyB+qqLEtNAcItoLjj2zLIv3kt3Ys/OdHXBtBtiMmQa8m/ddvQtRaYUnh1EGT yVhFop7QOCwIWd8qDgOCVWHaHLrggmMC6mbdx8OXdYLJdVa7pe26BjIWaBdb7qA8E2N6 rf4lgrIvSw6ZGdruLCZZ58hluetLqxdVoz4Vdz6mpx1hshhtNicDA4P5pAG49a5JoA0R TrD8a4FDChWSbcTyOYww/3K+PtCssUO6eXXI7GmNH+PeTBmUQTUlzg4ZEyD20ILnyZub 2arQ== 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=8dgmD8yUJnIF7Ep3YQaKEZ2wvp15A3Cnw31rhHlanTU=; b=RMxUzXw7OZKJOu97+nLRP2Fw3vVr5A3aP0SoZy34yGgeQ28HprfiZujD05OLR6HOfK 1sqdY1u+bsx2jb2+rypcYYmu7WCp8/28tKHRYcoMW6jfQojAxeU5jexM43AZwMpR8+T7 FQK4IIKg9AqIuSVojhBzQg11j67YsTLUsUs1HE+rCYPgOlJMmqlNwSSPThrKIAW5IOnD EaoTbLL15fPnuvTMMKjYPHLyRY494MR7SAALmQQIWaqq24QcVS3cAQcDK1bTV619vvji vWfVfMgOBdXdXmqw40rZqq/67q+iCWaaV5OfZwT3ZTwQL7NTr8fQB+V5e5U0gjxhcMyU 9uMg== X-Gm-Message-State: AFqh2kqdv2CyJJj4OovULlIBSRec6LW+56tkCexEPOUF7vRu2QFaiYYM f2NRxRq+S3AeCZLsydlicEoBrfaort1LLl2I X-Received: by 2002:a17:902:f392:b0:189:eaae:a19c with SMTP id f18-20020a170902f39200b00189eaaea19cmr13656512ple.30.1671926264366; Sat, 24 Dec 2022 15:57:44 -0800 (PST) Received: from stoup.. (76-14-210-194.or.wavecable.com. [76.14.210.194]) by smtp.gmail.com with ESMTPSA id cp12-20020a170902e78c00b00187022627d7sm4599716plb.36.2022.12.24.15.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Dec 2022 15:57:43 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, philmd@linaro.org Subject: [PATCH v5 23/43] tcg: Add temp_subindex to TCGTemp Date: Sat, 24 Dec 2022 15:57:00 -0800 Message-Id: <20221224235720.842093-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221224235720.842093-1-richard.henderson@linaro.org> References: <20221224235720.842093-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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 Record the location of a TCGTemp within a larger object. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + tcg/tcg.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index d207bc47be..afa18986b1 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -456,6 +456,7 @@ typedef struct TCGTemp { unsigned int mem_coherent:1; unsigned int mem_allocated:1; unsigned int temp_allocated:1; + unsigned int temp_subindex:1; int64_t val; struct TCGTemp *mem_base; diff --git a/tcg/tcg.c b/tcg/tcg.c index 98d51e538c..0f58013a5a 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -928,6 +928,7 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, TCGv_ptr base, ts2->mem_allocated = 1; ts2->mem_base = base_ts; ts2->mem_offset = offset + (1 - bigendian) * 4; + ts2->temp_subindex = 1; pstrcpy(buf, sizeof(buf), name); pstrcat(buf, sizeof(buf), "_1"); ts2->name = strdup(buf); @@ -974,6 +975,7 @@ TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local) ts2->base_type = TCG_TYPE_I64; ts2->type = TCG_TYPE_I32; ts2->temp_allocated = 1; + ts2->temp_subindex = 1; ts2->kind = kind; } else { ts->base_type = type; @@ -1092,6 +1094,7 @@ TCGTemp *tcg_constant_internal(TCGType type, int64_t val) ts2->type = TCG_TYPE_I32; ts2->kind = TEMP_CONST; ts2->temp_allocated = 1; + ts2->temp_subindex = 1; ts2->val = val >> 32; } else { ts->base_type = type;