From patchwork Fri Dec 30 00:01:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 637821 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3179135pvb; Thu, 29 Dec 2022 16:08:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXsDdHWPgb0RO9o5bqRX0fBqEzvfTBEozPm9QqiULqFQ8Mh0Bl/OgcJCYUBfG9h9xjY14XTZ X-Received: by 2002:a05:6214:719:b0:4bb:a62e:c1bc with SMTP id c25-20020a056214071900b004bba62ec1bcmr55993354qvz.25.1672358893987; Thu, 29 Dec 2022 16:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672358893; cv=none; d=google.com; s=arc-20160816; b=lQG0wzBrnTu+EBLLDfsst7QReETopLTAeeBo6aKNszdYIBcLH4AHSkuxOGqJWzsPMM UkMSk7kIUjFdIBWYNm3UaS5c9mIx0Q6RfgjoC3QQEPPs6w6L1bn8ja99eeOW7pe5qHC+ lSq+ihn1HJrGCqCWdzXz4wE/m84bUmpwJXzdoqKn1fek3sojwf8BTO7XlUgi5ME0W4k4 zvhTlYMDH/nb1EzyMOFpBB/Yoqh97oOPzCMjH9sdrBtm/i3tozB91fTuynad4FXChTn9 PXY79ochnaqWCJ3rUzAn4cZZtJmrsTJbfjzepCdVkKwxKra1uu/3Np9jJ5Q6wgoteIoj /4SA== 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=4mfBOAV47I9uDw1GwX1iov09oIqhGRSjo/+SK90rAOA=; b=FaB9RWvEAADMHpv1uP/2Hg51adZ8jmQaWnoQ1ktXwxXpUE1oYep4zrAzSTQi2pbx91 OSocjizMGYd86vTG74UhrO89WHYhS7bpItarE4BInuOff2CzGLypazAuPXcmJn+WyhMk VOJr0EiwJ+FRGkPFj92jUI8ErW0CM2cjJbxB/3g3annumT7J6jxQ0SC9dobpyJkQqhBG IAgtMmLSTNEpc4E93LVLetwr1FQfLloxqe9gD9cHep1FMiqr+UhXAE8obi80lnZI0m5r t4gItZCZqENhRXlTi6gm/a81P99YiDXNnU9NfN63HSvIGbOZJWGvbqqypjsTfn2dI7/R 64dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gA4Reg9a; 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 bp14-20020a05620a458e00b006fb97249357si8913703qkb.412.2022.12.29.16.08.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Dec 2022 16:08:13 -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=gA4Reg9a; 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 1pB2re-0003BG-2a; Thu, 29 Dec 2022 19:03:10 -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 1pB2rQ-00038X-Da for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:02:58 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pB2rE-0002hW-RG for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:02:46 -0500 Received: by mail-pl1-x630.google.com with SMTP id d9so3610320pll.9 for ; Thu, 29 Dec 2022 16:02:44 -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=4mfBOAV47I9uDw1GwX1iov09oIqhGRSjo/+SK90rAOA=; b=gA4Reg9aljPMHew++LsgaVhcrWXzrMcffDzRz/8FszHAySzSnqyV8Z6O/VOHHtWE+B R3+BArYUfIRPjii4FJG2EKt5XGw64XFsFNx5g5Xf2mW9XfVNr0FeRje4cs+7GMrtgUAF YjzfbLfRVkosDPqycsoTEHmKGlcS9mQac8SIuxn/QJSiPDkVBno+v5O3CZFIkSKaHdpA AMoznYmt46uzhupUFbwEgcJnr/L+g7C2HA3w2OkKRF+3TjuFC2z8JoBWBY5WZvGUMLgO o+OFtIqLJ4+nEW9a+YFmZFEcbOKjP3pwdDUiJ1yBEMEYAHZwatY15pKJAHIDlCBj/WXA 6j1g== 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=4mfBOAV47I9uDw1GwX1iov09oIqhGRSjo/+SK90rAOA=; b=uB3amRcampyZoJjax0iMIMfTiKqFJw5A9k7wrIVgrokTb6AhwRSuQ0NjVEAaNIXIA5 e1j92UnfK1HQNHJ6fZgzG9ZDL0NtDsRMyIcLz+j9H/Z9+5fXZWFQ1K19uZKN1Sg6oRjv 9vl4laYMtNnfjakTw7SW5dIgZb910IG3/KdjwrabtbAjupNbT7a4C7qShzWeB+MqcFXi 0A2oX7zZiESH4I/XDqPSuFhcl5/A7bsXCIGvn7tu7F1jyir+S+0ek+UYDafMK50LuzQe KsPstTC9ZyiFDDShPk0f//+eC9hhYSPkgaJgkLFKzpZZGonje6xjkVbfteCQTVQXRfv4 3/xA== X-Gm-Message-State: AFqh2kpScgQ9fVyJp+qSqfy8Jf1j4yG0FuE2hi2atOcWiSoUVgCYg/cQ uyzkcsAlb9UJ9ftqmPDbMePVvFUPS3wV+n9Y X-Received: by 2002:a17:902:f609:b0:18d:dd85:303c with SMTP id n9-20020a170902f60900b0018ddd85303cmr54180049plg.8.1672358564031; Thu, 29 Dec 2022 16:02:44 -0800 (PST) Received: from stoup.. (76-14-210-194.or.wavecable.com. [76.14.210.194]) by smtp.gmail.com with ESMTPSA id j14-20020a170903028e00b00192849e1d0asm7343953plr.116.2022.12.29.16.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 16:02:43 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 23/47] tcg: Add temp_subindex to TCGTemp Date: Thu, 29 Dec 2022 16:01:57 -0800 Message-Id: <20221230000221.2764875-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221230000221.2764875-1-richard.henderson@linaro.org> References: <20221230000221.2764875-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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 e7570ecb4a..4f2e05c69e 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;