qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/4] target-tilegx: Add fpu header file


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 1/4] target-tilegx: Add fpu header file
Date: Thu, 12 Nov 2015 15:34:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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~




reply via email to

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