From patchwork Tue Jan 21 11:40:50 2025 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: 858948 Delivered-To: patch@linaro.org Received: by 2002:adf:fb47:0:b0:385:e875:8a9e with SMTP id c7csp148223wrs; Tue, 21 Jan 2025 03:43:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXnTPU7JNr/xzS2bfnl6AIiOv4Oz9nOei7uAXTyhIVNYqjCHsAV3/f8y/ds+A4QhjRiJD5f1A==@linaro.org X-Google-Smtp-Source: AGHT+IGpia63iq87n2ZpqIY6ggS2YhJaTXK+6DzsCKHCTcm7i0/Rfc0v1lP5Mot1cPv9rVWp+bLJ X-Received: by 2002:a05:620a:2698:b0:7b6:c583:9737 with SMTP id af79cd13be357-7be6324ae5fmr2402760685a.34.1737459810253; Tue, 21 Jan 2025 03:43:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737459810; cv=none; d=google.com; s=arc-20240605; b=FaEuYBAaQopAGMwNxkJ+/oJBvo8frSFHCtJ1Fer20iB0QSvRHZOG6PH7qUWUzGpAtA csggBAips+k8Y6sVMqutvmZVgSnJm/ZVNZ/D2wEJO0K9itaNSKz2S5PZMomQPZRxYFpg c5XSO3csI4hLStAXKdMBgJb+U8cLdinZNfURZaQuTLrF5l2Qb+E41vawsjzvJ+5nOEQh 3brruIj5i1BQtY/eaD1hzXMSl4XVPtPqpyCKqWCRWjWwM8C9kU4vKyHjsUb6KRZ012iW jOcO2KiWvD1xsAnPnV/Ag6FY4/n48LkWUwK351bZgkcNsAWyEjX3U/tjTjefgRo5cS3n Qs+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=ZpYqX6c238IVN8ObNqaQEL0twXm4e68BH00WB9vFFrA=; fh=B7PgRO6ceoQX9QVqUxwheTZYUs+aKW2naPWg2jE2ats=; b=DAhHq80LXolPr+DwiZYtnyDJc/evLSdqk2ua+CJK1GaLzL5zwt/SD44BXu4Al8WK2X PAe9n5VaLs9dBFztOW7YL+ZGbfYakz0QSaZnrePR8Alykwa8Tf70DqC4m98JEVuKIQdy aMwQwYAMv92igC1bE4z+rzylrbcfzvzg4kC18wfYu/IQvMg8cD2bdR8tcHoHrN1hGLIR R4XOy7SqY6M+Do8pO69kgZVGN9mQNBk3yi/lmN9qe5416YLQxhA7rrRtynFfoSSekFaU VGMytAqeSmu0cv2RS9tTGs15oyxW/teyFKkYPtKbYGQMwax0ei/yUKkb1SgUJ+xnafqf K1Rw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D8gRT90C; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e1afbfb3bbsi118167026d6.17.2025.01.21.03.43.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Jan 2025 03:43:30 -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=D8gRT90C; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taCdP-0005JL-1N; Tue, 21 Jan 2025 06:41:31 -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 1taCdN-0005FV-3J for qemu-devel@nongnu.org; Tue, 21 Jan 2025 06:41:29 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taCdH-0003No-2b for qemu-devel@nongnu.org; Tue, 21 Jan 2025 06:41:28 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4361b6f9faeso35076495e9.1 for ; Tue, 21 Jan 2025 03:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737459681; x=1738064481; 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=ZpYqX6c238IVN8ObNqaQEL0twXm4e68BH00WB9vFFrA=; b=D8gRT90CbaFwhZAyuo6iH4FnIgPnfB6SVf4vinwB5YkTyLHl6t+3BqSk9PAknnHABj Pogr5SLdIpEpNpCYD3hKmfDftSJHQ1/U+Q7pJyjp37yo/RnXeMrKoGiVpS9LeNjQutgz 8Q3qmVaLNszoNTuD9F7q51tkuPqRrrwAr73GT+SLifvBl9UmFF/9NL+Hmv4wPldVqjcB OHFsCc1r4z3wnpvBN/sxhHwo+V3V8h0qEVGMqn0wOvfvV6JQR1aMZ8FXDDTKI5zTlvYJ JWZtYqTZtsGjnOKUklpPZ5U18ptPSW5C8Ul/oDrc1lCy3K9BgzUPwpEuD3e+8Yu+/Bg0 w7iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737459681; x=1738064481; 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=ZpYqX6c238IVN8ObNqaQEL0twXm4e68BH00WB9vFFrA=; b=Gc2EUYytNPZBw2aAdy6YxbESIpogGjaUwBhWe9rzJ6ORRuShc1WDwY9ailT92JIB0+ uy8AfV/tszoGJezKTJ4deh1dD6AlZlVQ6982SnDiUPN7FaOHLO5n4tD2jMhfaOkD1CEA bz4bkQvn9mu4ODdZv6scTTCvyuZxDsm2U27gssJ57gj3CVWIlqinmC8G9P2sjmJKn7Hd CobUfC8nT8XQrvDI5WfmUwySn1bAcyPWYyfHENdesYYDK6aeO+kFPPk86NszjoycHHVt mQcP1DNxPag3uiueXXHgtFfpJOHWZlvd2pMxhVJPwVdvlRwt2AMzpUc0sGxK0/AoXHES ZRug== X-Gm-Message-State: AOJu0Yz+8W1kFtV6G3QLtfK+XusJbgjfRXCWYPoewsrlb4ehrc7ZejTN 7wGfqDm03c3JKIu/EJdm6cZjP8u/2growWHNzAqoJnDDktNmZNJ1L6NYpNN2QAWZAmyDJy037Xv D3h8= X-Gm-Gg: ASbGncvCiE3aUEdfc2yl0hK6L/9lWxKUDGrJr69ZPpgGdeC32Vsf2RMIzHS1A6jmy54 PDUVlcjXwtg6UF3jXozfLf7UFpYeCFxsFFOmD6ykYVmDgbHWW0ov0/b7VaqGdiGwc+aQFx23AmY 9++6ArARCgzDEov4Pqn+HC+D2TTqJtaRW6nF97r0t4a/Tsr4OFC25sqAF2h62iy5gF5TO3HnN8W yekSheAdLR+wT3vw65B8QTVAXqBohDJFe7EdHV1B0WQRbJWdnk3zt4l5rNof3wqm9Sch8scLenL nNltTWBsOGoW6nzG1LYdLYzSBT1WLGV6vMWvNBAyiqYY X-Received: by 2002:a05:600c:4f53:b0:434:fa73:a906 with SMTP id 5b1f17b1804b1-438918c5d0fmr139458315e9.4.1737459681114; Tue, 21 Jan 2025 03:41:21 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c7499b28sm245220405e9.8.2025.01.21.03.41.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Jan 2025 03:41:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 05/11] disas: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Tue, 21 Jan 2025 12:40:50 +0100 Message-ID: <20250121114056.53949-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250121114056.53949-1-philmd@linaro.org> References: <20250121114056.53949-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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=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 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- disas/disas-common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/disas/disas-common.c b/disas/disas-common.c index de61f6d8a12..57505823cb7 100644 --- a/disas/disas-common.c +++ b/disas/disas-common.c @@ -67,9 +67,8 @@ void disas_initialize_debug_target(CPUDebug *s, CPUState *cpu) s->info.endian = BFD_ENDIAN_LITTLE; } - CPUClass *cc = CPU_GET_CLASS(cpu); - if (cc->disas_set_info) { - cc->disas_set_info(cpu, &s->info); + if (cpu->cc->disas_set_info) { + cpu->cc->disas_set_info(cpu, &s->info); } }