Message ID | 20231022060031.490251-7-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp1004462wrl; Sat, 21 Oct 2023 23:06:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEsXa/+KFPJdP/Qd707WT+3eQZGBqO1a80MGqYAYkzBYZcxR9U1WetK19LpbdH7NhmeXBW X-Received: by 2002:ad4:5de4:0:b0:66d:696b:db75 with SMTP id jn4-20020ad45de4000000b0066d696bdb75mr7524382qvb.32.1697954819311; Sat, 21 Oct 2023 23:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697954819; cv=none; d=google.com; s=arc-20160816; b=DRBCgOdYM5Q2SJmrPuBHgkUT1qvAwXmM2wwp8xsx0eK06WdDcMVqNnsEdQ+WFEE7Ca Fku8C8N2rE8AR+ZflH60juSxOUIlbgGDPFN/Mzo12W7Ge+TNcEgu8NGBc8/ULs5rvrN9 buiS/di3IPjW407GqZGL56gxd417pk2CknM/dIby0oii3LtTM4lDJKhE1z0X/lflQpsc f8aNzgO7mnc11UnXw7p6IMAJ+7HndKndyYktVKMk+pI9b99RJyEYyIQ83PEjmLX3t7YN NeNn2DNRbYop9Dc300Q3Tt6oj4Ktq5+4R361kYANN3x/6QcmjLLeJanzwJoYJDM+gequ GYwQ== 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:cc:to :from:dkim-signature; bh=tQ1zFkOdaQ00+kG6T0oOcQWDrsqZkAPXDw5MzbWcocE=; fh=TYrED6TOMxGX0VC4GtjviASLbYyJe19+7/tKWjN44KQ=; b=bpcARjS1PLfNOI1DsyAx3ZKLdvJvvV+aXu2Hhn/MlPdYpZCsvaFtLrJHaJMB7Rk/j2 jnL638netDCmoOjzL4n1uAS8H/z8kEIivzL2KC5rDDzokzopNxeUgLjTbxAZ2nUDPYaL IEvsnsY4gPgmxqBWxv1pmZyEru7D9y6R1w2SrUJA078l0GEU+RNgmgQjnozDHyZsX9qN 6r3ZXuvSRi8e673sL/UYLLEz46PdUQMENWSo2wCscTDegEQMOyaTnBqmh0wOhMEEJ4mm TzpS0AM8zpt/tTh80i9O7Xf2vE56b1zA18qvsa4Fbm2sjpyrX16E3bCfwEAfPxbG37pS vTKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qW+39a1u; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id pc19-20020a056214489300b0066cf6a75891si4063183qvb.601.2023.10.21.23.06.59 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Oct 2023 23:06:59 -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=qW+39a1u; 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 <qemu-devel-bounces@nongnu.org>) id 1quRW4-0000Vz-Br; Sun, 22 Oct 2023 02:00:48 -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 <richard.henderson@linaro.org>) id 1quRVz-0000OX-1A for qemu-devel@nongnu.org; Sun, 22 Oct 2023 02:00:43 -0400 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1quRVv-0001Us-8A for qemu-devel@nongnu.org; Sun, 22 Oct 2023 02:00:42 -0400 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3b3ec45d6e9so1515876b6e.0 for <qemu-devel@nongnu.org>; Sat, 21 Oct 2023 23:00:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697954438; x=1698559238; 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=tQ1zFkOdaQ00+kG6T0oOcQWDrsqZkAPXDw5MzbWcocE=; b=qW+39a1ugRe+Xa9In7JE6U4kNvp2x1fOntzxXcGfFno1fQ4aR2qKtszcp2hIc89vn+ WoGEQTss4EcE9RPK/tYj03Q8TlerR1XBP656V5YC6IhkFVNiooPdEnvyBAXjOfd0wYJ6 Ralyj/Wq/D9NMgIXutGMfMwwOnxjiGt5XJuHxt6HqsI1biOifDHVE6SLWQrDe22Lnj9Z MEHUrukXxyhbMnd8bKTPquBJDPkn+3dAa5ykB43+6NljcQZkFU5oqsB4bvDKRSmNxnZA bBEV26UvdW92RgjC+j5raPb8CPC86GW7iOW0poNO9zkLxpbngmNoD2w5630Ov3x/rv04 XiZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697954438; x=1698559238; 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=tQ1zFkOdaQ00+kG6T0oOcQWDrsqZkAPXDw5MzbWcocE=; b=Q7k0yvu55yeEyVoiDIiW5EKoWA9ripMCBtf8yBBzYPlZKipzyxWXAOP/zxyNfWroWp v+zs29VvMk6dyeBzeXpBRZ75C2yixyDiLrBAuabuK+cf+krq1AtIPE2Wexp/5GwSE22G bloATXRVCPv5c6ZDOC0hkDt98DclAHeGu3CBjYrmaBx67xQ3j+EPF95Wx/GK8pYtA1l5 DX5xrxkxunk6HZ6MhP0iXoFvhxek/5nTcntu35hh4JJsEnc2ABBqVKQB6Dqbq7LbrUuc Wwe9vt5fgQX0wfbaeW2lObn2mQXJNORrCkZpXAH2XeMf9yJWRPIDwsHWmv3Vohq4FEZ8 J0mQ== X-Gm-Message-State: AOJu0YzpvfW7XQNowLYTY4FFNZ9lpY0of287oA7nAVpDnBMdLfTTYSwb G96EKeLTPUjr42IyEjGpf3ACvZ7wL2KkNKQddwY= X-Received: by 2002:a05:6808:ecb:b0:3b2:ee79:c0fd with SMTP id q11-20020a0568080ecb00b003b2ee79c0fdmr7554968oiv.1.1697954438056; Sat, 21 Oct 2023 23:00:38 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id je17-20020a170903265100b001c728609574sm3999887plb.6.2023.10.21.23.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 23:00:37 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v4 06/90] target/sparc: Define features via cpu-feature.h.inc Date: Sat, 21 Oct 2023 22:59:07 -0700 Message-Id: <20231022060031.490251-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231022060031.490251-1-richard.henderson@linaro.org> References: <20231022060031.490251-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::22f; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22f.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
target/sparc: Convert to decodetree
|
expand
|
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 9fc5c401d2..aaecbf0876 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -291,25 +291,19 @@ struct sparc_def_t { uint32_t maxtl; }; -#define CPU_FEATURE_FLOAT (1 << 0) -#define CPU_FEATURE_FLOAT128 (1 << 1) -#define CPU_FEATURE_SWAP (1 << 2) -#define CPU_FEATURE_MUL (1 << 3) -#define CPU_FEATURE_DIV (1 << 4) -#define CPU_FEATURE_FLUSH (1 << 5) -#define CPU_FEATURE_FSQRT (1 << 6) -#define CPU_FEATURE_FMUL (1 << 7) -#define CPU_FEATURE_VIS1 (1 << 8) -#define CPU_FEATURE_VIS2 (1 << 9) -#define CPU_FEATURE_FSMULD (1 << 10) -#define CPU_FEATURE_HYPV (1 << 11) -#define CPU_FEATURE_CMT (1 << 12) -#define CPU_FEATURE_GL (1 << 13) -#define CPU_FEATURE_TA0_SHUTDOWN (1 << 14) /* Shutdown on "ta 0x0" */ -#define CPU_FEATURE_ASR17 (1 << 15) -#define CPU_FEATURE_CACHE_CTRL (1 << 16) -#define CPU_FEATURE_POWERDOWN (1 << 17) -#define CPU_FEATURE_CASA (1 << 18) +#define FEATURE(X) CPU_FEATURE_BIT_##X, +enum { +#include "cpu-feature.h.inc" +}; + +#undef FEATURE +#define FEATURE(X) CPU_FEATURE_##X = 1u << CPU_FEATURE_BIT_##X, + +enum { +#include "cpu-feature.h.inc" +}; + +#undef FEATURE #ifndef TARGET_SPARC64 #define CPU_DEFAULT_FEATURES (CPU_FEATURE_FLOAT | CPU_FEATURE_SWAP | \ diff --git a/target/sparc/cpu-feature.h.inc b/target/sparc/cpu-feature.h.inc new file mode 100644 index 0000000000..d35fe90c92 --- /dev/null +++ b/target/sparc/cpu-feature.h.inc @@ -0,0 +1,19 @@ +FEATURE(FLOAT) +FEATURE(FLOAT128) +FEATURE(SWAP) +FEATURE(MUL) +FEATURE(DIV) +FEATURE(FLUSH) +FEATURE(FSQRT) +FEATURE(FMUL) +FEATURE(VIS1) +FEATURE(VIS2) +FEATURE(FSMULD) +FEATURE(HYPV) +FEATURE(CMT) +FEATURE(GL) +FEATURE(TA0_SHUTDOWN) /* Shutdown on "ta 0x0" */ +FEATURE(ASR17) +FEATURE(CACHE_CTRL) +FEATURE(POWERDOWN) +FEATURE(CASA)
Manage feature bits automatically. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/sparc/cpu.h | 32 +++++++++++++------------------- target/sparc/cpu-feature.h.inc | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+), 19 deletions(-) create mode 100644 target/sparc/cpu-feature.h.inc