From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MFYMA-0005nt-Sg for qemu-devel@nongnu.org; Sat, 13 Jun 2009 14:53:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MFYM5-0005jP-U4 for qemu-devel@nongnu.org; Sat, 13 Jun 2009 14:53:34 -0400 Received: from [199.232.76.173] (port=51196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MFYM5-0005iw-OW for qemu-devel@nongnu.org; Sat, 13 Jun 2009 14:53:29 -0400 Received: from mx20.gnu.org ([199.232.41.8]:24121) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MFYM4-0004O7-TW for qemu-devel@nongnu.org; Sat, 13 Jun 2009 14:53:29 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MFYM3-0004gq-14 for qemu-devel@nongnu.org; Sat, 13 Jun 2009 14:53:27 -0400 From: Paul Brook Date: Sat, 13 Jun 2009 19:53:24 +0100 References: <200906131511.n5DFBo9J031132@d03av04.boulder.ibm.com> <200906131824.10063.paul@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906131953.24749.paul@codesourcery.com> Subject: [Qemu-devel] Re: [Qemu-commits] [COMMIT 95bed64] Fix a warning: uint_fast8_t is not 8 bits onOpenBSD/Sparc64 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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