All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Re: [Qemu-commits] [COMMIT 95bed64] Fix a warning: uint_fast8_t is not 8 bits onOpenBSD/Sparc64
       [not found]   ` <f43fc5580906131031w4e144ca9l31451a0e5970e86b@mail.gmail.com>
@ 2009-06-13 18:53     ` Paul Brook
  0 siblings, 0 replies; only message in thread
From: Paul Brook @ 2009-06-13 18:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

> >  > +        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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-13 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200906131511.n5DFBo9J031132@d03av04.boulder.ibm.com>
     [not found] ` <200906131824.10063.paul@codesourcery.com>
     [not found]   ` <f43fc5580906131031w4e144ca9l31451a0e5970e86b@mail.gmail.com>
2009-06-13 18:53     ` [Qemu-devel] Re: [Qemu-commits] [COMMIT 95bed64] Fix a warning: uint_fast8_t is not 8 bits onOpenBSD/Sparc64 Paul Brook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.