qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Consult] tilegx: About floating point instructions


From: Chen Gang
Subject: Re: [Qemu-devel] [Consult] tilegx: About floating point instructions
Date: Mon, 26 Oct 2015 22:14:47 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

I guess, for sign number, the highest bit will not be used, but for
unsigned number, 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, Chen Gang wrote:
> 
> /*
>  * Single format, it is 64-bit.
>  */
> typedef struct TileGXFPSFmt {
> 
>     /* According to float(uns)sisf2 and float(uns)sidf2 in gcc tilegx.md */
>     uint64_t exp : 8;             /* exp, 0x9e: 30 + TILEGX_F_EXP_FZERO */
>     uint64_t unknown0 : 1;        /* unknown */
>     uint64_t sign : 1;            /* Sign bit for the total value */
>     uint64_t unknown1 : 15;       /* unknown */
> 
>     /* Come from TILE-Gx ISA document, Table 7-2 for floating point */
>     uint64_t unordered : 1;       /* The two are unordered */
>     uint64_t lt : 1;              /* 1st is less than 2nd */
>     uint64_t le : 1;              /* 1st is less than or equal to 2nd */
>     uint64_t gt : 1;              /* 1st is greater than 2nd */
>     uint64_t ge : 1;              /* 1st is greater than or equal to 2nd */
>     uint64_t eq : 1;              /* The two operands are equal */
>     uint64_t neq : 1;             /* The two operands are not equal */
> 
>     /* According to float(uns)sisf2 and float(uns)sidf2 in gcc tilegx.md */
>     uint64_t mantissa : 31;       /* mantissa */
>     uint64_t unknown2 : 1;        /* unknown */

It is not unknown2, it means 0x80000000 when sign is 0, and meaningless
when sign is 1.


> } TileGXFPSFmt;
>

[...]
 
> 
> /*
>  * Dobule format, value, 64-bit.
>  */
> typedef struct TileGXFPDFmtV {
>     uint64_t unknown0 : 4;        /* unknown */
>     uint64_t mantissa : 55;       /* mantissa */
>     uint64_t unknown1 : 5;        /* unknown */

I guess, unknow1 is 4 bits, and the other 1 bit is for (1ULL << 55) when
sign is 0, and meaningless when sign is 1.


> } TileGXFPDFmtV;
> 
> #pragma pack(pop)
> 
> 


Thanks.
-- 
Chen Gang (陈刚)

Open, share, and attitude like air, water, and life which God blessed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]