This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33220] New: impossible constraint in ‘asm’
- From: "yakov at emc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Aug 2007 17:43:35 -0000
- Subject: [Bug c/33220] New: impossible constraint in ‘asm’
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
cc -O2 -dr -msoft-float -c f_powf.c
f_powf.c: In function ?_f_powf?:
f_powf.c:49: error: impossible constraint in ?asm?
typedef unsigned int __uint32_t;
typedef signed int __int32_t;
typedef union
{
double value;
struct
{
__uint32_t lsw;
__uint32_t msw;
} parts;
} ieee_double_shape_type;
typedef union
{
float value;
__uint32_t word;
} ieee_float_shape_type;
extern float powf (float, float);
__inline__ static int
check_finite(double x)
{
__int32_t hx;
do { ieee_double_shape_type gh_u; gh_u.value = (x); (hx) = gh_u.parts.msw; }
while (0);
return (int)((__uint32_t)((hx&0x7fffffff)-0x7ff00000)>>31);
}
__inline__
static
int
check_finitef(float x)
{
__int32_t ix;
do { ieee_float_shape_type gf_u; gf_u.value = (x); (ix) = gf_u.word; } while
(0);
return (int)((__uint32_t)((ix&0x7fffffff)-0x7f800000)>>31);
}
float _f_powf (float x, float y)
{
if (x > 0.0 && check_finitef(y))
{
float result;
asm ("flds 8(%%ebp); fyl2x; fld %%st; frndint; fsub %%st,%%st(1);" "fxch;
fchs; f2xm1; fld1; faddp; fxch; fld1; fscale; fstp %%st(1);" "fmulp" : "=t"
(result) : "0" (y));
return result;
}
else
return powf (x,y);
}
--
Summary: impossible constraint in ?asm?
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yakov at emc dot com
GCC build triplet: gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33220