From patchwork Tue Oct 17 06:11:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 734274 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp323465wro; Mon, 16 Oct 2023 23:18:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEiszST0WOZQ7yrk/D08tCBGhL2NIlKyaYGDkfdqmh7EVNxxuCSQNuadbMkEJYxlwqBB2o X-Received: by 2002:a05:622a:301:b0:419:4f1e:7ea9 with SMTP id q1-20020a05622a030100b004194f1e7ea9mr1732321qtw.3.1697523490930; Mon, 16 Oct 2023 23:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697523490; cv=none; d=google.com; s=arc-20160816; b=Ng9jxn2GXAcuacJtW4jvfBJpFKsqudZYg9TnD49otHhmhCZb4ysjJa922LRx+wNkj9 RsXLSGSXx7GrGOI5/we/rkrMeADVM2d5pbY9cyVOigfDxGwaPxNhSxKQOmr5VAvUxDb3 ZKJ4NvojvHXpM2mSvIPdw73d1QKZXYC09ngRzvn+2HWnZF0RxXRC5AhLiV7pLSnIYYAv IT68mo6axon2VZd41dIDTOpL2S8cINvZoH7bPNzgABoMpsq6mvO4OO0hF9p08V6ruUYu P3mHGUDvCjqW9t6CjiY6G2Cki9syGtuGbUbQjEE1KCBGv/jn91tmR5jOs+LntxRips7l M+dg== 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=FvrGoqJdvr39eQeN1dOxQxBscurAN5bvfPPhtZrDRvViKX6T8WiYT+RIEDaZLgGjur TyxbiNWATBHcZ7a3R/TgQ+6QAeyxbcPPsmJzKjeAUaxJOJm9TZL4izG7wdOgtr4F3xEr 08kS5zwKypvJZCxKaVZgssqGe5Dz0ba5hXQLcLFI1qi+31+v+PekXbFBuYqDjALezqha IkQlQhOFuAfx3asjNU6kLF7PRQNpU0qwRqQPPSGgsLUWGcA7X6+1yKvZWd+CvJp/wK89 uSw9JhA5zE4wVUlJBxRldnqfqo+fkToLsoR1qDIQ+xhC8gmyCyX3kSAh6K72FyiHzVJn iyfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h3F/g/Ij"; 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 p15-20020a05622a13cf00b004198fbc2a07si655283qtk.344.2023.10.16.23.18.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2023 23:18:10 -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="h3F/g/Ij"; 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 1qsdK4-0008Q8-Qc; Tue, 17 Oct 2023 02:12:56 -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 1qsdK2-0008Ow-QL for qemu-devel@nongnu.org; Tue, 17 Oct 2023 02:12:54 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsdK1-0003pw-2C for qemu-devel@nongnu.org; Tue, 17 Oct 2023 02:12:54 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1c9d407bb15so44465445ad.0 for ; Mon, 16 Oct 2023 23:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697523172; x=1698127972; 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=h3F/g/IjaouhrCGzes/366bxwA25se4/Ae7ymFMAtV7TtcRXYsAb9NadZvi0cQgqNL 8hM+mY47rWX/T9V9BWpIcg2HjrpGriQCHnJYyudswiAHhqc8z/tLIjcDMZFsAzsuga0Z OALI/w+XNUNoHgy/qD7tWyrk7DPnubf2ygBGAGEWZn/cwV2MAwsZ20cJZJhvtV+9Rn+3 Zi+So98j2+4KpHMjkOpUZk4zhV0VhNiLRGkYC4c1OjWIGdI+29dXOS/0zCfOKdkooq3f mXVY75cXDfpcS6BOckidy+TtQrVS6jIuRDuFzI9P0Ja6B7KrZ+lV9W8aZ8LTDp8g+rVT zq1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697523172; x=1698127972; 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=oIdwk57fnxBv8o5OeRAL3M73V2kbYIB7YcxTgm12UtqCfkbztlOA2jJpLN+QrknUSc Jv+BdBJMJuTHzVwMQbkndu2uI6azxBebPTl1iDVUTx5vNuLMT/3Tqe5uYVYeTFiRaL/r flfBlZ0EfEDWO9skqX9UHFRGlaRY4qvzo+0Oxp5QIm2eC/V/T80tXU1s7kGRQ8ZRMHtL pl14yGYKKbu+K8/bAALZ5BHjX9iHvxKrKIYuouxFVTvdudfP5pHkGHodanwqumiZ06TR 3OGaD7gvQpQi2kum3nYNQn9bhPprPYpbEVFjxFDITxda4BZHk445iBHq4gn9BirWzK+o RgZQ== X-Gm-Message-State: AOJu0YyBX6Pc6p3ESnbXZfBRJXegWbiUTEK6Ws75XUZTi52LFoU/DS94 T2KketspxooPU93syqeEV2gLEzzsKUTNfKwHOmE= X-Received: by 2002:a17:902:f0d2:b0:1c9:e508:ad3b with SMTP id v18-20020a170902f0d200b001c9e508ad3bmr1280260pla.14.1697523171738; Mon, 16 Oct 2023 23:12:51 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id jf4-20020a170903268400b001ca21e05c69sm629150plb.109.2023.10.16.23.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 23:12:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 07/90] target/sparc: Use CPU_FEATURE_BIT_* for cpu properties Date: Mon, 16 Oct 2023 23:11:21 -0700 Message-Id: <20231017061244.681584-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231017061244.681584-1-richard.henderson@linaro.org> References: <20231017061244.681584-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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),