From nobody Wed Nov 27 12:34:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699269606; cv=none; d=zohomail.com; s=zohoarc; b=de9Blm7zR+Hrp/7E9kwIA8tGJIzznyY4FAMpzxpnYFPzr4HMciifInbZo7awqRfcWnGQr/PRDYUXWQBwnIy4CRO+Zb5NXT5Sk26Z6vNVYyNb+FG06ZvOQP2z/nhR9wmXu0FoYk/Iav1MpTA49tjhfQlHQs6N7e/Z7+0/RJU3mLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699269606; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Kr5DULV07OwGLXl8unpIp7yrXhMhnI+29Dc5ljVlc2w=; b=MFIbrCQ4ppzcK8BebXXe/mUmOHM023ELrT8EUXT6u34N1Se7/pvM4/YjVcsIZ1yZVfs7UPxemmd1zPBFl7+usoXDGIUeZm/EV8fNwvOHgjY+Knhi5iItiHtDBB9Z93NzEBDB9gAxwC15m9MOXz7Qyhd1IB6LNKMpnevM4L0oAYw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169926960641381.3176738194926; Mon, 6 Nov 2023 03:20:06 -0800 (PST) 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) 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) 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-Google-Smtp-Source: AGHT+IH4BAo69cz3UuA35KFmjUUFhUkRdG+3mGsiR8W5V9QhANt/dkfHrFLlVjuREtmjDOTy7dt7Jw== 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) From: =?UTF-8?q?Philippe=20Mathieu-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=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699269607464100003 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=C3=A9 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 @@ =20 void HELPER(update_ccount)(CPUXtensaState *env) { - XtensaCPU *cpu =3D XTENSA_CPU(env_cpu(env)); + XtensaCPU *cpu =3D env_archcpu(env); uint64_t now =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); =20 env->ccount_time =3D now; @@ -58,7 +58,7 @@ void HELPER(wsr_ccount)(CPUXtensaState *env, uint32_t v) =20 void HELPER(update_ccompare)(CPUXtensaState *env, uint32_t i) { - XtensaCPU *cpu =3D XTENSA_CPU(env_cpu(env)); + XtensaCPU *cpu =3D env_archcpu(env); uint64_t dcc; =20 qatomic_and(&env->sregs[INTSET], --=20 2.41.0