From patchwork Tue Oct 24 16:35:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 737557 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp2130406wrl; Tue, 24 Oct 2023 09:38:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIOgkafD6/md3U/Cihrt+uNWKbq8LQOsdWV35Q1d+3UdQqO1xjK3JlTsVRq3mC0QeUICk/ X-Received: by 2002:a05:620a:9445:b0:76f:fe8:7ffd with SMTP id sm5-20020a05620a944500b0076f0fe87ffdmr10395682qkn.69.1698165486697; Tue, 24 Oct 2023 09:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698165486; cv=none; d=google.com; s=arc-20160816; b=QoMpgr2deQS9ThOktef3dEjGOBXRcOP07IVf0yVGD5Ub+XWR+gxedn8u34IxjVePzm WRAjrYFBJv+z/VybkpreI7r+b9xXpzSNJNS9PuF5OeOjNLtDbDYUWJG9UeMmeeOsrnXZ nPrfL8JzSnK5liq4t5QItRc7rUChVapOJ+oipFAtTZREodKRJolJ0SHVDIyhv/f2j3D/ L9s67uUEWwHal6NBCyNK2eT6Ygg+Cp68zVVzigCCXPQIglxPMd4S+W9BXQxW2xCizJPX u3+R+GzYXzoSnS7v6l5DjNNzQ8g6PjvCH8Dcp642tOkgI3Wg/tyv8nI80jqyIIy8WARN 2uvQ== 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=9L3xRsVveSCMU9gTM2aMKdKV9IjkyK5EbO21w89IxGw=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=qDf6qVFP60L/oan5QaTfXKDA3J63AUBxIu5keG+U0nO2lP1DhE2CcxZNaC6KSyr81k u772RsZ5nQqaE7vRD/ZFdLG/spqcKhl+ZWi7LRP2BhpfbNRErag7Gk0GHICPB9NDWbIV qD2yptBpx4MyqA1LKNT3gyKVxNSpPgcjNt6NQtgj1aRUpR9MmHp156oPApUwdL6E7jq1 jjgvTkZTDMVIz2rAcRFeXw/96Q3wqgJH0mzKdQCWWkdrtKaKhN7XxdN5U//HHTHfLwbQ jGaaB/5ekHRzMKZYG692qShxUn/Kvym1vdsb4P2dtU6WPzhHSCkOddBqIDkdLn8tZpDP reTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TESFRAPl; 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 pc16-20020a05620a841000b0077412011692si7169428qkn.18.2023.10.24.09.38.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Oct 2023 09:38:06 -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=TESFRAPl; 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 1qvKNX-0002Bo-4T; Tue, 24 Oct 2023 12:35:39 -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 1qvKNJ-000207-2h for qemu-devel@nongnu.org; Tue, 24 Oct 2023 12:35:25 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvKNC-0004Mi-0g for qemu-devel@nongnu.org; Tue, 24 Oct 2023 12:35:23 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40806e40fccso34411565e9.2 for ; Tue, 24 Oct 2023 09:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698165315; x=1698770115; 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=9L3xRsVveSCMU9gTM2aMKdKV9IjkyK5EbO21w89IxGw=; b=TESFRAPlmnXahKVNZTRUZsOCSjPMK8fdm8LdQOOdUfDdBkHRfIklnpUSobdeh/pezB oCfio9a/TTZznzEatQF9ippTKnNZNcU/3WGoKTiJ6nbg5Ma33jmLRBYEQOGfsdnLZEBG jgeG5SHRzcGzPEOQSRR+hFrFnOdX3Pt3PwfbSERkLKaOtSiNi81kLtFsaSis9EgQm6cp dgTGr4dUZ2LgDMW2ijbf1rFzESyLEDuRnPCvvQC/olQgIzOOxUmQp1DuvFBGddAdEq2q 7AElwIfy0xN9XOEdzcxLqPAAmABm916RoS51DQ5pSWoNoNNtIK8oMwn4nvS8tUHv0G5P 2Ezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698165315; x=1698770115; 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=9L3xRsVveSCMU9gTM2aMKdKV9IjkyK5EbO21w89IxGw=; b=Zzpr3l04slA1Bn7r+IFGAxVXeNf5QMIuaL0v7b/1+9Skv7cNN8Jpkxlq6qh5VqZOdm BgFtT3gE/EHPHH+SXZzqw/16s3Sr0am7xhgcFSuqtV7tPyNKqFtqiBcObM9KAgYl9SyS 8eNgXpC8YNvIZvnGiplsx8LJUAmROMglu3Voc+aSP1ezNfOVlxjDM0GiOBuCbIM7wt4V nG7UR7y7zqZCPuohc9KDxkklDK4BFYZjuIVYcm4NJg0yBxcmHgLO3tWUd55bejg3JCqJ PUCaTYfawtVogiuj1EBMLB+T8q7QMpmWYiC7xqOgYn9mhS6bCkm/fQqRB9wN5/IkWIse 6TrQ== X-Gm-Message-State: AOJu0YydlpRsvnWqnqgdgGVcHTrjXJB06+qf62CISiVDAuWHpB7lJsl+ 1vCXMnX4TG4GyCRza8snq8bPWX8dcLU/1Zrgy7E= X-Received: by 2002:a05:600c:35c5:b0:405:4002:825a with SMTP id r5-20020a05600c35c500b004054002825amr10383205wmq.13.1698165315387; Tue, 24 Oct 2023 09:35:15 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id p12-20020a05600c418c00b0040773c69fc0sm16860101wmh.11.2023.10.24.09.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 09:35:14 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 4/6] target/arm: Move ID_AA64ISAR* test functions together Date: Tue, 24 Oct 2023 17:35:08 +0100 Message-Id: <20231024163510.2972081-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231024163510.2972081-1-peter.maydell@linaro.org> References: <20231024163510.2972081-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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: Richard Henderson --- 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?" */