Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 2004 16:00:09 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        David Schultz <das@freebsd.org>
Cc:        cvs-all@freebsd.org
Subject:   Re: cvs commit: src/lib/msun/src math.h
Message-ID:  <20040712160009.16ebe0c1@Magellan.Leidinger.net>
In-Reply-To: <20040709033327.GA14984@VARK.homeunix.com>
References:  <200407090331.i693VAIL038494@repoman.freebsd.org> <20040709033327.GA14984@VARK.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

--Multipart=_Mon__12_Jul_2004_16_00_09_+0200_QYg96VZ4z5Qpyrj6
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Thu, 8 Jul 2004 20:33:27 -0700
David Schultz <das@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

--Multipart=_Mon__12_Jul_2004_16_00_09_+0200_QYg96VZ4z5Qpyrj6
Content-Type: text/plain;
 name="math.h.diff"
Content-Disposition: attachment;
 filename="math.h.diff"
Content-Transfer-Encoding: 8bit

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
 

--Multipart=_Mon__12_Jul_2004_16_00_09_+0200_QYg96VZ4z5Qpyrj6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040712160009.16ebe0c1>