From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JxnU5-00075q-BP for qemu-devel@nongnu.org; Sun, 18 May 2008 14:19:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JxnU3-00075e-Mz for qemu-devel@nongnu.org; Sun, 18 May 2008 14:19:48 -0400 Received: from [199.232.76.173] (port=39525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JxnU3-00075b-Hm for qemu-devel@nongnu.org; Sun, 18 May 2008 14:19:47 -0400 Received: from relay4-v.mail.gandi.net ([217.70.178.78]:53114) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JxnU3-0000Lv-E4 for qemu-devel@nongnu.org; Sun, 18 May 2008 14:19:47 -0400 Message-ID: <48307302.9020805@bellard.org> Date: Sun, 18 May 2008 20:18:42 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [4485] Fix TCG alignment problems on Sparc64 host References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: blauwirbel@gmail.com Cc: qemu-devel@nongnu.org I don't understand why TCGLabel needs further alignment. For TCGPool, the correct fix is either to use the gcc alignment attributes or to change the type of data to long. Regards, Fabrice. Blue Swirl wrote: > Revision: 4485 > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4485 > Author: blueswir1 > Date: 2008-05-18 07:49:05 +0000 (Sun, 18 May 2008) > > Log Message: > ----------- > Fix TCG alignment problems on Sparc64 host > > Modified Paths: > -------------- > trunk/tcg/tcg.h > > Modified: trunk/tcg/tcg.h > =================================================================== > --- trunk/tcg/tcg.h 2008-05-18 06:40:16 UTC (rev 4484) > +++ trunk/tcg/tcg.h 2008-05-18 07:49:05 UTC (rev 4485) > @@ -71,7 +71,7 @@ > } TCGRelocation; > > typedef struct TCGLabel { > - int has_value; > + long has_value; // long instead of int to enforce alignment > union { > tcg_target_ulong value; > TCGRelocation *first_reloc; > @@ -80,7 +80,7 @@ > > typedef struct TCGPool { > struct TCGPool *next; > - int size; > + long size; // long instead of int to enforce alignment > uint8_t data[0]; > } TCGPool; > > > > > >