cvs commit: src/lib/msun/src math.h

Alexander Leidinger Alexander at Leidinger.net
Mon Jul 12 07:00:11 PDT 2004


On Thu, 8 Jul 2004 20:33:27 -0700
David Schultz <das at freebsd.org> wrote:

> The Intel compiler is too smart for its own good sometimes.
> I kept wondering why, despite icc's lack of a __builtin_isgreater(),
> it seemed to be using one anyway.  It turns out that it had done
> some constant propagation and determined the value of my call to the
> libm routine __fpclassifyd() statically.  Pretty spiffy.

In this case the attached patch may be more accurate.

Background: The FreeBSD port of icc v8 doesn't define __GNUC__ by
default, but icc v8 on linux does it. It gets explicitly disabled in the
FreeBSD port. To be on the safe side one should test for !defined(icc)
if the code shouldn't be used in the icc case.

Bye,
Alexander.

-- 
           I'm available to get hired (preferred in .lu).

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7
-------------- next part --------------
Index: math.h
===================================================================
RCS file: /big/FreeBSD-CVS/src/lib/msun/src/math.h,v
retrieving revision 1.40
diff -u -u -r1.40 math.h
--- math.h	9 Jul 2004 03:32:39 -0000	1.40
+++ math.h	12 Jul 2004 13:56:09 -0000
@@ -38,7 +38,7 @@
 #define	__MATH_BUILTIN_CONSTANTS
 #endif
 
-#if (defined(__GNUC__) && __GNUC__ >= 3)
+#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER))
 #define	__MATH_BUILTIN_RELOPS
 #endif
 


More information about the cvs-src mailing list