target/loongarch: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20231221031652.119827-10-richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-12-21 14:15:50 +11:00
parent c4f54bd6cc
commit 2d23bb1a38
1 changed files with 9 additions and 9 deletions

View File

@ -14,7 +14,7 @@ static const VMStateDescription vmstate_fpu_reg = {
.name = "fpu_reg",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(UD(0), VReg),
VMSTATE_END_OF_LIST()
}
@ -36,7 +36,7 @@ static const VMStateDescription vmstate_fpu = {
.version_id = 1,
.minimum_version_id = 1,
.needed = fpu_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_FPU_REGS(env.fpr, LoongArchCPU, 0),
VMSTATE_UINT32(env.fcsr0, LoongArchCPU),
VMSTATE_BOOL_ARRAY(env.cf, LoongArchCPU, 8),
@ -48,7 +48,7 @@ static const VMStateDescription vmstate_lsxh_reg = {
.name = "lsxh_reg",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(UD(1), VReg),
VMSTATE_END_OF_LIST()
}
@ -70,7 +70,7 @@ static const VMStateDescription vmstate_lsx = {
.version_id = 1,
.minimum_version_id = 1,
.needed = lsx_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_LSXH_REGS(env.fpr, LoongArchCPU, 0),
VMSTATE_END_OF_LIST()
},
@ -80,7 +80,7 @@ static const VMStateDescription vmstate_lasxh_reg = {
.name = "lasxh_reg",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(UD(2), VReg),
VMSTATE_UINT64(UD(3), VReg),
VMSTATE_END_OF_LIST()
@ -103,7 +103,7 @@ static const VMStateDescription vmstate_lasx = {
.version_id = 1,
.minimum_version_id = 1,
.needed = lasx_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_LASXH_REGS(env.fpr, LoongArchCPU, 0),
VMSTATE_END_OF_LIST()
},
@ -114,7 +114,7 @@ const VMStateDescription vmstate_tlb = {
.name = "cpu/tlb",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(tlb_misc, LoongArchTLB),
VMSTATE_UINT64(tlb_entry0, LoongArchTLB),
VMSTATE_UINT64(tlb_entry1, LoongArchTLB),
@ -127,7 +127,7 @@ const VMStateDescription vmstate_loongarch_cpu = {
.name = "cpu",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINTTL_ARRAY(env.gpr, LoongArchCPU, 32),
VMSTATE_UINTTL(env.pc, LoongArchCPU),
@ -193,7 +193,7 @@ const VMStateDescription vmstate_loongarch_cpu = {
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription*[]) {
.subsections = (const VMStateDescription * const []) {
&vmstate_fpu,
&vmstate_lsx,
&vmstate_lasx,