From patchwork Sun Oct 22 05:59:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 736927 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp1003084wrl; Sat, 21 Oct 2023 23:01:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGatEki43Q/INSckytqwk68nhui4Sy9oIGdZJQ6dqtwCQusn2LpnehgrNarW/nzTEHZO6gh X-Received: by 2002:a05:620a:40cb:b0:777:73d3:1f55 with SMTP id g11-20020a05620a40cb00b0077773d31f55mr8650586qko.6.1697954516096; Sat, 21 Oct 2023 23:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697954516; cv=none; d=google.com; s=arc-20160816; b=ZbHotNvU2nJIXkW+Yzm1L/H+HiZ/AEP7oDgHDMd4CQMwvY+N7G8IIG336LeYq8GwuW gVpIFnZeIYfRAVeDHHRQ5S0EfTOzgKOnhS3kCV4jxZzQFEopBQFIu/n/U3KtXx9Lob/L vQo1M5nLyS5nNtkt6yDgShGu9HJJmO29MBaFY7qkvKNWJb3jVOQvbdVc4TFHJ0eP/97n uT3tmRkjLoLWqOxe6rma7Eqeu/CfOi7wA7AWXUa4QiphJ8ho38HyYTvQ5+bneCl2gtP4 oR8twmbSkvUjZR52bu1lRkl6dBr1Tp57V8xsWVK4FloMTee2HYRUCjhZGvY4BT6l9xLM 4fPg== 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=ZH3dMD/AA/crmsUs16Itr1WvEaqL+uLcI9qPlF9Ii5g=; fh=TYrED6TOMxGX0VC4GtjviASLbYyJe19+7/tKWjN44KQ=; b=ruXNrzgxTjrgLzRDh8h9Ur/m3AjHHdo76/l41m6rVYtum8mqeWmD6kzFQrMORgh+YU 7MXyJLC82PxJa+h5JitS/5CCRa6hwIyQupi9hMDKie8D1NsZTw6759HRFAbYOHA3QtQT BgFdsXXJ0/boLJBoeNo2UUk9iVqSWv2Fi1cdjNBRwssH6MF3lkitJOkIVYKfKG36aa/L 1qB6QZE/PcyBdTApa0resF9YH/etkR3alLxAlcXIDRsvQMcabOUdQOe3tS4cRDdI8DR8 odSkaswB3XQM0v+BG4oRfBTCc/Ckn1LFuAJajf6b9cKgXKNa4ayucRA0n63p7AHTeH7U wPEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=STO0GjON; 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 n2-20020a05620a294200b00779d04f3836si568073qkp.599.2023.10.21.23.01.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Oct 2023 23:01:56 -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=STO0GjON; 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 1quRW2-0000VF-F3; Sun, 22 Oct 2023 02:00:46 -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 1quRW0-0000Sd-95 for qemu-devel@nongnu.org; Sun, 22 Oct 2023 02:00:44 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quRVw-0001Vp-Kp for qemu-devel@nongnu.org; Sun, 22 Oct 2023 02:00:43 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1c9e06f058bso23986855ad.0 for ; Sat, 21 Oct 2023 23:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697954439; x=1698559239; 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=ZH3dMD/AA/crmsUs16Itr1WvEaqL+uLcI9qPlF9Ii5g=; b=STO0GjONFpggK/GNEXvf8X6Pk/T1KNYoRgP8/IsfTHiZDQnT3qSrniSF94bhIRiMR8 K5+TK3AdSf1X31VoHl2iCsZRvRLxcEpmXxF4UIt+xxPFZVInSBD9l1NZyt10zbQ6hVd0 V5571Xr3E9dQe3SIUfz848sHmDBHo2QSSKTQlrj1GgzA7WQYvTJWmpjg7kcywbxOWNxI f2N3q31a6aJFyyJoiAwY65IQewVAnv+cwJztM0iIqqWZp/iuRw9zrUY0WkTFyTQ7owwE jgXmE7QpbKHgUVOMHiecnGrpwZpVjwyD2df7L/ba5Fx4mvzL0dY4z0g51/2oAUbQrnlB ACTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697954439; x=1698559239; 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=ZH3dMD/AA/crmsUs16Itr1WvEaqL+uLcI9qPlF9Ii5g=; b=U5sb5/MZW8/Um262a+VFFbwIaAOJCZ4ER9qvwC1fIyjEBj7Ikp7m9JeF53rrNJCTbR TIzLTqoAftVNRwMf65sgC5lmoPSgJ6i++HDBPWp9gIk9g2Q0FUzVKe7x5ozr3L0psbWW DtVU1TF67zA//OtiadRcoXdR6jr/iMvjOGc3TjvsMlATAbw7FVp4IIOnWy7lLN3css4D e0g+H0vm3/BCqvXvO7LVXlXawedE8cVmJ7Gew9CLbvyfU5GKWtnwlg6IHH2SAClkjVFL qSrJM6hHSke3rgRv3z1Xp/m8B5Y81WBGzePWrV4AYUG2JhA2tvVvJkxC5ML09mC7KDcQ 3yWw== X-Gm-Message-State: AOJu0Yy3gJOsia4gPUyxjOc7dv+SmdT18hczuVDv/8bMsOsGIPtuN/mr kX5gAFomt9ynnQO/THSympZnvvXdM1It5QYDn8I= X-Received: by 2002:a17:902:ec87:b0:1bd:e258:a256 with SMTP id x7-20020a170902ec8700b001bde258a256mr8474213plg.32.1697954439002; Sat, 21 Oct 2023 23:00:39 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id je17-20020a170903265100b001c728609574sm3999887plb.6.2023.10.21.23.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 23:00:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v4 07/90] target/sparc: Use CPU_FEATURE_BIT_* for cpu properties Date: Sat, 21 Oct 2023 22:59:08 -0700 Message-Id: <20231022060031.490251-8-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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 Use symbols not integer constants for the bit positions. Signed-off-by: Richard Henderson --- target/sparc/cpu.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 8ba96ae225..e4d1c552e5 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -836,20 +836,34 @@ static PropertyInfo qdev_prop_nwindows = { }; static Property sparc_cpu_properties[] = { - DEFINE_PROP_BIT("float", SPARCCPU, env.def.features, 0, false), - DEFINE_PROP_BIT("float128", SPARCCPU, env.def.features, 1, false), - DEFINE_PROP_BIT("swap", SPARCCPU, env.def.features, 2, false), - DEFINE_PROP_BIT("mul", SPARCCPU, env.def.features, 3, false), - DEFINE_PROP_BIT("div", SPARCCPU, env.def.features, 4, false), - DEFINE_PROP_BIT("flush", SPARCCPU, env.def.features, 5, false), - DEFINE_PROP_BIT("fsqrt", SPARCCPU, env.def.features, 6, false), - DEFINE_PROP_BIT("fmul", SPARCCPU, env.def.features, 7, false), - DEFINE_PROP_BIT("vis1", SPARCCPU, env.def.features, 8, false), - DEFINE_PROP_BIT("vis2", SPARCCPU, env.def.features, 9, false), - DEFINE_PROP_BIT("fsmuld", SPARCCPU, env.def.features, 10, false), - DEFINE_PROP_BIT("hypv", SPARCCPU, env.def.features, 11, false), - DEFINE_PROP_BIT("cmt", SPARCCPU, env.def.features, 12, false), - DEFINE_PROP_BIT("gl", SPARCCPU, env.def.features, 13, false), + DEFINE_PROP_BIT("float", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_FLOAT, false), + DEFINE_PROP_BIT("float128", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_FLOAT128, false), + DEFINE_PROP_BIT("swap", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_SWAP, false), + DEFINE_PROP_BIT("mul", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_MUL, false), + DEFINE_PROP_BIT("div", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_DIV, false), + DEFINE_PROP_BIT("flush", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_FLUSH, false), + DEFINE_PROP_BIT("fsqrt", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_FSQRT, false), + DEFINE_PROP_BIT("fmul", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_FMUL, false), + DEFINE_PROP_BIT("vis1", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_VIS1, false), + DEFINE_PROP_BIT("vis2", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_VIS2, false), + DEFINE_PROP_BIT("fsmuld", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_FSMULD, false), + DEFINE_PROP_BIT("hypv", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_HYPV, false), + DEFINE_PROP_BIT("cmt", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_CMT, false), + DEFINE_PROP_BIT("gl", SPARCCPU, env.def.features, + CPU_FEATURE_BIT_GL, false), DEFINE_PROP_UNSIGNED("iu-version", SPARCCPU, env.def.iu_version, 0, qdev_prop_uint64, target_ulong), DEFINE_PROP_UINT32("fpu-version", SPARCCPU, env.def.fpu_version, 0),