aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/machine.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc/machine.c')
-rw-r--r--target-sparc/machine.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/target-sparc/machine.c b/target-sparc/machine.c
index 5d4d2eb660..f5a00179bb 100644
--- a/target-sparc/machine.c
+++ b/target-sparc/machine.c
@@ -72,7 +72,7 @@ void cpu_save(QEMUFile *f, void *opaque)
qemu_put_be64s(f, &env->dtlb_tte[i]);
}
qemu_put_be32s(f, &env->mmu_version);
- for (i = 0; i < MAXTL; i++) {
+ for (i = 0; i < MAXTL_MAX; i++) {
qemu_put_be64s(f, &env->ts[i].tpc);
qemu_put_be64s(f, &env->ts[i].tnpc);
qemu_put_be64s(f, &env->ts[i].tstate);
@@ -103,7 +103,7 @@ void cpu_save(QEMUFile *f, void *opaque)
qemu_put_be64s(f, &env->gsr);
qemu_put_be32s(f, &env->gl);
qemu_put_be64s(f, &env->hpstate);
- for (i = 0; i < MAXTL; i++)
+ for (i = 0; i < MAXTL_MAX; i++)
qemu_put_be64s(f, &env->htstate[i]);
qemu_put_be64s(f, &env->hintp);
qemu_put_be64s(f, &env->htba);
@@ -165,7 +165,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_be64s(f, &env->dtlb_tte[i]);
}
qemu_get_be32s(f, &env->mmu_version);
- for (i = 0; i < MAXTL; i++) {
+ for (i = 0; i < MAXTL_MAX; i++) {
qemu_get_be64s(f, &env->ts[i].tpc);
qemu_get_be64s(f, &env->ts[i].tnpc);
qemu_get_be64s(f, &env->ts[i].tstate);
@@ -175,7 +175,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_be32s(f, &env->asi);
qemu_get_be32s(f, &env->pstate);
qemu_get_be32s(f, &env->tl);
- env->tsptr = &env->ts[env->tl];
+ env->tsptr = &env->ts[env->tl & MAXTL_MASK];
qemu_get_be32s(f, &env->cansave);
qemu_get_be32s(f, &env->canrestore);
qemu_get_be32s(f, &env->otherwin);
@@ -197,7 +197,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_be64s(f, &env->gsr);
qemu_get_be32s(f, &env->gl);
qemu_get_be64s(f, &env->hpstate);
- for (i = 0; i < MAXTL; i++)
+ for (i = 0; i < MAXTL_MAX; i++)
qemu_get_be64s(f, &env->htstate[i]);
qemu_get_be64s(f, &env->hintp);
qemu_get_be64s(f, &env->htba);