Workaround LLVM bug #4434:
Reorder inline assembly arguments temp2, temp, value and texp to follow the st(0), st(1), etc. style. Also mark the temp2 variable as volatile to workaround another clang bug. This allows clang to buildworld FreeBSD/i386. Submitted by: dim
This commit is contained in:
parent
a8103ae8ca
commit
7e78863707
@ -51,12 +51,16 @@ __FBSDID("$FreeBSD$");
|
||||
double
|
||||
ldexp (double value, int exp)
|
||||
{
|
||||
double temp, texp, temp2;
|
||||
double temp, texp;
|
||||
#ifdef __clang__
|
||||
volatile
|
||||
#endif
|
||||
double temp2;
|
||||
texp = exp;
|
||||
#ifdef __GNUC__
|
||||
__asm ("fscale "
|
||||
: "=u" (temp2), "=t" (temp)
|
||||
: "0" (texp), "1" (value));
|
||||
: "=t" (temp), "=u" (temp2)
|
||||
: "0" (value), "1" (texp));
|
||||
#else
|
||||
#error unknown asm
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user