Commit 95bed643670402b56ddfaf2764caa6d4316158fe

Authored by Blue Swirl
1 parent a8b7063b

Fix a warning: uint_fast8_t is not 8 bits on OpenBSD/Sparc64

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing 1 changed file with 6 additions and 2 deletions
target-mips/machine.c
... ... @@ -67,10 +67,12 @@ void cpu_save(QEMUFile *f, void *opaque)
67 67 (env->tlb->mmu.r4k.tlb[i].V1 << 2) |
68 68 (env->tlb->mmu.r4k.tlb[i].D0 << 1) |
69 69 (env->tlb->mmu.r4k.tlb[i].D1 << 0));
  70 + uint8_t asid;
70 71  
71 72 qemu_put_betls(f, &env->tlb->mmu.r4k.tlb[i].VPN);
72 73 qemu_put_be32s(f, &env->tlb->mmu.r4k.tlb[i].PageMask);
73   - qemu_put_8s(f, &env->tlb->mmu.r4k.tlb[i].ASID);
  74 + asid = env->tlb->mmu.r4k.tlb[i].ASID;
  75 + qemu_put_8s(f, &asid);
74 76 qemu_put_be16s(f, &flags);
75 77 qemu_put_betls(f, &env->tlb->mmu.r4k.tlb[i].PFN[0]);
76 78 qemu_put_betls(f, &env->tlb->mmu.r4k.tlb[i].PFN[1]);
... ... @@ -210,10 +212,12 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
210 212 qemu_get_be32s(f, &env->tlb->tlb_in_use);
211 213 for(i = 0; i < MIPS_TLB_MAX; i++) {
212 214 uint16_t flags;
  215 + uint8_t asid;
213 216  
214 217 qemu_get_betls(f, &env->tlb->mmu.r4k.tlb[i].VPN);
215 218 qemu_get_be32s(f, &env->tlb->mmu.r4k.tlb[i].PageMask);
216   - qemu_get_8s(f, &env->tlb->mmu.r4k.tlb[i].ASID);
  219 + qemu_get_8s(f, &asid);
  220 + env->tlb->mmu.r4k.tlb[i].ASID = asid;
217 221 qemu_get_be16s(f, &flags);
218 222 env->tlb->mmu.r4k.tlb[i].G = (flags >> 10) & 1;
219 223 env->tlb->mmu.r4k.tlb[i].C0 = (flags >> 7) & 3;
... ...