Received: from eggs.gnu.org ([2001:4830:134:3::10]:41430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqiVw-0002Vb-1T for qemu-devel@nongnu.org; Mon, 26 Oct 2015 10:12:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqiVr-0007Xk-1i for qemu-devel@nongnu.org; Mon, 26 Oct 2015 10:12:43 -0400 Received: from blu004-omc1s23.hotmail.com ([65.55.116.34]:50817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqiVq-0007Xe-Tq for qemu-devel@nongnu.org; Mon, 26 Oct 2015 10:12:38 -0400 Message-ID: Date: Mon, 26 Oct 2015 22:14:47 +0800 From: Chen Gang MIME-Version: 1.0 References: <55D21A85.8080008@twiddle.net> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Consult] tilegx: About floating point instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Peter Maydell , walt@tilera.com, Chris Metcalf , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , qemu-devel I guess=2C for sign number=2C the highest bit will not be used=2C but for unsigned number=2C the highest bit will be used (then can let sign and unsigned number can use the same format contents). On 10/25/15 23:38=2C Chen Gang wrote: >=20 > /* > * Single format=2C it is 64-bit. > */ > typedef struct TileGXFPSFmt { >=20 > /* According to float(uns)sisf2 and float(uns)sidf2 in gcc tilegx.md = */ > uint64_t exp : 8=3B /* exp=2C 0x9e: 30 + TILEGX_F_EXP_FZE= RO */ > uint64_t unknown0 : 1=3B /* unknown */ > uint64_t sign : 1=3B /* Sign bit for the total value */ > uint64_t unknown1 : 15=3B /* unknown */ >=20 > /* Come from TILE-Gx ISA document=2C Table 7-2 for floating point */ > uint64_t unordered : 1=3B /* The two are unordered */ > uint64_t lt : 1=3B /* 1st is less than 2nd */ > uint64_t le : 1=3B /* 1st is less than or equal to 2nd *= / > uint64_t gt : 1=3B /* 1st is greater than 2nd */ > uint64_t ge : 1=3B /* 1st is greater than or equal to 2n= d */ > uint64_t eq : 1=3B /* The two operands are equal */ > uint64_t neq : 1=3B /* The two operands are not equal */ >=20 > /* According to float(uns)sisf2 and float(uns)sidf2 in gcc tilegx.md = */ > uint64_t mantissa : 31=3B /* mantissa */ > uint64_t unknown2 : 1=3B /* unknown */ It is not unknown2=2C it means 0x80000000 when sign is 0=2C and meaningless when sign is 1. > } TileGXFPSFmt=3B > [...] =20 >=20 > /* > * Dobule format=2C value=2C 64-bit. > */ > typedef struct TileGXFPDFmtV { > uint64_t unknown0 : 4=3B /* unknown */ > uint64_t mantissa : 55=3B /* mantissa */ > uint64_t unknown1 : 5=3B /* unknown */ I guess=2C unknow1 is 4 bits=2C and the other 1 bit is for (1ULL << 55) whe= n sign is 0=2C and meaningless when sign is 1. > } TileGXFPDFmtV=3B >=20 > #pragma pack(pop) >=20 >=20 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