math-emu issue with fp divide

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: lkml List <linux-kernel@...>, <libc-alpha@...>
Date: Wednesday, June 4, 2008 - 4:38 pm

David,

You seem to be the last person to touch the math-emu code in the  
kernel so I figured you might have some insights.  I'm trying to move  
the powerpc math-emu code to use the include/math-emu bits.

In doing so I've been using TestFloat to see how good or bad we are  
doing.  For the most part the current math-emu code that PPC uses has  
a number of issues that the code in include/math-emu seems to solve  
(plus bugs we've had for ever that no one every realized).

Anyways, I've come across a case that we are flagging underflow and  
inexact because we think we have a denormalized result from a double  
precision divide:

000.FFFFFFFFFFFFF / 3FE.FFFFFFFFFFFFE
	soft: 001.0000000000000 .....  syst: 001.0000000000000 ...ux

What it looks like is the results out of FP_DIV_D are:

D:
sign:	  0
mantissa: 01000000 00000000
exp:	 -1023 (0)

The problem seems like we aren't normalizing the result and bumping  
the exp.  So I was wondering if you had any idea if FP_DIV_D should be  
doing that or if when we call FP_PACK_DP/_FP_PACK_CANONICAL if that  
could should be doing it.

thanks

- k
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
math-emu issue with fp divide, Kumar Gala, (Wed Jun 4, 4:38 pm)
Re: math-emu issue with fp divide, Joseph S. Myers, (Wed Jun 4, 5:42 pm)
Re: math-emu issue with fp divide, David Miller, (Wed Jun 4, 5:49 pm)
Re: math-emu issue with fp divide, Kumar Gala, (Thu Jun 5, 9:38 am)
Re: math-emu issue with fp divide, David Miller, (Fri Jun 13, 12:24 am)
Re: math-emu issue with fp divide, Kumar Gala, (Fri Jun 27, 10:15 am)
Re: math-emu issue with fp divide, David Miller, (Wed Oct 22, 1:15 am)
Re: math-emu issue with fp divide, Kumar Gala, (Fri Jun 27, 9:48 am)
Re: math-emu issue with fp divide, David Miller, (Fri Jun 27, 6:54 pm)
Re: math-emu issue with fp divide, Kumar Gala, (Fri Jun 13, 11:49 am)
Re: math-emu issue with fp divide, David Miller, (Wed Jun 4, 5:37 pm)