From patchwork Fri Dec 30 00:01:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 637839 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3181270pvb; Thu, 29 Dec 2022 16:14:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXsPcNNPcHD91eBbbSZamVXMDjKI0ttrXts+PuPwgSvcJDuX/w0/mM2KauIbwjVmKQ9lRdh+ X-Received: by 2002:ac8:4b76:0:b0:3a8:1447:d10b with SMTP id g22-20020ac84b76000000b003a81447d10bmr37153531qts.46.1672359277843; Thu, 29 Dec 2022 16:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672359277; cv=none; d=google.com; s=arc-20160816; b=tp9VEwf2tIhRPLJPxtGtTovZwmipdspZBb+D1GEFNWcypDWEY6fdo0j/7dY3eXnZXD dOAOVEvQyQ3TLaW8+vvbGm2ifpyOZabE5iRfolmMmp4Xa67iLQeYH/JooftofxiJxZhK V11fE2Q7jEiBWlNx6bsTvTpqueUNRAdEVr8swv/D12eWwpdISJHUacw4PMejBKICwn6i OkgQgnB4rniIjqL/pTFD9Luuyr31ks9R8YlUcTsrhm9kXcooONfSoe5haAEy4BVn2LV/ /mzN7Q8p5j/ggFLOfgxW1FrJzjAzqyuRMB+yaj6FXduhtcbXy741/NaUgkjs913ZqIhW MSWQ== 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=14I+QLaNg6Y9e4H/8QMxuuyCzHk2ngznUAbtAPjHaRo=; b=vb2VXgI/EwsXHWlOXreqtyxn4TKDW1a9NDbxpgQotyF0+ErME0nKOtPF93DB9YD1M7 yVjMSL/b3sG6p+SISU6fh/4N3jBkityjecOELAfVuA93sbrEkZCK2YEy47FrFrm0uwfG hQe117SRyEeM49NNkPwltLtglfuOT0vhwfzDE8zFRCjjsPH9XADHtC2HG5kmOi2MRDFC NwfpZ6USBc032mPwdnj5QyuDPuM8gHfAGvQKVi0FdDorP8wGBTfzjRyZnPhlaIi8HTiE 7drVIdSdp38EziicMMVm3lfgr6Z76oWiRnm2PXh4NlubxuPgvOcZmGlDAXgo2muCkArd 3N6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YXDY7Gnc; 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 q1-20020ac84501000000b003ab43dabfacsi8922035qtn.301.2022.12.29.16.14.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Dec 2022 16:14: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=YXDY7Gnc; 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 1pB2rA-000322-Uz; Thu, 29 Dec 2022 19:02:40 -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 1pB2r9-00031n-Vt for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:02:40 -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 1pB2r8-0002hW-Ac for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:02:39 -0500 Received: by mail-pl1-x630.google.com with SMTP id d9so3610128pll.9 for ; Thu, 29 Dec 2022 16:02: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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=14I+QLaNg6Y9e4H/8QMxuuyCzHk2ngznUAbtAPjHaRo=; b=YXDY7Gnc2LNTkdXFDVwU0n9aaJIVsDn2nVtGQiBNASSBBJKzRZMFWhXIYcoZBiSeHP laP/qxK9gFNhdqE1TrTz0xDRxn0rHqczYlUqzVPvRG3y4cYFy7E43z0BjWUNwJTQgNhm ZSxiBSdClMDQ/Mrd32+4dPsaUY1IZQo2O+Zoq/ZEqDz7TCfwjot5qYydrHhBe5Wkf7v2 /8UJ/mt7Amf1Jl1NQje1lGYZ/DCWYRXxboOz9yRXiTlEjKC1PU1zmoFr6UNd1oDEfPLO cAVEXtScYj8jgUaSVFWjCdMoRJN5PkUhdayNhzXlRibrUttmMX+1+5pix1ynmRN6wEfL crRw== 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=14I+QLaNg6Y9e4H/8QMxuuyCzHk2ngznUAbtAPjHaRo=; b=CFBlFGXGHQVRZIzYqdN8BEzMBK+kG10OecrSt5BAYys9VfETYfRj/ppqh4Qb80pMAF 6uJdhDDYnFsNj8VHzceDzSGM9lDj9VfMOEHaaIavQEo6KW+yTL1QRbTCDpBiURS6PyVE v+huRJ6plRrLLQ0T6JdkjpOWjlCjpI9Kls8WpVD2CsxzJYEbvq52AIDNT5xeYX0tC4FH KWQvh/Rqn4w9HGPf0idKwh8c012aCBsNWXRiMJv4FfZ8cDhHF1fWXU0n8AujEPj2AmZy Z+MhljZPZVKIITr49JsdYWVAtLs6hPoTVcQQAeFns2JKF7+wlAomFD5M4JJNrdaajcUI mjCw== X-Gm-Message-State: AFqh2kqYW3Ut9HD2ikqkfMJPOzIQM/qWXncYSs+VZCMPJaelwtJh8IO/ eU5fEYI+xApPc/4yuVYiX14bf+j/bi+Se2UA X-Received: by 2002:a17:902:904b:b0:186:95c9:ddc9 with SMTP id w11-20020a170902904b00b0018695c9ddc9mr37846166plz.55.1672358556934; Thu, 29 Dec 2022 16:02:36 -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.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 16:02:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 15/47] tcg: Fix tcg_reg_alloc_dup* Date: Thu, 29 Dec 2022 16:01:49 -0800 Message-Id: <20221230000221.2764875-16-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 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); }