Thread (6 messages) flat view 6 messages, 3 authors, 2010-07-21

Re: [PATCH] math-emu: correct test for downshifting fraction in _FP_FROM_INT()

From: David Miller <davem@davemloft.net>
Date: 2010-07-21 01:45:34
Also in: linux-alpha, linux-s390, linux-sh, lkml, sparclinux

From: Mikael Pettersson <redacted>
Date: Mon, 19 Jul 2010 23:58:42 +0200
The kernel's math-emu code contains a macro _FP_FROM_INT() which is
used to convert an integer to a raw normalized floating-point value.
It does this basically in three steps:
 ...
The fix is simple: the exponent comparison used to determine if the
fraction should be downshifted must be "<=" not "<".

I'm sending a kernel module to test this as a reply to this message.
There are also SPARC user-space test cases in the GCC bug entry.

Signed-off-by: Mikael Pettersson <redacted>
Applied and I'll make sure this gets into -stable too.

Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help