From patchwork Mon Nov 6 11:02:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 741345 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1027984wrr; Mon, 6 Nov 2023 03:20:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYJHDBXQrfCVEUCZL0m37frKTFRcm6Fm8cB7tb9uKmxTHwI+X0tl5HS00amvYoEKsRbZr5 X-Received: by 2002:a25:c5c4:0:b0:d9c:1ef5:afb with SMTP id v187-20020a25c5c4000000b00d9c1ef50afbmr30580713ybe.25.1699269606296; Mon, 06 Nov 2023 03:20:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699269606; cv=none; d=google.com; s=arc-20160816; b=umQrEdndUBFRBYfCRgmWvya8eYExnhy8c7+d03eP/725ES41V8ChmMn2IJKwGdP1E4 +b/QcdXB1ALbqWimpH5xcrj9s8aNLRr6+UIYg4VtQz1uwlvqMBi7e+aj2uTi9yGTvCvp EQG0iG1X9CU182SVYVfPVfAlrwOAj6NHGYWKv8CQs4demZNz4vESeWetaBEA4L+Wjb7q BuKV3MPTLAv3EddgrJc92GL3UAHFKGmU8y/ba7tYZmSu1HdZVExAtkSDBGHCFgvhB3rC UxK/xwRZmJsHyUIv5CnyHd6pSVVPr/m7xasYUaycKA+NtKf/rs5dZ1iG6Bp4mSidQsZ3 MGHw== 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=Kr5DULV07OwGLXl8unpIp7yrXhMhnI+29Dc5ljVlc2w=; fh=KsRs8T3mbLYMlyhqBIfasTAuo72nFePg8n4RIyLlRbA=; b=P4bbHDnsF2J3tslxIcpeu1dXXB94xVyT/piCBiB9hMP64Vj09vD4iw+uqz3u4uFqFc 2gcR9BsTOEMnlv1lS1/C1PhAhEuZ99/pIiBC6iBWXSanQM+ZBnLonS/Ikx73F5prL+4U 4cgsC8ZTULDy/ETyAAJu6G6sXYc51X+i+FFPvKsCIEI3sVzewVt7ad9AE2Pk3Ip/1nU/ sj5gu4lwpDFxgiey4Yw2mr/rEaOEIPWByvKVpeIW+XaDsqL+3pH+jdsOJmIxvCSJwMWR w0UcT6EeSOlDmxUJC53j3/VZKGLxMPxU9moogP0UMeTHDkyK8Vb2v+JVNmYYqDEfOS54 xpAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sOxXyZef; 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 b1-20020a0cfb41000000b0065891b94fecsi5363112qvq.426.2023.11.06.03.20.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:20:06 -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=sOxXyZef; 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 1qzxRV-0002RH-EP; Mon, 06 Nov 2023 06:06:54 -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 1qzxQz-0001f3-Mo for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:06:26 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzxQw-0004Q7-KA for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:06:21 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40838915cecso32065055e9.2 for ; Mon, 06 Nov 2023 03:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699268772; x=1699873572; darn=nongnu.org; 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=Kr5DULV07OwGLXl8unpIp7yrXhMhnI+29Dc5ljVlc2w=; b=sOxXyZefFQlVCV+4hcEIk9BVRvSlt4gjy6F/RpJzNFEhqKAl+2eungK6YZUlRb8NCK 9Kx3h29SWJuXqijqNwpBIYZw7JFGi5eYIuQUL50aIuwUIlRs4T8DCwz5boF5BGg1G9XL xTHu16OA1G5JuVsezh9BkUl29rUQnReWW1hJcNd5TmBMv8Alqrjnun8bIKeMj6p/E+2M 51BbXgBN9ub6QFoQ8xtAs+oDA1JB7HvvIKMm/LyMHJc/jwwEkJWMdWLYvPBjMeaxlqRL YijmgBZir6FvaJYSnxOmdC9hb7x1vhJJ362cgDVxAKm/ziP7K3GMVse0w1gbDbTlEAJ8 xmYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699268772; x=1699873572; 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=Kr5DULV07OwGLXl8unpIp7yrXhMhnI+29Dc5ljVlc2w=; b=QRXprX8jZFl1LLa1fQtqA81KfiZsQI2qxDsuwZpKXtP5NHLKSln4u2cdI8yG/shqP6 BpHNAXZaCWHSqVHUPM2Wvg3LUf8dJtknN3IWN7f2CN+thDfRfd6nNgGMGT7imBz+ezPP 3XaRbD7XTXUbaHZ5QuPuionzub9/cuVyshHz7gEYLUFpea/w3yegspksnco8xNVzXe4w Vbu5cVhjk0pUnU0EWDfL+ze+aL0W3ehQex8XYIgAgxN8NqvV6EuG22jc4wJuh6gqXxN7 rzPUG8xaUcUcCo+KJGYbEirE1BhvVlOYq41CkEKpwqdtfMPc5mb11uEuD7o62FFkK9v0 BLNw== X-Gm-Message-State: AOJu0YzgV/h4A6TQHBejDYDsAWghXsT1Le16801aC4nXfwa4aHnK3kga cT+/X0md7M+Vin6VLs/DR7n/eSBDcd9IyMsBoRY= X-Received: by 2002:a05:600c:35c9:b0:401:73b2:f039 with SMTP id r9-20020a05600c35c900b0040173b2f039mr24065294wmq.7.1699268772505; Mon, 06 Nov 2023 03:06:12 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id j11-20020a5d618b000000b0032db4825495sm9214037wru.22.2023.11.06.03.06.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:06:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Alistair Francis , Max Filippov Subject: [PULL 22/60] target/xtensa: Use env_archcpu() in update_c[compare|count]() Date: Mon, 6 Nov 2023 12:02:54 +0100 Message-ID: <20231106110336.358-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106110336.358-1-philmd@linaro.org> References: <20231106110336.358-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 When CPUArchState* is available (here CPUXtensaState*), we can use the fast env_archcpu() macro to get ArchCPU* (here XtensaCPU*). The QOM cast XTENSA_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Alistair Francis Message-Id: <20231009110239.66778-5-philmd@linaro.org> --- target/xtensa/op_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c index 7bb8cd6726..496754ba57 100644 --- a/target/xtensa/op_helper.c +++ b/target/xtensa/op_helper.c @@ -37,7 +37,7 @@ void HELPER(update_ccount)(CPUXtensaState *env) { - XtensaCPU *cpu = XTENSA_CPU(env_cpu(env)); + XtensaCPU *cpu = env_archcpu(env); uint64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); env->ccount_time = now; @@ -58,7 +58,7 @@ void HELPER(wsr_ccount)(CPUXtensaState *env, uint32_t v) void HELPER(update_ccompare)(CPUXtensaState *env, uint32_t i) { - XtensaCPU *cpu = XTENSA_CPU(env_cpu(env)); + XtensaCPU *cpu = env_archcpu(env); uint64_t dcc; qatomic_and(&env->sregs[INTSET],