Bug 19602 - -mno-80387 or -mfpmath=sse should define __NO_MATH_INLINES
Summary: -mno-80387 or -mfpmath=sse should define __NO_MATH_INLINES
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-24 07:16 UTC by Uroš Bizjak
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i386-pc-linux-gnu
Target: i386-pc-linux-gnu
Build: i386-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uroš Bizjak 2005-01-24 07:16:24 UTC
This testcase will fail with '-O2 -ffast-math -mno-80387':

#include <math.h>
double test(double x) {
        return sin(x);
}

sin.c: In function 'test':
/usr/include/bits/mathinline.h:456: error: impossible constraint in 'asm'

Adding -D__NO_MATH_INLINES to compile flags fixes this problem.
Comment 1 Andrew Pinski 2005-01-24 07:36:58 UTC
glibc is fucked up really, it should not do this.  We really should define it always because almost always 
get better than glibc (especially with the tree-ssa).
Comment 2 Uroš Bizjak 2005-04-29 19:34:13 UTC
Hm, I would also suggest setting __NO_MATH_INLINES for -mfpmath=sse to prevent
the performance degradation for XMM->x87 registers when x87 ASM code is included
from mathinlines.h. x87 intrinsics are disabled for the same reason!
Comment 3 Richard Henderson 2005-04-30 00:21:50 UTC
We will not be setting __NO_MATH_INLINES for any reason.  Work with glibc to get
the inlines disabled at the source under the correct conditions.