From patchwork Mon Nov 6 06:57:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741255 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp947325wrr; Sun, 5 Nov 2023 23:05:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMIONPLeW0F4bPTGss7ZeiZiMGP1cHg023OJmkihAPfRUpXUgFKgFp4Pqhc2n7718ohZPa X-Received: by 2002:a05:620a:4109:b0:777:27a5:d1e with SMTP id j9-20020a05620a410900b0077727a50d1emr26813665qko.41.1699254349253; Sun, 05 Nov 2023 23:05:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254349; cv=none; d=google.com; s=arc-20160816; b=dnMMDEhMBaM+SCF4XRW+mSzAotefVy3WSBmZLvpxZJbo9Z3ZXGYS+TlirmMOpqxYly XYf7rauwWz2vFhMpnUMXcB1qeznvBvybaXuxDZf9St0JV4lycAy6tDn25Mfi6a2dQb2E CThijUt0ZTYnhslVN5W4WJZf2GdHMWlGQXQiRLKabNs61YPFhx0rgfozBHJEIqPb9fEA TPb73jspNg0jC6HIBp4kFB1op0fdbWNVNiwZnCEFxqXOwYf9FAaST4BXsq29f0MPrkjV p7yf1iNkICTqcS3AC/93fDuaK+XPzJZk4LSUKsbs8YC79Qk7vqXB0LnkmywowMuWQaiv sKMA== 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=jMPR6TTrX6GWl8h7/aL4Gqc3rWTo5f01ao2+3Bn7sJs=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=LC7AWwAUYPLWUR2BatQcWVUA2GFLnmhujOJ5ZVxPPgb6b43PF9SXMbvlBcC62nRJYg zGWs1Njb8dbyyyTdNEe6FrmSNUR36W3KQZYsyBxABqyHQiPv689yhtSnPbsM6b1iw1tn xCbyXeHLWuzE/hSfqvzXzJMR1PQVsgQ46omm55m4h4ZohlKoJD1KFSscN3/WnbPtXrDf EEI1NVAZde16AGMFb4BJC1A16fJFO7Bo2zNWZLQG0apqCuT63Bb4NSP55uHIirPgzfxZ MTqLO67Dl30f172oSi2OKcPBfkdC+zqpmcAbgwZ0QIV5LoruOl/kgfVyvtLwKzQWAaz5 onTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ovu/Cnre"; 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 bs16-20020a05620a471000b0077593890958si5283579qkb.128.2023.11.05.23.05.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:05:49 -0800 (PST) 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="ovu/Cnre"; 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 1qztZY-0004Xz-U3; Mon, 06 Nov 2023 01:58:56 -0500 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 1qztZR-0004Vt-29 for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:49 -0500 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztZH-0001Nt-1O for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:48 -0500 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6be1bc5aa1cso4297587b3a.3 for ; Sun, 05 Nov 2023 22:58:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699253917; x=1699858717; 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=jMPR6TTrX6GWl8h7/aL4Gqc3rWTo5f01ao2+3Bn7sJs=; b=ovu/Cnre9HgQloUfqPrlpgojo6n7QFGweY1DFWAFE2ASN+3nGkZKZtlHtwQ5VxyNlF o9BcUqL3xn6ldrSjZYmv1pzosUD+iskVaGK6iAkxXTUAiaTEOb+wKuv7iIzYxhaDjHKr qVXmxjNOwBz53IeMDLCnhRqORhn5LejtR1KWY2+Ljs4mI+PlPXoJunjhPQabQEzNKaIr bUfjMtq4o0cGYDuX3dS51hKA5i0EKTUKn1SVN4x+gLg4xplcz2a09ii7rKfBI4V+ZH8y 7OfB+jpxAXP6uARDRy8Vg/KHIha1hApVx0cKisn5EgtaORpnUNl7ldxTQu04p8h1Tbrd igpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699253917; x=1699858717; 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=jMPR6TTrX6GWl8h7/aL4Gqc3rWTo5f01ao2+3Bn7sJs=; b=Tq9zXhFcc23+fNdyxq/eyRO8Ku7IYqcswIu2cLwReTDZoLWcnPApWuyepaeaTmCAQO nOz53wch68MgquMIyqkTKB+TI3OIDLLgwE0UcZesBH/hiEwv2mamvSYPuIvxYg6t87tf gFwlmBrTLHYd6OcaspoMiWe9b+eMlG0XJsRzzfF+0ROpaEIO85Q1qmcPzGU6urPBSaxz gKG1N9jnLsD2YWib9Xt4QikmBK9brP14o4ZItuWwT0ultRGGPKv4umfddbqqKgL9M/q3 8a0EF6vcm7qtZbXni/YLKb5mDpUyKyMFq7jocQ0AyU+vQEyPPZskDCsqOJZq5sl2zJII Q6Cw== X-Gm-Message-State: AOJu0YxIi8N68vVfZ38moJy9v6+VYmoj58TSyL7S14kNlNWsQOig0Xkb EfBabBNUYja/vEiVgIfWRWjTVeWLTElSFoKFyAQ= X-Received: by 2002:a05:6a21:99a4:b0:181:9b30:89d6 with SMTP id ve36-20020a056a2199a400b001819b3089d6mr13801489pzb.27.1699253917705; Sun, 05 Nov 2023 22:58:37 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id c3-20020a170902d48300b001c62e3e1286sm5167130plg.166.2023.11.05.22.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 22:58:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: quintela@redhat.com, peterx@redhat.com, farosas@suse.de, leobras@redhat.com Subject: [PATCH 10/71] target/m68k: Constify VMState in machine.c Date: Sun, 5 Nov 2023 22:57:26 -0800 Message-Id: <20231106065827.543129-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231106065827.543129-1-richard.henderson@linaro.org> References: <20231106065827.543129-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Signed-off-by: Richard Henderson --- target/m68k/cpu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 538d9473c2..63b40de762 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -382,7 +382,7 @@ static const VMStateDescription vmstate_freg_tmp = { .name = "freg_tmp", .post_load = freg_post_load, .pre_save = freg_pre_save, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(tmp_mant, m68k_FPReg_tmp), VMSTATE_UINT16(tmp_exp, m68k_FPReg_tmp), VMSTATE_END_OF_LIST() @@ -391,7 +391,7 @@ static const VMStateDescription vmstate_freg_tmp = { static const VMStateDescription vmstate_freg = { .name = "freg", - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_WITH_TMP(FPReg, m68k_FPReg_tmp, vmstate_freg_tmp), VMSTATE_END_OF_LIST() } @@ -412,7 +412,7 @@ const VMStateDescription vmmstate_fpu = { .minimum_version_id = 1, .needed = fpu_needed, .post_load = fpu_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(env.fpcr, M68kCPU), VMSTATE_UINT32(env.fpsr, M68kCPU), VMSTATE_STRUCT_ARRAY(env.fregs, M68kCPU, 8, 0, vmstate_freg, FPReg), @@ -433,7 +433,7 @@ const VMStateDescription vmstate_cf_spregs = { .version_id = 1, .minimum_version_id = 1, .needed = cf_spregs_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64_ARRAY(env.macc, M68kCPU, 4), VMSTATE_UINT32(env.macsr, M68kCPU), VMSTATE_UINT32(env.mac_mask, M68kCPU), @@ -455,7 +455,7 @@ const VMStateDescription vmstate_68040_mmu = { .version_id = 1, .minimum_version_id = 1, .needed = cpu_68040_mmu_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(env.mmu.ar, M68kCPU), VMSTATE_UINT32(env.mmu.ssw, M68kCPU), VMSTATE_UINT16(env.mmu.tcr, M68kCPU), @@ -480,7 +480,7 @@ const VMStateDescription vmstate_68040_spregs = { .version_id = 1, .minimum_version_id = 1, .needed = cpu_68040_spregs_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(env.vbr, M68kCPU), VMSTATE_UINT32(env.cacr, M68kCPU), VMSTATE_UINT32(env.sfc, M68kCPU), @@ -493,7 +493,7 @@ static const VMStateDescription vmstate_m68k_cpu = { .name = "cpu", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32_ARRAY(env.dregs, M68kCPU, 8), VMSTATE_UINT32_ARRAY(env.aregs, M68kCPU, 8), VMSTATE_UINT32(env.pc, M68kCPU), @@ -510,7 +510,7 @@ static const VMStateDescription vmstate_m68k_cpu = { VMSTATE_INT32(env.pending_level, M68kCPU), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &vmmstate_fpu, &vmstate_cf_spregs, &vmstate_68040_mmu,