From patchwork Thu Dec 21 03:15:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 756940 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp687305wrw; Wed, 20 Dec 2023 19:24:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOekPhp178SP1ttqmBwk9HMpSzwA92BeOlZa8c9w4UeQzG3buKYoLrBhg5vG1KZ3RKg+LM X-Received: by 2002:ac8:5bc1:0:b0:425:4043:18b6 with SMTP id b1-20020ac85bc1000000b00425404318b6mr30890740qtb.105.1703129041278; Wed, 20 Dec 2023 19:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703129041; cv=none; d=google.com; s=arc-20160816; b=WaAb0aR6PgxUk8V9HD787B5QW+lEHthhr1RhWxlLWRlahThKnMsYp3m94MgIpDJyky hOOgBetzBZ5P6bbh5NPPtMZHBjFAYsULB8F+gx2Dq/gfMdcKBiPGFv4vK2AddGWbRF+P Ym/tHSuafzZ5ksd5BE1emO1ip+9mLBqql7n6O7nb26fBW7HxaIILaIpcUiOAMb5ssrll DaEguVbvqFxnWpd4phAZAMfHXhBAlaA0Lbe6pq3W9fZnnNjNh4CtEbAMiGWjeZgjn+po QpA5ggtBIC3qck3xqYX0TghT/qwZo5XYeD+kg2hYHpgmbP4LQBU4tDM6ttZ9Hc1jk/oE q9hA== 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=f07Tp+0mYV+bULmieTe4MG0b2eAMCRT0j+8uQBbiafk=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=LnzSgMBd0XrBWK1S8T079o6epiWsCTjEfIH63mydiScsXTcQMgdJdc6C/jKimrL/UR pA8g8WmMwMT5inFSHDORrEV4U7flA6CZ2QUK/J/74P1IR70S/svI10PRQ4FssTQS6bqB QyfrFXwO1oNqQvcrvLh+W+N2Y6yBmefda6mDvBs+QSjalK92TuRo0CZ5U5fZ5GVlSikc 0dITsdBJruQjXVLlDEHRVFhyG1v1xZBsRU9V2Q1VchzNuD0d2uIEF/Kc17Ji9PxeqOn0 1cwTRLf8HrqFMIkQTrQ5bU74CcGY4ffK2DSKj2HwdAcE+Z8Cq6IfeZ2RYthVj2r+UyqH 9tag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="j32/K7Fq"; 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 y15-20020a05622a004f00b004237122a705si1191278qtw.646.2023.12.20.19.24.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2023 19:24:01 -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="j32/K7Fq"; 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 1rG9ZL-0007Tb-2x; Wed, 20 Dec 2023 22:17:55 -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 1rG9ZJ-0007Su-6f for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:17:53 -0500 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9ZG-0003lN-Ih for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:17:51 -0500 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-781161d18ecso19280485a.3 for ; Wed, 20 Dec 2023 19:17:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128669; x=1703733469; 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=f07Tp+0mYV+bULmieTe4MG0b2eAMCRT0j+8uQBbiafk=; b=j32/K7FqinfT3CBnSXe3fknv1JY8QOZx/VzMveqmZR/yYO0i4PUzFx1H0gQYfSJwoA xSngrPUmDq42BWvQ4K/1LB63/9RQMIitRGiSZKIInue5MIjN7Ficmab14i/CUXpE2SHl t1LvvH/AVWGGnG6SPfGGbnJcL152hkrapUJYN2ist52+avsWv4aQsdPIk8AJD+/wST1H LmerI7O59ud9XY6uIWh73TT4IXIvdQPIhthgdtpEEyrwgv4jM5LtVYJS9qMzNzZg/gfD 2lfVmDKiXIytbNll8+PCk6ZN/3hpXjhyp84EZai0NrMeUXaTF4a8sh0GpTfKqu4BdiZ3 55YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128669; x=1703733469; 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=f07Tp+0mYV+bULmieTe4MG0b2eAMCRT0j+8uQBbiafk=; b=ciOh2zcuYkEXa2MbWpW4unBXcR62DN13wDaWnyzvbdiJB8R9rLhLJ6h/fVxXtVleCP L4NOkqS4Mv3sVAtwmpeyP85CV7Q+KiOulgl2VDxW46TISGSBB4eL1f2bQbqncQX5vD+6 kqM3RM8YAqtNFcyWSEeVbwg/CSKrQBpaoGE/rqDx/wP4FB0P5uT3pKxCq5WjUbCSZDbs KrW+jB4EgBxWS/dgkaENa1Hrw+fj7yDiHtolNcZvD0XGKDy3ZA5j23mSugJ5Lrpx9e+M D/VQesYRjGC8FqSyIQG67UX3NoNayvICHXm/EubyUUTkhViBbEkfO7+MWqi4Jn5Tr3V8 8Fww== X-Gm-Message-State: AOJu0YwrEBJmzQ4LpuGvZnlyetcIMnVJ7XWbRkPqAhKaDSRhpv8UaGxh fm3eZjmybUOd7bRfvc4zFo2aScyenics8+i/AEmLBGEV X-Received: by 2002:a05:620a:100a:b0:77f:2f19:27a5 with SMTP id z10-20020a05620a100a00b0077f2f1927a5mr24127668qkj.84.1703128669666; Wed, 20 Dec 2023 19:17:49 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.17.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:17:49 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 10/71] target/m68k: Constify VMState in machine.c Date: Thu, 21 Dec 2023 14:15:51 +1100 Message-Id: <20231221031652.119827-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221031652.119827-1-richard.henderson@linaro.org> References: <20231221031652.119827-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x731.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 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,