From patchwork Tue Oct 24 16:35:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 737551 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp2129546wrl; Tue, 24 Oct 2023 09:36:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+wlsGSBkRDoPtGJUaTiv9YDM9Yy61tYHeLo68amx6bl5UEusPALV44wAmZGI0lROCi3cT X-Received: by 2002:a05:6214:1c45:b0:66d:136f:a522 with SMTP id if5-20020a0562141c4500b0066d136fa522mr14836374qvb.26.1698165365753; Tue, 24 Oct 2023 09:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698165365; cv=none; d=google.com; s=arc-20160816; b=ZUZBa/tFlFSFmTZwLsyvlVqjlj9trme76XZH52IUhu73Euo7qX6VLwJod4A+uufZn5 jSj8/n5854cByAHsuy8iI50s+cxBJuW4uvPcVB9a9f7YnWn4VKTlwIQFchilxgS+BD+Y oinhftkHm8zzPH9ltnQ5a4BGiG2eUbQHZ9TqsrWO5wRyPB0cl9baSiXIl414R4mfz/Mk q7jk+wCmkWSeLT7LyVx53k0K+IfPpeI5iDwxHS8yAidZtuli/zdsAEcGanBG4bbG8FRY gaeNPCZ1FDj8ctfNMfvhg771sKxc2oYw0W3NOcqxT36QZ05MD/FOYwDeUfRFZ+2sHf1c QNPQ== 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:message-id:date:subject:to:from:dkim-signature; bh=36Ak5eB0m5J1zM/IZMmGa4L9AvRMMkX41INBVpt2JKw=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=OGVD1CkY2ysyfu/MwoI6eixGOVlXjl29LYHog18IXkAgtqJDzEahwWEE5l8N1tVAc1 fffp4IdhvrmTKQk2TaX/GylpkCGgQqElskLhE5l+5faeHAh0PXhs6v3FB1JzN4sV4IW4 gI05l9W0FAPclS3+6rDWVWx/mzdJ7ih9EkVGtBw4jsiHlKnmNAP2p7/8d4IZOHg/8Qan 0XLV9Mb230FjDt23zQKNjJnffhe3ehIxg/vg/P7zdtbfOpJa4MR/Qh4W6Ocjvry0eRXc /q23zprDGKIb/Kz4+VQPtDsy3h02f1tc9ZMNusBMPT25wk8/bfUBLpKfkEvVyV7IKffI cpUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CKCuGyDI; 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 m17-20020ad44d51000000b0065cfea0fee7si7116433qvm.423.2023.10.24.09.36.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Oct 2023 09:36:05 -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=CKCuGyDI; 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 1qvKNL-000244-EW; Tue, 24 Oct 2023 12:35:29 -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 1qvKNE-0001xd-8N for qemu-devel@nongnu.org; Tue, 24 Oct 2023 12:35:22 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvKN9-0004Li-0e for qemu-devel@nongnu.org; Tue, 24 Oct 2023 12:35:17 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c4fe37f166so67330841fa.1 for ; Tue, 24 Oct 2023 09:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698165312; x=1698770112; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=36Ak5eB0m5J1zM/IZMmGa4L9AvRMMkX41INBVpt2JKw=; b=CKCuGyDINItWz4//nOLfZBzZp70mE2hlvjm06u3ZSWRB6OBYnMgzQjcpLPk+hi5myu GtvKP0UHVBRuNhObgpHL6f77SR8SZhSPwu2zf+DT+GkctDjPTcuCifyXA1SiOVKp2KVk tGQV1r6XundjhJPzjE+PvRTN6pTZQtUNS18FcTAPRvq1ZPjwBV+Re9Xe5VAS4Js4XPKR TGSiRAvpznimgjHoQj4uYZRMrh9eYvGWyANaVunGeJz5Cf8rz0fcrFH9JUtlRdufPhsH NEWDDSGvlzEANNjAIVmbOEsZAVm0fR99cIzpWxA83PWkoxytTlPKSWwki1vFyJ7jcPzm Pjhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698165312; x=1698770112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=36Ak5eB0m5J1zM/IZMmGa4L9AvRMMkX41INBVpt2JKw=; b=iDjlUwg6iafiSvajRDOJ1xF0KlWAbkIZsb16Eo1OijM0i8z6G5YKraxALV6oOElcVR kHsUxxsvwK/RFsdgycSyj9CUB1bboHFzsrP4EbY7No8ErI1ecLgn/FN+h5eLNK1usuG8 9H/B8tPJ/aTOonKmw5WMuiGZQi9VUcMojEN6Y8GJBcIlcPcgcD1QBillGYr5sr4AZZv/ NAROuvyWW1bm0Pm0F85sAMxO9wPjR3jEKNevOymHOigR9z1cR3GmG+IpNS4nWEdK2+d5 zCWL6qTskANrpaO4czuJ1jGES886L4HpCt5vJ5cRdXHRllSczTzfdMAq+anYQRF1uJjp +D9A== X-Gm-Message-State: AOJu0Yx2ZzG0PK795HNUOSQzeFS8Ft2HsfECx6apunLXt29of59aNNnJ l56EVyQHz7qic+QTBo2BrafpkA== X-Received: by 2002:a2e:b0c3:0:b0:2c5:1702:a434 with SMTP id g3-20020a2eb0c3000000b002c51702a434mr9211381ljl.52.1698165312038; Tue, 24 Oct 2023 09:35:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 09:35:11 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 0/6] target/arm: Move feature tests to their own header Date: Tue, 24 Oct 2023 17:35:04 +0100 Message-Id: <20231024163510.2972081-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=peter.maydell@linaro.org; helo=mail-lj1-x22c.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 The main aim of this patchset is patch 1: there are a lot of feature test functions in target/arm/cpu.h now (~1000 lines, nearly a quarter of the file), and most of the source files that pull in the target cpu.h do not care about them. So we can move them out to a new cpu-features.h, hopefully reducing compile time and avoiding having to recompile so many files when adding a new feature test function. Patches 2-5 are followup cleanup, which I don't feel so strongly about. They try to impose a little order on the AArch64 test functions by sorting them so that feature tests on the same ID register are grouped together. This is pretty much how the file started, except that as we added new features sometimes we put them at the bottom of the list rather than in their right place. But if this feels like unnecessary churn I'm happy to drop these. thanks -- PMM Peter Maydell (6): target/arm: Move feature test functions to their own header target/arm: Move ID_AA64MMFR1 and ID_AA64MMFR2 tests together target/arm: Move ID_AA64MMFR0 tests up to before MMFR1 and MMFR2 target/arm: Move ID_AA64ISAR* test functions together target/arm: Move ID_AA64PFR* tests together target/arm: Move ID_AA64DFR* feature tests together bsd-user/arm/target_arch.h | 1 + linux-user/aarch64/target_prctl.h | 2 + target/arm/cpu-features.h | 994 ++++++++++++++++++++++++++++++ target/arm/cpu.h | 971 ----------------------------- target/arm/internals.h | 1 + target/arm/tcg/translate.h | 2 +- hw/arm/armv7m.c | 1 + hw/intc/armv7m_nvic.c | 1 + linux-user/aarch64/cpu_loop.c | 1 + linux-user/aarch64/signal.c | 1 + linux-user/arm/signal.c | 1 + linux-user/elfload.c | 4 + linux-user/mmap.c | 4 + target/arm/arch_dump.c | 1 + target/arm/cpu.c | 1 + target/arm/cpu64.c | 1 + target/arm/debug_helper.c | 1 + target/arm/gdbstub.c | 1 + target/arm/helper.c | 1 + target/arm/kvm64.c | 1 + target/arm/machine.c | 1 + target/arm/ptw.c | 1 + target/arm/tcg/cpu64.c | 1 + target/arm/tcg/hflags.c | 1 + target/arm/tcg/m_helper.c | 1 + target/arm/tcg/op_helper.c | 1 + target/arm/tcg/pauth_helper.c | 1 + target/arm/tcg/tlb_helper.c | 1 + target/arm/vfp_helper.c | 1 + 29 files changed, 1028 insertions(+), 972 deletions(-) create mode 100644 target/arm/cpu-features.h Reviewed-by: Philippe Mathieu-Daudé