This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

i386/cygwin fpu hard-float [l]{0-2}rint[lf]? implementation pt. 1



    Hi Jeff,

  Here's part 1 of the new hw fp math functions for x86.  It adds the
implementations themselves.  There's some documentation in the C files, but nothing
trying to chew it yet.  I added the prototypes to math.h unconditionally - it's just
occurred to me as an afterthought that I should probably have put them in
fastmath.h, so I guess I'll need to respin this or just give you a follow-on patch
that rolls back math.h and moves the prototypes across, at your preference.

  It's not customary to post a diff of the regenerated files, but I've attached one
here because I'd like to ask you to eyeball it.  There seems to be a whole lot of
peturbation that I wouldn't expect from the changes I made, I'm not sure if I don't
have something wrong in my autotools environment or if perhaps there are some
differences in how the cygwin versions regenerate?

  I tested it reasonably thoroughly.  The tests I ran included two of BYTE's nbench
benchmarks, whetstone and dhrystone, kahan's paranoia, guenther's tramp-3d and
fourmilabs' fbench.  None showed any differences in results apart from increased
performance.  (They did reveal some existing problems in our implementation,
specifically with -ffast-math, but that's for another day).


  Anyway, here it is.  Subject to whatever you decide about the header prototypes,
OK?


newlib/ChangeLog

2007-12-18  Dave Korn  <dave.korn@artimi.com>

	* libc/include/math.h (llrint, llrintf, rintl, lrintl, llrintl):  Add
	prototypes.
	* libm/machine/i386/Makefile.am (LIB_SOURCES):  Add new files sf_rint.c,
	sf_lrint.c, sf_llrint.c, s_rint.c, s_lrint.c, s_llrint.c, sl_rint.c,
	sl_lrint.c and sl_llrint.c.
	(lib_a-s_lrint.$(OBJEXT), lib_a-s_rint.$(OBJEXT), lib_a-sf_lrint.$(OBJEXT),
	lib_a-sf_rint.$(OBJEXT)):  Add explicit dependencies on common sources
	which are directly included by i386 MD implementations when !FAST_MATH.
	* libm/machine/i386/Makefile.in:  Regenerated.
	* libm/machine/i386/s_llrint.c, libm/machine/i386/s_lrint.c,
	libm/machine/i386/s_rint.c, libm/machine/i386/sf_llrint.c,
	libm/machine/i386/sf_lrint.c, libm/machine/i386/sf_rint.c,
	libm/machine/i386/sl_llrint.c, libm/machine/i386/sl_lrint.c,
	libm/machine/i386/sl_rint.c:  New files.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

Attachment: llrint-patch-part1.diff
Description: Binary data

Attachment: llrint-results.txt
Description: Text document

Attachment: llrint-makefile-regen.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]