svn commit: r212976 - head/lib/libc/i386/gen
Rui Paulo
rpaulo at FreeBSD.org
Tue Sep 21 20:23:19 UTC 2010
Author: rpaulo
Date: Tue Sep 21 20:23:19 2010
New Revision: 212976
URL: http://svn.freebsd.org/changeset/base/212976
Log:
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
Modified:
head/lib/libc/i386/gen/ldexp.c
Modified: head/lib/libc/i386/gen/ldexp.c
==============================================================================
--- head/lib/libc/i386/gen/ldexp.c Tue Sep 21 20:21:56 2010 (r212975)
+++ head/lib/libc/i386/gen/ldexp.c Tue Sep 21 20:23:19 2010 (r212976)
@@ -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
More information about the svn-src-head
mailing list