From patchwork Fri Dec 29 21:22:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 758827 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp4672061wrw; Fri, 29 Dec 2023 13:30:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGc2Ao0WjVdhz7Nrj5zjz7ntzpNJLt9RYotmPZqFqIXHSik4tT102r/bv/7yvoHfbiWEi+G X-Received: by 2002:a05:620a:394a:b0:77e:fba3:9d30 with SMTP id qs10-20020a05620a394a00b0077efba39d30mr16315401qkn.148.1703885428011; Fri, 29 Dec 2023 13:30:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703885427; cv=none; d=google.com; s=arc-20160816; b=Zsd4OAxuhGS+Xiem42vQZtMjjR20p0+ClxZR5ux8qGZNn83jEsUW1uVzm+bdmHl7RM VlaaULN40F6OCdZu+7fSCqcQ8TtAv6VLfGCunLJkYeBbnWz3lSKrhEwDnmg+FSl9XImI S2QRbaqcpNGCdFt8JRxXY4SwbN3LvbosjB80eyqYwpxIaFl13hzEGsEzEQwGHzY+4qXP EKWoy7GH7ZWgMrAAzwyF1rI9RGZ9X80NpR384Y5vhaIyP3eg1LqAmLfCB+uLcyc4n4ge uMm4bGuFv5ZT0vwEpd1orPBxu6k2owGm/O2ImMd81mycZH08yGsUvcOZYJYLiTx7ZD/5 mxzg== 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:to:from :dkim-signature; bh=WQ7Vx56bKbymYuLyooz5UOtSKpXbnXiz4KIzxIin+2g=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=Hr6r+aCPk25PeKWADJKAyunNZKKEkjkEFBoJvaHoz49G2cjx5EYY/dTzhb/nGTixKA yjUNBkhutxgG8g5JKdepHN4ZdDkbTXUWcpg7mS4iutjlBB+deY9i/Xfo4FKLI/0qF1kQ /MSav+lIKwxXCuLD3tE962vAg73isDUjeekMXK4FDPFI3FNdyqs8pFMNHqnwBBjDEqKr n5WDe67/CbCVj2FhcOiK04W92S4iPgFFwqUGzfTa0jm2ElPs/T8iK2NJ0q090LauH5pG x8jg3N1jf2a9z2ZZLvfJaX1CKCcftraTAEUFtsqgrUI6MsbDZnNcqbE+IDgqcxZvxSMJ 41Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ce9pOGec; 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 bl39-20020a05620a1aa700b007815baa09e2si7831270qkb.59.2023.12.29.13.30.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2023 13:30:27 -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=Ce9pOGec; 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 1rJKLD-0006xG-JQ; Fri, 29 Dec 2023 16:24:27 -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 1rJKL7-0006vI-5H for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:21 -0500 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKL5-0006Vz-HL for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:20 -0500 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-5bdb0be3591so5597163a12.2 for ; Fri, 29 Dec 2023 13:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885058; x=1704489858; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WQ7Vx56bKbymYuLyooz5UOtSKpXbnXiz4KIzxIin+2g=; b=Ce9pOGectX4uZP2xhKzF/Q1ZuN3hrS4Kc6PjyccrImdoxFPXvRtZDP9w4lEsT6h6vq vKfDwRsF6cNJ5oEjOv/Q7NNXKs1nMYViOrSwR+DcrhP3NU6w9VIcAc4PWiy5g3KvU6VS H3VLOldGDJdnDHDh5OlBd5gIB3X970svWH9KeFWoPm0lr6L/OXupc5EgtlCSAXv/gGQB 6aNt0J6JuAmHJr+HQTJdYy9JZ8yozyRWyIZiACOWP8p2WVfdLcKz1tJIbxxsWJ/q1D6v SuxfRSxasggwko/2IGkj1WkJHjzn+23kC160Dj3oxMQTGI5hqiLhHY7OzvN1C8hZOEDk hLjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885058; x=1704489858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WQ7Vx56bKbymYuLyooz5UOtSKpXbnXiz4KIzxIin+2g=; b=JAanHisFT5uq+LwVIVelbR039NY3QsRBoP+fSOt2Dm8GdYfIsr02C2lmZxJg2tbKIA xI0KTNi28xOY2HsQmtme5vI2zsmAtg7OFkoW9iz7Yri9E6caXfIIKdwg0FgcQxs1lkc6 22vO+PHU1hNOLAT8GIC7KSt4q0N/bssw/QpVxSeszqA4xI1UDp67sJc3b9lyn/2UNH4L k4eIQ6fQ5Nj2kVh61t3B0igmLu51R2VML1soce7G4WHrQXjxP6lE3iZaW3rwx6FNHIfV 4Lzbt7Xvl3c4XgC8K80VHwPv4NbZ0NUEMbFw+72Zy2GK937SVEwxfktRPcNkRk7X7F+8 VQyg== X-Gm-Message-State: AOJu0YyCROSZXRkQsP7xXVfxwfjoB8YEE38fH9tJBwiMBB0WbxT/3rF/ eDwescKa7RFadyrYAU0ruGrS3vll/FvTZmw6/X/caZAsSu7leQ== X-Received: by 2002:a05:6a20:9708:b0:189:c46d:9790 with SMTP id hr8-20020a056a20970800b00189c46d9790mr12328790pzc.30.1703885058156; Fri, 29 Dec 2023 13:24:18 -0800 (PST) Received: from stoup.lan (203-217-28-32.perm.iinet.net.au. [203.217.28.32]) by smtp.gmail.com with ESMTPSA id a34-20020a631a22000000b005c65e82a0cbsm15016237pga.17.2023.12.29.13.24.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:24:17 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 10/71] target/m68k: Constify VMState in machine.c Date: Sat, 30 Dec 2023 08:22:45 +1100 Message-Id: <20231229212346.147149-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231229212346.147149-1-richard.henderson@linaro.org> References: <20231229212346.147149-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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 Message-Id: <20231221031652.119827-11-richard.henderson@linaro.org> --- 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 11c7e0a790..43b1bde21c 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -381,7 +381,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() @@ -390,7 +390,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() } @@ -411,7 +411,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), @@ -432,7 +432,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), @@ -454,7 +454,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), @@ -479,7 +479,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), @@ -492,7 +492,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), @@ -509,7 +509,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,