From patchwork Fri Nov 11 07:40:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 623679 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp616240pvb; Thu, 10 Nov 2022 23:43:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5F8Q/fE+1biz+OHlKQA0cMAWGqhc9HjRM39GaYQqq6XSqlK6kSJfJTKdDgq2sXUSDinmwj X-Received: by 2002:a37:ab12:0:b0:6fa:156e:4525 with SMTP id u18-20020a37ab12000000b006fa156e4525mr202344qke.76.1668152615276; Thu, 10 Nov 2022 23:43:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668152615; cv=none; d=google.com; s=arc-20160816; b=jsbkIf52pqFPMIDcU+ZpfVCB+OULlBZpLiH9cHLp2i/25Brz0xb33v6f0T6WiGSbc6 eJlmoKitTcJ59zrztu9XWyRcqBJHWXtXoYRIOlx1ISJ6oULkdmcchkhrFk25W8lkXx3y 1m/QgKCANzohO9TaC+fE9JnR8YWNYrj3hw+KrQCU1usz88gzMqa7+IIH9WaNbSq2XZtB RF6IWT1VDr7vkhZDKLQ5ZmuhbBeD/w6QQ/SpbuVKdjzXx/PdkQa4MA3lHwP0SnzP9EYl MqO9K+N7jHMWaCle7czFgTJRMR6yERIgCsXEMSQxqbnv0aeP24J7+IrDE7emQg/BaxeJ 7S4A== 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=xahjzoLT2lYIuoORTVfzuekRzoA+kKRZyhuxmI6DMcw=; b=Q7LSSBLAlTtsiw7ffxvsHpxzW/ky1xYtKxStmXyJlPR0O5Uv4WRmvo8fVWBRVu0VaC RFCZDYxDblnMJsZbH2bwk4H6xI80acySblgrFRyCylDEvKWEzoW4FnEh22CNb+0Qhm4g Ym90uw86ToREMiSPCrHb5MwSz3NBY5C7scUJ3dqG6yXKYimFS89FJbECSQfKGJ9yLC0l JuNpQqHUuOqdD+sxKslPwNoh0OUXesYSHwhjNntQ8+kxjUK+dlm7Zq44NIWgp8SdDB8W OX5DL+ppEeaMGRhmWm/AZizHIR5rsXoIeQUBZxj1VKtGloDUvgn/N55bly1zHglcn3lL 6Z5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WjXu6uzc; 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 ey16-20020a05622a4c1000b003a5882a0510si694789qtb.398.2022.11.10.23.43.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Nov 2022 23:43:35 -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=WjXu6uzc; 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 1otOfe-0006DY-1Y; Fri, 11 Nov 2022 02:41:51 -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 1otOfS-00068Z-PI for qemu-devel@nongnu.org; Fri, 11 Nov 2022 02:41:38 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otOfR-0007q4-B9 for qemu-devel@nongnu.org; Fri, 11 Nov 2022 02:41:38 -0500 Received: by mail-pl1-x632.google.com with SMTP id y4so3643538plb.2 for ; Thu, 10 Nov 2022 23:41:35 -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=xahjzoLT2lYIuoORTVfzuekRzoA+kKRZyhuxmI6DMcw=; b=WjXu6uzcszp5F/aQaA6GfZs9eRwAHNVzH0+s//5GZ6KfgiroX3RSynGtj/EhF5+O/4 61IUQ0kJ8qE1gCRQ3MElZo/6oj25vZtmpNU7m+JzY9sSpVRX8f6wXZP2ZoTJLmpCXWnj 5wycsanj/TsRc6nlT3I6aB0Jv6o5/tjaMNQFdae06Bs/ApHIRNr81OZi6duRyMKDmwi/ rvgfyeSBKU9BSSIzGDnlM8UQQoCIh6JyQU9cceBv9Zezon0SNXHU8jTX5bZkn+YRSyM9 QmvPGZx8bmyyDE8qOWY2CUhjfGYKBoyvM7VKKfETa0hR7Dq2k9bPftldqnyZg/vuLcoj smyA== 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=xahjzoLT2lYIuoORTVfzuekRzoA+kKRZyhuxmI6DMcw=; b=7vhb5fTDCkl0/Pr/QEkHZk2tmltnMFC/iQYVxqrEeEU3HZeeXUrjSRgZxiH/wTQkGt 4MkMui3BOciNcTCJOU0b3xB48qo8eyqnUGuftcVHSJ0zEgwRgfFAHMLLOgQwvlle1pyL LICL53RPNTauiwYRRL/Ts/FM4UmFS/sAAisiHp1lhHSsu/Qh2NmlLZS0RuHT2ZXQ0668 b1qnFCLl5uRHu+frRfT3D+I3/1kHg9Vfco5EthKTQotPFP8wFOa14YmODBNPxLlRN64c 2aWNsfeSpmYnw39BHN/xoHljKiFfemCllroPrXOOC/QkjbKtAMP8xNi+v/+SPkcJ1+xv MpLQ== X-Gm-Message-State: ANoB5plknN8lF3C95/jCvi27e1RQ1G0Vwvf98pIQo2Y2pzHkZZyfzUMr GpVqeQu2Zrx1O6OrpeWyLnflekKO8X3hpQVz X-Received: by 2002:a17:90a:46cb:b0:213:d200:e989 with SMTP id x11-20020a17090a46cb00b00213d200e989mr668232pjg.40.1668152493978; Thu, 10 Nov 2022 23:41:33 -0800 (PST) Received: from stoup.lan (2001-44b8-2176-c800-0aef-59aa-1faf-7e61.static.ipv6.internode.on.net. [2001:44b8:2176:c800:aef:59aa:1faf:7e61]) by smtp.gmail.com with ESMTPSA id o15-20020a170902d4cf00b001754fa42065sm976069plg.143.2022.11.10.23.41.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 23:41:33 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-8.0 v3 11/45] tcg: Simplify calls to temp_sync vs mem_coherent Date: Fri, 11 Nov 2022 17:40:27 +1000 Message-Id: <20221111074101.2069454-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111074101.2069454-1-richard.henderson@linaro.org> References: <20221111074101.2069454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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. 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 a82c291369..583677a1c4 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -4117,12 +4117,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