Skip to contentSkip to conversation

Fix a warning: uint_fast8_t is not 8 bits onOpenBSD/Sparc64

Qemu-devel Paul Brook 1 participant 1 message Jun 13, 2009 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Paul Brook

author
#3 lore raw
Quoted 8 lines
Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+        asid = env->tlb->mmu.r4k.tlb[i].ASID;
+        qemu_put_8s(f, &asid);

Wouldn't it be simpler to just use qemu_put_byte?

uint_fast8_t equals uint32_t on OpenBSD/Sparc64. It's also big endian, so qemu_put_byte(f, &env->tlb->mmu.r4k.tlb[i].ASID) writes the MSB (==0).

Not even close. qemu_put_byte works by value, not by reference. i.e. you want
qemu_put_byte(f, env->tlb->mmu.r4k.tlb[i].ASID);

Paul