diff mbox

[1/4] math-emu: Fix single float point division bug

Message ID 1225165821-15998-2-git-send-email-yu.liu@freescale.com (mailing list archive)
State Accepted, archived
Commit cf03033658739accd24f18f864107151a2e9a796
Delegated to: Kumar Gala
Headers show

Commit Message

Liu Yu-B13201 Oct. 28, 2008, 3:50 a.m. UTC
PowerPC float point division emulation is derived from gcc.
I reported this problem on gcc maillist and got this reply:
http://gcc.gnu.org/ml/gcc/2008-03/msg00543.html

Since UDIV_NEEDS_NORMALIZATION is not used by kernel, we should use
_FP_DIV_MEAT_1_udiv_norm to make sure the single float point
is normalized before udiv_qrnnd.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
---
 arch/powerpc/include/asm/sfp-machine.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kumar Gala Nov. 6, 2008, 4:03 a.m. UTC | #1
On Oct 27, 2008, at 10:50 PM, Liu Yu wrote:

> PowerPC float point division emulation is derived from gcc.
> I reported this problem on gcc maillist and got this reply:
> http://gcc.gnu.org/ml/gcc/2008-03/msg00543.html
>
> Since UDIV_NEEDS_NORMALIZATION is not used by kernel, we should use
> _FP_DIV_MEAT_1_udiv_norm to make sure the single float point
> is normalized before udiv_qrnnd.
>
> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> ---
> arch/powerpc/include/asm/sfp-machine.h |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

applied to next.

- k
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/sfp-machine.h b/arch/powerpc/include/asm/sfp-machine.h
index ced34f1..da12ea7 100644
--- a/arch/powerpc/include/asm/sfp-machine.h
+++ b/arch/powerpc/include/asm/sfp-machine.h
@@ -82,7 +82,7 @@ 
 #define _FP_MUL_MEAT_S(R,X,Y)   _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
 #define _FP_MUL_MEAT_D(R,X,Y)   _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
 
-#define _FP_DIV_MEAT_S(R,X,Y)	_FP_DIV_MEAT_1_udiv(S,R,X,Y)
+#define _FP_DIV_MEAT_S(R,X,Y)	_FP_DIV_MEAT_1_udiv_norm(S,R,X,Y)
 #define _FP_DIV_MEAT_D(R,X,Y)	_FP_DIV_MEAT_2_udiv(D,R,X,Y)
 
 /* These macros define what NaN looks like. They're supposed to expand to