qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/20] target-i386 conversion to softfloat
@ 2011-04-18 20:59 Aurelien Jarno
  2011-04-18 20:59 ` [Qemu-devel] [PATCH 01/20] softfloat: fix floatx80 handling of NaN Aurelien Jarno
                   ` (19 more replies)
  0 siblings, 20 replies; 49+ messages in thread
From: Aurelien Jarno @ 2011-04-18 20:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aurelien Jarno

The i386 target is the last one still using softfloat-native. Compared 
to softfloat, it is faster but lacks exception handling, float80 
(except on x86 hosts) and float128, as well as correctness (use NaN 
propagation from the host, different corner cases, etc.). It's API has
also diverged from softfloat, meaning it's not easily possible to select
softfloat or softfloat-native at build-time.

This patch series adjust softfloat, softfloat-native, and target-i386,
so that it's possible to build this target with either implementation.
It's only a transient state until softfloat-native is definitely 
removed. This also mean that some code changes in target-i386 are not
the best possible, as writing code that work on both is sometimes 
difficult. This will have to be fixed after the softfloat removal.

For the trigonometic and logarithmic functions, which are not (yet)
available in softfloat (neither in softfloat-native actually), I have
chosen to convert the floatx80 value to double and use the host 
function. This limits the precision to float64, but anyway the current
code was already using the double version of these functions (instead
of the long double version for floatx80 precision).

I have tested these patches by using the GNU libc testsuite, and 
comparing the results before and after. This patch series already 
globally improve the testsuite results, though on some trigonometric 
functions some tests are now failing and some tests are now passing,
due to precision issues. In any case, these precision issues are limited
to the last two bits of the 80-bit value, so it's safe to ignore this
issue for now.

I already have another patch series in preparation, which does the 
actual softfloat removal, clean the generic and target-i386 codes, add 
exception support, and add a softfloat log2() function. However it's
the following step, and I prefer first to get this patch series 
discussed and hopefully accepted before.


Aurelien Jarno (20):
  softfloat: fix floatx80 handling of NaN
  softfloat: fix floatx80_is_infinity()
  softfloat: add floatx80 constants
  softfloat: add pi constants
  softfloat-native: add a few constant values
  softfloat: add floatx80_compare*() functions
  softfloat: fix float*_scalnb() corner cases
  softfloat-native: fix float*_scalbn() functions
  softfloat-native: add float*_is_any_nan() functions
  target-i386: fix helper_fscale() wrt softfloat
  target-i386: fix helper_flbd_ST0() wrt softfloat
  target-i386: fix helper_fxtract() wrt softfloat
  target-i386: fix helper_fdiv() wrt softfloat
  target-i386: fix helper_fsqrt() wrt softfloat
  target-i386: replace approx_rsqrt and approx_rcp by softfloat ops
  target-i386: add CPU86_LDouble <-> double conversion functions
  target-i386: fix logarithmic and trigonometric helpers wrt softfloat
  target-i386: fix helper_fprem() and helper_fprem1() wrt softfloat
  target-i386: fix constants wrt softfloat
  target-i386: switch to softfloat

 configure                  |    3 -
 fpu/softfloat-native.c     |   26 ++++++
 fpu/softfloat-native.h     |   36 +++++++-
 fpu/softfloat-specialize.h |   19 +++--
 fpu/softfloat.c            |   93 +++++++++++++++++++-
 fpu/softfloat.h            |   14 +++-
 target-i386/exec.h         |   20 +++++
 target-i386/op_helper.c    |  205 ++++++++++++++++++++++++++-----------------
 target-i386/ops_sse.h      |   36 +++++---
 9 files changed, 341 insertions(+), 111 deletions(-)

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2011-04-20  9:52 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-18 20:59 [Qemu-devel] [PATCH 00/20] target-i386 conversion to softfloat Aurelien Jarno
2011-04-18 20:59 ` [Qemu-devel] [PATCH 01/20] softfloat: fix floatx80 handling of NaN Aurelien Jarno
2011-04-19 10:53   ` Peter Maydell
2011-04-20  9:02     ` Aurelien Jarno
2011-04-18 20:59 ` [Qemu-devel] [PATCH 02/20] softfloat: fix floatx80_is_infinity() Aurelien Jarno
2011-04-19 10:55   ` Peter Maydell
2011-04-18 20:59 ` [Qemu-devel] [PATCH 03/20] softfloat: add floatx80 constants Aurelien Jarno
2011-04-19 11:07   ` Peter Maydell
2011-04-20  9:05     ` Aurelien Jarno
2011-04-18 20:59 ` [Qemu-devel] [PATCH 04/20] softfloat: add pi constants Aurelien Jarno
2011-04-19 11:10   ` Peter Maydell
2011-04-20  9:05     ` Aurelien Jarno
2011-04-18 20:59 ` [Qemu-devel] [PATCH 05/20] softfloat-native: add a few constant values Aurelien Jarno
2011-04-19 11:12   ` Peter Maydell
2011-04-18 20:59 ` [Qemu-devel] [PATCH 06/20] softfloat: add floatx80_compare*() functions Aurelien Jarno
2011-04-19 11:16   ` Peter Maydell
2011-04-18 20:59 ` [Qemu-devel] [PATCH 07/20] softfloat: fix float*_scalnb() corner cases Aurelien Jarno
2011-04-19 11:57   ` Peter Maydell
2011-04-20  9:21     ` Aurelien Jarno
2011-04-18 21:00 ` [Qemu-devel] [PATCH 08/20] softfloat-native: fix float*_scalbn() functions Aurelien Jarno
2011-04-19 12:35   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 09/20] softfloat-native: add float*_is_any_nan() functions Aurelien Jarno
2011-04-19 12:42   ` Peter Maydell
2011-04-20  9:22     ` Aurelien Jarno
2011-04-18 21:00 ` [Qemu-devel] [PATCH 10/20] target-i386: fix helper_fscale() wrt softfloat Aurelien Jarno
2011-04-19 16:57   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 11/20] target-i386: fix helper_flbd_ST0() " Aurelien Jarno
2011-04-19 17:06   ` Peter Maydell
2011-04-20  9:37     ` Aurelien Jarno
2011-04-18 21:00 ` [Qemu-devel] [PATCH 12/20] target-i386: fix helper_fxtract() " Aurelien Jarno
2011-04-19 17:46   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 13/20] target-i386: fix helper_fdiv() " Aurelien Jarno
2011-04-19 17:11   ` Peter Maydell
2011-04-20  9:37     ` Aurelien Jarno
2011-04-18 21:00 ` [Qemu-devel] [PATCH 14/20] target-i386: fix helper_fsqrt() " Aurelien Jarno
2011-04-19 17:13   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 15/20] target-i386: replace approx_rsqrt and approx_rcp by softfloat ops Aurelien Jarno
2011-04-19 17:20   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 16/20] target-i386: add CPU86_LDouble <-> double conversion functions Aurelien Jarno
2011-04-19 17:31   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 17/20] target-i386: fix logarithmic and trigonometric helpers wrt softfloat Aurelien Jarno
2011-04-19 17:37   ` Peter Maydell
2011-04-20  9:41     ` Aurelien Jarno
2011-04-18 21:00 ` [Qemu-devel] [PATCH 18/20] target-i386: fix helper_fprem() and helper_fprem1() " Aurelien Jarno
2011-04-19 17:41   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 19/20] target-i386: fix constants " Aurelien Jarno
2011-04-19 17:26   ` Peter Maydell
2011-04-18 21:00 ` [Qemu-devel] [PATCH 20/20] target-i386: switch to softfloat Aurelien Jarno
2011-04-19 17:28   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).