X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: Processor rounding modes Date: Mon, 24 Apr 2006 00:22:10 +0100 Message-ID: <03b101c6672c$bf01b560$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <444C00C4.1000402@doc.ic.ac.uk> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 23 April 2006 23:34, Andrew Cheadle wrote: > I'm trying to get a version of some software running under Cygwin > and I'm having real problems in finding routines that directly interface > to the floating point processor rounding modes. I have code for > different architectures that use fpu_control.h, ieeefp.h, fenv.h and > WIN32 float.h. However, for various reasons, I need cygwin's runtime > library environment and can't use the native Win32 port nor the mingw > runtime. Well, it's still not in cygwin yet, but in the meantime you could roll your own pretty easy: just hack out the bits you need from glibc. Get a copy of fpu_control here: http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/fpu_control.h?cvsro ot=glibc Find source files for fpXXXX functions here: http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/fpu/?cvsroot=glibc > not implemented for Cygwin. Then I see that ieeefp.h has prototypes > declarations for fpsetround and friends but there is no library to link > with (AFAICT). Is this correct, It is correct; the prototypes are there but the functions not implemented yet. > is there a way to do this under Cygwin See above. I found that just plonking a copy of fpu_control.h into /usr/local/include was enough to allow me to use the 'set_math_double_precision()' bugfix to the testcase illustrated at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 I can imagine that fp exception handling stuff might not be complete, and you'll need to find a bodge or workaround or substitute for the caps-detecting stuff it uses in some functions to know if you have SSE or MMX or whatever (eg. fpsetround), but if you're only after basic stuff it would be easy enough. > or is Gary Polhill's library (announced > http://sourceware.org/ml/cygwin/2004-06/msg00037.html) still the only way? I-a-know-a-nothing! cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/