From patchwork Thu Oct 20 11:52:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 616746 Delivered-To: patch@linaro.org Received: by 2002:a17:906:1c0f:b0:78b:b85f:9498 with SMTP id k15csp342678ejg; Thu, 20 Oct 2022 06:44:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/DlRbm1V3aVknonzi8NhbX3gKDmVfNHeVBvdzRAj/YMoqEEqxzDWOMQHjI04F3gdXJ6LV X-Received: by 2002:ad4:4eec:0:b0:4b1:9859:b74b with SMTP id dv12-20020ad44eec000000b004b19859b74bmr11087005qvb.102.1666273488471; Thu, 20 Oct 2022 06:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666273488; cv=none; d=google.com; s=arc-20160816; b=Lvr+fPs3099OTxnZYVALsXoNaGHfNbNqnO9Ko0WiGv5vHoL2Bd+TMKMY7tT38eJDlp Ze8yUpIhbozWP0QFeY3IUX150wIXswPc08ueL0h+JKjjvC+6vpln9vhOUhaQ+DkHZi0Z tgH+yZdkvA48tI378ASZnQ9Dz32YMxwxn+z7CgtcFodmAhUq2igA0hvEc2VA9vxniYnG NpZH9lw5DZK4MUqLXwBwvjaxLHh9eFHEsBKgovHcbaZsBA+uS+IwYTfeYSBwqB9cg8uk eiJLLe9r+whUEyBvXJmrsSLFRNCNl34vDsuUqDCBWaUamPSdrjPGp9YdZJANuA18Lw0T hyqA== 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:to:from :dkim-signature; bh=ecyLf9UvK3GuacwmNTSkckTuqIdVcU8ZGXDLAydoDBw=; b=SxOOQGoaOQTXuIRNVLtR/TT/1vHV92RARa5i7SmZF9DzXavtNUAfUzN37ZS8pq7NaB /9rxHzz9sTZT086ScoTnmlvlMMEog5eTvfaFH0TOtGfBxHsZRQYcbYOvwfyU5yCWbEOb B92PH9kdnRTuuztuHGywcZ1L3yAFPTro6ZScFVFh6RkUTNNy1Tdc5n7ENtsmN1SqvXEp YVZj9f3sh95bmJ7h0InRGVXprUqn+Zr5znceoq8BBSTQiTHGRJF8ErKro3+YMRFwI4yF WfnLNnNtGi/EekmISJEMVd6UFRSRhQJBCvafy/h/SQzLn+Ln1kEmNAFgBxYRB41L25QZ IolQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o4stW68Y; 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 a22-20020ac86116000000b0039cc6698b40si10606451qtm.635.2022.10.20.06.44.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2022 06:44:48 -0700 (PDT) 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=o4stW68Y; 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]:54234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olVqo-0002Ty-Dg for patch@linaro.org; Thu, 20 Oct 2022 09:44:46 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olVcI-0007co-MM for patch@linaro.org; Thu, 20 Oct 2022 09:29:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olU7T-0004v6-3d for qemu-devel@nongnu.org; Thu, 20 Oct 2022 07:54:00 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:47029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olU7P-00011U-6t for qemu-devel@nongnu.org; Thu, 20 Oct 2022 07:53:49 -0400 Received: by mail-pj1-x1033.google.com with SMTP id t12-20020a17090a3b4c00b0020b04251529so2808470pjf.5 for ; Thu, 20 Oct 2022 04:53:46 -0700 (PDT) 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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ecyLf9UvK3GuacwmNTSkckTuqIdVcU8ZGXDLAydoDBw=; b=o4stW68Y/IxzsZyLqUNdy9LBbqwuPkiy8Pj/woDWkGLNU4phGdORjZQe3BoBHz1Ymj KKuNp7pNlMJJmla86QlcQYHZLS1Hfaa3M8lkJLLi3ccsQzyAY+oFJsYigSDKjXGqFM9E tObiLE8TWYHofesIGgaLcmUppOgY+lABfLX2kqpOotiTeRMIjfT3YA0bsYNyKcDHV6/c 0SoF8OIuuGsWVGaxhPTy1mMOrrSE59tJ0/TOXn/1DLOstV2NGzJTDDSRY+odDZ9QR6mb 5STbpzFr7GSzWUh7QnD7SaSdjCTfNWOXxe+IbLWpb2eie3QsbdGJGlBB70Y78nk30YrG 774g== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ecyLf9UvK3GuacwmNTSkckTuqIdVcU8ZGXDLAydoDBw=; b=Tt+xANfRLFQ7Iq7NOom/CTBc/hmiqsfasuDB91zHpwOzryYu9zUmqc0OvxF8PE3MVT QIEX7u5xBam6BwxKMiTeAu7M3amKe4SgzW1ztKk9s88uHcK/J8hlEG+9H+0hxW6DroIP P9ix1JX3y1LAqJrIEhJmLLpyu01lzM+9vmVYGf+H63i0G4rTCZhUp/AMeKhcROTy1VFc eeTsQM8zWb6byuMH5VLpM8/7swXijOM09PLw1rq/Z1/q0GvroY/dyoj/tmZEdNyRANki ZiDJ2Bs9GkStz3d5mwYCTUl90I38/D/BR1cSWiMipP+hK9p5WxQ/9CP6euyHtBoGN2SW vBFA== X-Gm-Message-State: ACrzQf3P8P4ZCcsXE7m7BoNX07Y8/5DWuePM27N1DLeRZfJHBd1ht/uO 7Tj+Tdbm1r/UOVwa3Zw9t+BHEAGBAebhdIQv X-Received: by 2002:a17:902:f541:b0:186:4b91:4501 with SMTP id h1-20020a170902f54100b001864b914501mr13545414plf.171.1666266825819; Thu, 20 Oct 2022 04:53:45 -0700 (PDT) Received: from localhost.localdomain ([149.135.10.35]) by smtp.gmail.com with ESMTPSA id w206-20020a627bd7000000b0056109e15638sm13065464pfc.54.2022.10.20.04.53.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 04:53:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/31] tcg: Add temp_subindex to TCGTemp Date: Thu, 20 Oct 2022 21:52:21 +1000 Message-Id: <20221020115242.2301066-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020115242.2301066-1-richard.henderson@linaro.org> References: <20221020115242.2301066-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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" Record the location of a TCGTemp within a larger object. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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 6c4f949c85..135d9a9a0a 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -927,6 +927,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); @@ -973,6 +974,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; @@ -1091,6 +1093,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;