From patchwork Fri Oct 27 14:39:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 738683 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp473279wrt; Fri, 27 Oct 2023 07:43:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFgxL4sgNBptuKFt82c+iwsXAeO7OzLJNsT3fYKTfhtmhYNPzNt4y9psSvdPo7kLZG0D4nV X-Received: by 2002:a25:dfc9:0:b0:da0:ce42:e609 with SMTP id w192-20020a25dfc9000000b00da0ce42e609mr5936613ybg.8.1698417797766; Fri, 27 Oct 2023 07:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698417797; cv=none; d=google.com; s=arc-20160816; b=jyqgbO8aR3TJjL/zT0Q/0Lp7cqjqRd2Rs3iT2mvF96a7bbo/XLth9EwMKhbel7oXW3 lFY8CuQi+S/mQ6ZOicRn9Lqa05EIMYnhg91Ko0BoNZpCVf66sFG3mvn0ff9IGWenMyeH c4J54hb+ilN1qQ/ho4jgnsrTsgY4dweOzyMN/eybQcH/6S8RzI6emEjoUGMmSoZmPp+n JmqLHKI4FQn/QHwUgH8fbEjOAK/k+8bpVE8ppJ9iCdjj9x9HDULgHGMDTLGug6xA9LH+ aBrwgFYhqudQJEIWzGydRr9CW+dBigBi1RfBKT4W//JopjpKiGIgL6gpMso38XEM5QIv q3Kw== 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=NEjtn4tYJYgyuJoAFl2Zq6orFVKNiTU3YlEdz7lzhAM=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=ydnhuLrmpCEXMuSpI9DdiO1zJuy7yDIYguvSSd98y+2nwCQ9lTwRZ14DFeKg1xEfO7 1jlBdGqZm2jCR401ahYufkNRI0o5CRfvjKIjtyFSNqmLdkIgWO/mQV39R2xnxdqRoulK 59otQLlJMKWIDdTynU94+c9J+e6InIT6aq0vGkKfuwP8C1SQuF9AuHmbsPknl1Rdn8Ny 9hRvkJrVhn5KXc1Ta+pewkqx+VzNJvLrJOMvDqggl37ZScsReifIbXjQYrJqvh7saPcm bM2gbYqfAhFnJJHkRuWuorQyj1C3bMko2alnHe7n8qMLzO23xa+zIF/P/lb6WOMD69Nl 8khQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yNT7sVRq; 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 c201-20020a25c0d2000000b00da0c8659244si3068074ybf.573.2023.10.27.07.43.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 07:43:17 -0700 (PDT) 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=yNT7sVRq; 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 1qwO07-0007CK-FX; Fri, 27 Oct 2023 10:39:51 -0400 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 1qwO06-0007Bm-Dt for qemu-devel@nongnu.org; Fri, 27 Oct 2023 10:39:50 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwO04-00086y-Jj for qemu-devel@nongnu.org; Fri, 27 Oct 2023 10:39:50 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4083ac51d8aso16772105e9.2 for ; Fri, 27 Oct 2023 07:39:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698417587; x=1699022387; darn=nongnu.org; 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=NEjtn4tYJYgyuJoAFl2Zq6orFVKNiTU3YlEdz7lzhAM=; b=yNT7sVRq0fCscGduhZ9kbVjKZNKSk51Vi2eWTzOkL1IjYPpw8qhMYf4GeKiF0KUWgo 40MPZjJV/AtdZ7yjRDPDDC/aeJXgKpkOqMoOHWd5C8k24wYKyf0d9qf31Vwx7xCl70m9 9+zflSDqInEvch5sf+KY68LrCn12z4A5uRLf5kPJLQyHZsGN5KRd8YoPYChHl5TPeLPi +KhdRRb9Sfw5+sZNkZOBJoUW/sWw1LcXuWbOfyoqoHBPaq/Ppp4tCgVSsYEvQiwK3VNv Dt2lwSPqJKgbH5yG5yLVadDwM8myFU4M2/ezcEpg0S0Xclj0Q55Puc2qLl3hGUdlF3ce ZE7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698417587; x=1699022387; 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=NEjtn4tYJYgyuJoAFl2Zq6orFVKNiTU3YlEdz7lzhAM=; b=peoqVzMC5MpPD8PaVEHbNS8O7nQDIQc4wd6MH28vJ43Cu7Rk4448nVm8zYqqBjYy9i X2CFCCvdk7XC9RrVr/qfLpfRVj676brcr3Vp7ZDj9WeWU3cnL46Fnb+N9WTGW2mfjQu9 3LJFkSBHDVPlln01MtvCIG+vj8e+809Umiy5q06cATJpe6DmH+YXJL9Qn9ICUfshCKjj Jas6SLSSa50oKqHvE30g+6UBexyAQMfuTGmZk66Xuy5OSpm12Lkx7neVrflR7Dmu6A7E ZvgBjXca+NacPmhlvj4ytshKEsL+8wbs+ZklwAu0CqNpDCM3BG3KdNsQc59+ScMi5NNA cgJQ== X-Gm-Message-State: AOJu0Yy+Kdt7/nKCPA7OS+cytRmuSQ4Y+HW8lVjNavXwKYFWgdzmlAeD zyc4i/Lh9Wm8/JQyJFCs2hWCrOmtQSO786LwqG0= X-Received: by 2002:adf:f24a:0:b0:32d:a476:527a with SMTP id b10-20020adff24a000000b0032da476527amr2346250wrp.50.1698417587009; Fri, 27 Oct 2023 07:39:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e2-20020a5d5002000000b0031c6581d55esm1874123wrt.91.2023.10.27.07.39.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 07:39:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/41] target/arm: Move ID_AA64ISAR* test functions together Date: Fri, 27 Oct 2023 15:39:07 +0100 Message-Id: <20231027143942.3413881-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027143942.3413881-1-peter.maydell@linaro.org> References: <20231027143942.3413881-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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 Move the feature test functions that test ID_AA64ISAR* fields together. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20231024163510.2972081-5-peter.maydell@linaro.org --- target/arm/cpu-features.h | 70 +++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/target/arm/cpu-features.h b/target/arm/cpu-features.h index 90200a4b98f..e73120ef974 100644 --- a/target/arm/cpu-features.h +++ b/target/arm/cpu-features.h @@ -451,6 +451,16 @@ static inline bool isar_feature_aa64_rndr(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64isar0, ID_AA64ISAR0, RNDR) != 0; } +static inline bool isar_feature_aa64_tlbirange(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar0, ID_AA64ISAR0, TLB) == 2; +} + +static inline bool isar_feature_aa64_tlbios(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar0, ID_AA64ISAR0, TLB) != 0; +} + static inline bool isar_feature_aa64_jscvt(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, JSCVT) != 0; @@ -514,16 +524,6 @@ static inline bool isar_feature_aa64_pauth_qarma3(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64isar2, ID_AA64ISAR2, APA3) != 0; } -static inline bool isar_feature_aa64_tlbirange(const ARMISARegisters *id) -{ - return FIELD_EX64(id->id_aa64isar0, ID_AA64ISAR0, TLB) == 2; -} - -static inline bool isar_feature_aa64_tlbios(const ARMISARegisters *id) -{ - return FIELD_EX64(id->id_aa64isar0, ID_AA64ISAR0, TLB) != 0; -} - static inline bool isar_feature_aa64_sb(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, SB) != 0; @@ -554,6 +554,31 @@ static inline bool isar_feature_aa64_bf16(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, BF16) != 0; } +static inline bool isar_feature_aa64_rcpc_8_3(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, LRCPC) != 0; +} + +static inline bool isar_feature_aa64_rcpc_8_4(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, LRCPC) >= 2; +} + +static inline bool isar_feature_aa64_i8mm(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, I8MM) != 0; +} + +static inline bool isar_feature_aa64_hbc(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar2, ID_AA64ISAR2, BC) != 0; +} + +static inline bool isar_feature_aa64_mops(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar2, ID_AA64ISAR2, MOPS); +} + static inline bool isar_feature_aa64_fp_simd(const ARMISARegisters *id) { /* We always set the AdvSIMD and FP fields identically. */ @@ -804,26 +829,6 @@ static inline bool isar_feature_aa64_pmuv3p5(const ARMISARegisters *id) FIELD_EX64(id->id_aa64dfr0, ID_AA64DFR0, PMUVER) != 0xf; } -static inline bool isar_feature_aa64_rcpc_8_3(const ARMISARegisters *id) -{ - return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, LRCPC) != 0; -} - -static inline bool isar_feature_aa64_rcpc_8_4(const ARMISARegisters *id) -{ - return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, LRCPC) >= 2; -} - -static inline bool isar_feature_aa64_i8mm(const ARMISARegisters *id) -{ - return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, I8MM) != 0; -} - -static inline bool isar_feature_aa64_hbc(const ARMISARegisters *id) -{ - return FIELD_EX64(id->id_aa64isar2, ID_AA64ISAR2, BC) != 0; -} - static inline bool isar_feature_aa64_dit(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, DIT) != 0; @@ -922,11 +927,6 @@ static inline bool isar_feature_aa64_doublelock(const ARMISARegisters *id) return FIELD_SEX64(id->id_aa64dfr0, ID_AA64DFR0, DOUBLELOCK) >= 0; } -static inline bool isar_feature_aa64_mops(const ARMISARegisters *id) -{ - return FIELD_EX64(id->id_aa64isar2, ID_AA64ISAR2, MOPS); -} - /* * Feature tests for "does this exist in either 32-bit or 64-bit?" */