From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwsxS-0002ZQ-Un for qemu-devel@nongnu.org; Thu, 12 Nov 2015 09:34:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwsxN-0007xT-Rs for qemu-devel@nongnu.org; Thu, 12 Nov 2015 09:34:38 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:36568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwsxN-0007xH-MH for qemu-devel@nongnu.org; Thu, 12 Nov 2015 09:34:33 -0500 Received: by wmww144 with SMTP id w144so203050983wmw.1 for ; Thu, 12 Nov 2015 06:34:32 -0800 (PST) Sender: Richard Henderson References: From: Richard Henderson Message-ID: <5644A373.5060503@twiddle.net> Date: Thu, 12 Nov 2015 15:34:27 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Chen Gang , Peter Maydell , Chris Metcalf Cc: qemu-devel On 11/08/2015 06:43 AM, 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; /* exp, 0x9e: 31 + TILEGX_F_EXP_FZERO */ > + uint64_t uiknown0 : 2; /* unknown */ I would really rather you didn't use bitfields, because of exactly this sort of endianness problem. Because, really, you can't trust this layout. But I won't press this point, because it is complicated enough already. > +#endif > +} TileGXFPSFmt; > +/* Watch your spacing. > + * Double exp analyzing: (0x21b00 << 1) - 0x36(54) = 0x400 > + * > + * 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 > + * > + * 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 > + * > + * 0 0 0 0 0 1 1 0 1 1 1 => 0x37(55) > + * > + * 0 1 1 1 1 1 1 1 1 1 1 => 0x3ff What is this table supposed to mean? > +#if 0 > + uint64_t exp : 11; /* exp, 0x21b << 1: 55 + TILEGX_F_EXP_DZERO */ > + uint64_t ov : 1; /* overflow for mul, low priority */ > + uint64_t uv : 1; /* underflow for mul, high priority */ > +#endif No if 0. > +#pragma pack(pop) Huh? What are you attempting to do here? r~