From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwugr-0007xB-Oc for qemu-devel@nongnu.org; Thu, 12 Nov 2015 11:25:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zwugn-00057c-N8 for qemu-devel@nongnu.org; Thu, 12 Nov 2015 11:25:37 -0500 Received: from blu004-omc2s13.hotmail.com ([65.55.111.88]:54055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwugn-00057V-DB for qemu-devel@nongnu.org; Thu, 12 Nov 2015 11:25:33 -0500 Message-ID: Date: Fri, 13 Nov 2015 00:28:05 +0800 From: Chen Gang MIME-Version: 1.0 References: <5644A373.5060503@twiddle.net> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/4] target-tilegx: Add fpu header file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Chris Metcalf , qemu-devel , Richard Henderson On 11/13/15 00:10=2C Peter Maydell wrote: > On 12 November 2015 at 16:04=2C Chen Gang w= rote: >> On 11/12/15 22:34=2C Richard Henderson wrote: >>> On 11/08/2015 06:43 AM=2C Chen Gang wrote: >>> >>>> +#if !defined(HOST_WORDS_BIGENDIAN) >>>> + /* According to float(uns)sisf2 and float(uns)sidf2 in gcc tilegx= .md */ >>>> + uint64_t exp : 8=3B /* exp=2C 0x9e: 31 + TILEGX_F_EXP= _FZERO */ >>>> + uint64_t uiknown0 : 2=3B /* unknown */ >>> >>> I would really rather you didn't use bitfields=2C because of exactly th= is sort of endianness problem. Because=2C really=2C you can't trust this l= ayout. But I won't press this point=2C because it is complicated enough al= ready. >>> >> >> Because of endianess issues=2C for me=2C I don't like bit fields either.= But >> I can not find any other simpler ways than current. >=20 >> OK=2C I shall remove them. >> >>>> +#pragma pack(pop) >>> >>> Huh? What are you attempting to do here? >>> >> >> It is for matching "#pragma pack(push=2C 1)" which is above all related >> struct/unions in this header file. >=20 > Please don't use 'pragma pack' or bitfields. If you need to pack > and unpack things from a target-CPU defined field use bit operations > and/or extract32/deposit32/extract64/deposit64. >=20 OK=2C thanks=2C although it means I have to rewrite most of code=2C and tes= t them again. I shall try to send patch v2 within the next week. Thanks. --=20 Chen Gang (=E9=99=88=E5=88=9A) Open=2C share=2C and attitude like air=2C water=2C and life which God bless= ed