[RFC] Quad-float support, round 4

FX fxcoudert@gmail.com
Sun Sep 12 15:07:00 GMT 2010


Dear all,

I'm somewhat proud to present my first iteration of quad-float support for gfortran that has "zero known bugs", even though I'm sure your excellent testing will soon increment this number :)  Many thanks to everyone who has tested so far, and I am sorry that there were so many bugs in my initial work.


Problems fixed since last version:
  * Dominique and Steve's issues with huge_val have been fixed on trunk
  * the gfortran.dg/promotion.f90 testcase was fixed on trunk
  * Dominique's bug wrt undefined __gfortran_pow_r16_i4 is now taken care of in the patch
  * Array intrinsics now fully work (though this may induce a slight performance degradation for real(kind=10) on systems that are compiled with libquad support. I am not aware of any solution that would avoid this issue, apart from array descriptor rework. I will be working on a benchmark to measure how bad this is.


How to build:
  0. If you have libquad from the last patch ("third iteration"), you needn't rebuild it (skip steps 1 and 2)
  1. Get libquad from here: http://quatramaran.ens.fr/~coudert/tmp/libquad.tar.bz2
  2. Compile it (with a recent GCC, maybe a previous build of trunk!): ./configure --prefix=/foo && make && make install
  3. Get the current GCC trunk, patch it, configure it with --with-quad=/foo and build


How to link code that uses quad-float:

  ** if you use shared libraries: compile your code with "gfortran [all source files] -L/path/to/libquad -lquad"
      if you're lucky, you may not even need these extra "-L... -lquad" options, because libgfortran is linked to it (lucky: users of Linux, FreeBSD; unlucky: users of Mac OS)

  ** if you use static libraries (for example, GCC was configured with "--disable-shared" or you're compiling with "-static"):
      compile your code with "gfortran -L/path/to/libquad -lgfortran -lquad -lm"

This is not very friendly, but I won't spend time making the driver more user-friendly until I know what is the integration strategy for libquad.



Once again, testing is welcome, in particular I/O and array intrinsics (including packing/unpacking, reshape, spread and cshift).

FX

-------------- next part --------------
A non-text attachment was scrubbed...
Name: full_testing_4.diff
Type: application/octet-stream
Size: 47882 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100912/bb3d0aa4/attachment.obj>


More information about the Fortran mailing list