From patchwork Fri Dec 30 00:01:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 637849 Delivered-To: patch@linaro.org Received: by 2002:a17:906:1189:b0:7d5:1b03:224a with SMTP id n9csp4172901eja; Thu, 29 Dec 2022 16:18:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXv+2GwtA/bB5Nxy8tqzVVlHfQSbQ1YWRoXFWqie9yjva65EBeK4EY5nIF1nfCSPmscYQuPH X-Received: by 2002:a05:622a:244c:b0:3a8:1635:ae5e with SMTP id bl12-20020a05622a244c00b003a81635ae5emr39956634qtb.39.1672359528236; Thu, 29 Dec 2022 16:18:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672359528; cv=none; d=google.com; s=arc-20160816; b=hTSsdyIJAiS0eZ07FOQmXqgesXHQ0b4Ra0Mi3BSYxSA7ZzVImabIOqc11DMKtY/n9q 2DOPJ/1Ogk//xGuzD2v4iQVhHNwQD0+J3b3MYTo2iIJxxns/4wusX0JPEP+yE4ElXatY TRLMd2Fzq6TjZYcC4Msf3Pzi/etgr8q4gCV9g/9V5Z8Cve7Fv+bMqdwStBdSolM9c6Ze 3TthwXnyLTDVG7+kwQzuvPwUoLhqKVn7e4nVi7dvv0AUVEXxVme+W8JnawHDyaW1DoIL ahvvpXubK3ZlF48q2Lhc2kYmqt2BE0RK//VjNzY3WMNOoA0k6dEiIPmQMzLF/SrkapB2 gaxA== 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=U5s77/HOJU835mIfYuf5JfxpCLvovCeIACqQpnTsn4Q=; b=b9rR+O0f5/hr4BGjI7hoj/qJD4oIWnPbqNphwIy/0a0WbzJTwJOJhyp6H7toCmf8xT iEWX7KMMn0zvmf4fkcEFHaHhxI5VQusnfoN4ELk1a9+jMYO7MZH0idHMMYk5mlti2A0F X3BrZlq0E5heyDrHHy/9bLJy+mcYGmr+OX7XxLDi/jkKgQe1WxC5vviUagBpvzgRnZ8d dQPHpGq+fzhXbo5C9yu8pD+P37cL0Oy9tPGUgvhjRgS3tG0bUsvHsuBZybynRZfmlZVS TbzEVwrXYwS4XALU+mv+/uam6k531dSsubGtYNKGK+E+KzV8+sx4ZA1t7P2cvr1DSKJL Zdfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WpW/d/cT"; 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 t185-20020a375fc2000000b006faeee39753si8687814qkb.290.2022.12.29.16.18.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Dec 2022 16:18:48 -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="WpW/d/cT"; 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 1pB2sQ-0003vH-VM; Thu, 29 Dec 2022 19:03:59 -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 1pB2rX-00039J-0l for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:03:05 -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 1pB2rN-0002jI-Kz for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:03:01 -0500 Received: by mail-pj1-x102b.google.com with SMTP id gv5-20020a17090b11c500b00223f01c73c3so19378037pjb.0 for ; Thu, 29 Dec 2022 16:02: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=U5s77/HOJU835mIfYuf5JfxpCLvovCeIACqQpnTsn4Q=; b=WpW/d/cTIDQTjQO+HxI6YyhWQtBtpGlz0unyBbptOV1sWNAEOlsfe9np0I9m/F9z2V GhN9RlFDdx4zyz25q14vQY1W1jbXaGMx1YVLKWUYtAsXdGFPtwdAJzkaopNjtgxTAzEe BAxeGAGa+GH4OcaIcxq4hUgE+aGcThH7nIBUkui2CCqsuTlDdQgjAmjJl7jSQ5FF81RH S2DKIeprfmEmuVzLjA2phlMZw2nV8hiFE/0YGsFD1kaXa+HaCCJaW39+FnRa8UPVNT2t KJDaOh5DG7HlAMibLZsigTQg7EN6WaAq2BUrY8bhZijAzqUX9GRAkOlSpvO3PQdBXsor BTKw== 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=U5s77/HOJU835mIfYuf5JfxpCLvovCeIACqQpnTsn4Q=; b=Z5mcikzjFlijnlsADZMr7EA8lQiJ8/u8VAiyd4TRHtETA5XMgVDhK97ALvs07kj12t WhnPMWHFGBJarCoNg0QX/Nj+gOMGZGtGZJRxoS3LbYK0y/vtFU4apLBJPWRGlteYxvRF 0Zr7e8OH9It4AGehsjMHq0WX11jKrbIts7VwePZ8jo3EVeCUxoJessqTLR0YqvDT0xXU 6qOJd2FDmTZyaQGWimIN+8d0+bm3Fpvd1jzD9npu4e84nM1Wx70rv08QvgQE2FpoZbCS 0gjUh8rthpxo5TwdUN7iOK+YhbQnA1W0rgM62cFetV8sTGRCq1Q0X5VS0rlmGEYA5aSE /+3g== X-Gm-Message-State: AFqh2kq6ag8WQ94P+9ZCJZtGqMpgs7KN4kwis6QIpsxrJ5GNuKRe83c9 vlIZ0LaBlfTrKnmQSffFXnWYH3HWr//DIAZR X-Received: by 2002:a17:902:7610:b0:192:751d:b2e4 with SMTP id k16-20020a170902761000b00192751db2e4mr15135728pll.48.1672358564913; 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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 16:02:44 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 24/47] tcg: Simplify calls to temp_sync vs mem_coherent Date: Thu, 29 Dec 2022 16:01:58 -0800 Message-Id: <20221230000221.2764875-25-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::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 first thing that temp_sync does is check mem_coherent, so there's no need for the caller to do so. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 4f2e05c69e..28ab174f1b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -4078,12 +4078,8 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const TCGOp *op) /* If the two inputs form one 64-bit value, try dupm_vec. */ if (itsl + 1 == itsh && itsl->base_type == TCG_TYPE_I64) { - if (!itsl->mem_coherent) { - temp_sync(s, itsl, s->reserved_regs, 0, 0); - } - if (!itsh->mem_coherent) { - temp_sync(s, itsh, s->reserved_regs, 0, 0); - } + temp_sync(s, itsl, s->reserved_regs, 0, 0); + temp_sync(s, itsh, s->reserved_regs, 0, 0); #if HOST_BIG_ENDIAN TCGTemp *its = itsh; #else