Re: [Qemu-devel] [PATCH] powerpc: fix denorm float->double conversion

2019-04-08 Thread Richard Henderson
On 3/23/19 12:24 PM, Sergei Trofimovich wrote: > Here denormalization conversion has a few bugs: > - significand (abs_arg) has 32-bit unsigned wraparound in > ret |= abs_arg << (shift + 29); > - significand does not drop explicit leading '1' in denorm > 'float' when converting to normalized '

Re: [Qemu-devel] [PATCH] powerpc: fix denorm float->double conversion

2019-04-07 Thread David Gibson
On Sat, Mar 23, 2019 at 10:24:11PM +, Sergei Trofimovich wrote: > The bug is initially discovered in GHC test suite. Here is minimal reproducer: > > ```c > > int main() { > volatile float f; > volatile double d; > > *(volatile uint32_t*)&f = 0xc0de; > d = f; > printf("f

[Qemu-devel] [PATCH] powerpc: fix denorm float->double conversion

2019-03-23 Thread Sergei Trofimovich
The bug is initially discovered in GHC test suite. Here is minimal reproducer: ```c int main() { volatile float f; volatile double d; *(volatile uint32_t*)&f = 0xc0de; d = f; printf("f = %#x\n", *(volatile uint32_t*)&f); printf("d = %#llx (expect 0x37981bc0)\n",