mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Pull in GNU2 fix for this from FreeBSD, allows ldexp.c to compile with
gcc2.x
This commit is contained in:
parent
1cb16b68b3
commit
8e101982f3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1585
@ -55,8 +55,18 @@ ldexp (double value, int exp)
|
||||
{
|
||||
double temp, texp, temp2;
|
||||
texp = exp;
|
||||
#ifdef __GNUC__
|
||||
#if __GNUC__ >= 2
|
||||
asm ("fscale "
|
||||
: "=u" (temp2), "=t" (temp)
|
||||
: "0" (texp), "1" (value));
|
||||
#else
|
||||
asm ("fscale ; fxch %%st(1) ; fstp%L1 %1 "
|
||||
: "=f" (temp), "=0" (temp2)
|
||||
: "0" (texp), "f" (value));
|
||||
#endif
|
||||
#else
|
||||
error unknown asm
|
||||
#endif
|
||||
return (temp);
|
||||
}
|
||||
|
@ -55,8 +55,18 @@ ldexp (double value, int exp)
|
||||
{
|
||||
double temp, texp, temp2;
|
||||
texp = exp;
|
||||
#ifdef __GNUC__
|
||||
#if __GNUC__ >= 2
|
||||
asm ("fscale "
|
||||
: "=u" (temp2), "=t" (temp)
|
||||
: "0" (texp), "1" (value));
|
||||
#else
|
||||
asm ("fscale ; fxch %%st(1) ; fstp%L1 %1 "
|
||||
: "=f" (temp), "=0" (temp2)
|
||||
: "0" (texp), "f" (value));
|
||||
#endif
|
||||
#else
|
||||
error unknown asm
|
||||
#endif
|
||||
return (temp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user