From patchwork Sat Dec 24 23:56:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 636693 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp932757pvb; Sat, 24 Dec 2022 16:13:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXv3XrppKrYQVS7fZvqh2Iajq4eFOpS9jZCXKPVanYEg2FLBQBIuKXf3trDNen6uY3aWA8aZ X-Received: by 2002:ac8:65da:0:b0:3a9:7332:3f74 with SMTP id t26-20020ac865da000000b003a973323f74mr18674035qto.19.1671927206099; Sat, 24 Dec 2022 16:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671927206; cv=none; d=google.com; s=arc-20160816; b=WxYBlZvMuQsIpsCdsoC2V42oltRuBXv2W05OOw+VOaOMohz0JTQBNK1EZrwUZc3ZrQ OFo7eRXr7fq5Tfh1ryZwWLqzm0hgG1aVG+q5CW0w6g1BNlyc/FXTuFzWsoMn9gnYRTNC TclDAIiobuZKfbgSxQf4YefG+E8sXP/OxbIo+7Ze1ayNnTY+da7PDm99dlWMwE4Sa2KZ oiGIwEAldYZbucdt5TLR0mk2x20zKyVlzpZcR7ioTjdWktaY7Pw+KKCMdwExDg4utaub /NtyPlBwkTy9N9XZDWQ+j5eezW/FLzr3To2TEPJXIGFf/UsCh0m6voaLmhZnbtYq+K2X IXJQ== 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=14I+QLaNg6Y9e4H/8QMxuuyCzHk2ngznUAbtAPjHaRo=; b=jcq8cckSdOZmk+hq8aCKHHWeXPKnorgFgIjCnLENESmPQmw0rSxgi/4J8g6edrUdWo IELukZPJGgi1XYaoQhLPOWEKm2MZywIxl6DTC2hCiD+Rt6w5aabHTiRPStZf2pg01Atq sSuMI0HMoT1sJh/m2s01ETE4bPxeOJdvLZEi4/tuM3ylfbJgwINphVyMs9opn0nZdw1M zABS/+x4JEE1XubtnQqTEp96Z2T8WWiu3XgRMxSj7wazxZ0gJCX1R8RVU36IGzpjTXNc Yit+CfG1DOHn+gAUAXSZq/xxwZiQURvzT+QYDWpo6cOgREyV6ZEQ3QCyYfX9+ZMTq47d TAbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WyfO2Znf; 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 dt12-20020a05620a478c00b006fcacb194efsi2275889qkb.53.2022.12.24.16.13.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Dec 2022 16:13:26 -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=WyfO2Znf; 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 1p9EOb-0002ML-Cx; Sat, 24 Dec 2022 18:57:41 -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 1p9EOZ-0002L4-L4 for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:39 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9EOX-0006GI-Pu for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:39 -0500 Received: by mail-pj1-x102b.google.com with SMTP id p4so7977174pjk.2 for ; Sat, 24 Dec 2022 15:57:37 -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=14I+QLaNg6Y9e4H/8QMxuuyCzHk2ngznUAbtAPjHaRo=; b=WyfO2Znfa/bjfoJsLV/2GL7/2JoxXIk+Y2PVtcNuyZ7+UJWGHAHua3gZzWHk4VDnP3 dsvEwebxAbmk24x2951Y7UxdlEbSOIDkBXTijoM8iRIttbSsJ0QCu4LRWJjEtPLlNfeU rJB4xDGRxfNLO67Zj9HwRckmdY+IvnMoNReMPAbgHRudJ2EA5qPG5GLHxSS/qaxFeaH7 OwU6UaLt6hUjYocxf/hKNfcyXZgmQDvQPdmnEiCprPm6yIB9d4XATURAxZiEYNO6MTWU EblOsKvGDUWSpJtJIQ7YUJduiQvZYG9omChItitxxPhw6Xp5Ex4M3Ko2lMYvwmHe8uRI TXgw== 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=14I+QLaNg6Y9e4H/8QMxuuyCzHk2ngznUAbtAPjHaRo=; b=5LzKx0Hl6z6dqTYbjBLqkC/iUtCnSHIw4Q2kf9uhmKx20pW+gGzUodkaQ/tex2tI6m d9ZeN+9TL8vc5+5kP78OrTyJQxsT7genJyz98767mEHnqpMO5LdFBZqjCebz6Fc86oPo otrx54nUh5PYnHEH38r48CQ2DfwtEjqNPFRzvGO2FiC1OA1fawvCoMCIqbx5hTuMBj0n HcrGLxVZWWKBBBREeWtfdKnlvV2Ud4AxnllhX2+Lu+iWBLZ3+jUO1AP7SHHUmoy8CPSk IRkViHwstPfxmVnxXHt0jhZ8GExiIVrbz0blgIuhLmPFQSD7p2rqkvCCcjDt86Iu7ieu Om6A== X-Gm-Message-State: AFqh2krj905ajK/Aev7dhMfvV/9zjANaeA1jXI/CVj2bCDV3HDDcI6cF /hY+bd0ZJtzo0nZsXMf+yN76SrP+pSme/aZf X-Received: by 2002:a17:903:3311:b0:189:6522:7cc0 with SMTP id jk17-20020a170903331100b0018965227cc0mr15626046plb.50.1671926257015; Sat, 24 Dec 2022 15:57:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Dec 2022 15:57:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, philmd@linaro.org Subject: [PATCH v5 15/43] tcg: Fix tcg_reg_alloc_dup* Date: Sat, 24 Dec 2022 15:56:52 -0800 Message-Id: <20221224235720.842093-16-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::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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 The assignment to mem_coherent should be done with any modification, not simply with a newly allocated register. Signed-off-by: Richard Henderson --- tcg/tcg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 05d2b70ab7..371908b34b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -3498,7 +3498,6 @@ static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op) ots->reg = tcg_reg_alloc(s, dup_out_regs, allocated_regs, op->output_pref[0], ots->indirect_base); ots->val_type = TEMP_VAL_REG; - ots->mem_coherent = 0; s->reg_to_temp[ots->reg] = ots; } @@ -3552,6 +3551,7 @@ static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op) tcg_debug_assert(ok); done: + ots->mem_coherent = 0; if (IS_DEAD_ARG(1)) { temp_dead(s, its); } @@ -3779,7 +3779,6 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const TCGOp *op) ots->reg = tcg_reg_alloc(s, dup_out_regs, allocated_regs, op->output_pref[0], ots->indirect_base); ots->val_type = TEMP_VAL_REG; - ots->mem_coherent = 0; s->reg_to_temp[ots->reg] = ots; } @@ -3823,6 +3822,7 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const TCGOp *op) return false; done: + ots->mem_coherent = 0; if (IS_DEAD_ARG(1)) { temp_dead(s, itsl); }