summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/strtod.c
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1998-08-11 22:04:29 +0000
committerniklas <niklas@openbsd.org>1998-08-11 22:04:29 +0000
commita59541dae744e42297951f0b9e3acaadf0648d1b (patch)
tree6988523892b6a9fcdd2371a7c23f48821f511fc1 /lib/libc/stdlib/strtod.c
parentpoll() proto (diff)
downloadwireguard-openbsd-a59541dae744e42297951f0b9e3acaadf0648d1b.tar.xz
wireguard-openbsd-a59541dae744e42297951f0b9e3acaadf0648d1b.zip
Temporary fix for a GCC aliasing bug/misfeature that hits here
Diffstat (limited to 'lib/libc/stdlib/strtod.c')
-rw-r--r--lib/libc/stdlib/strtod.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c
index a4ba993095d..4b38110dcb5 100644
--- a/lib/libc/stdlib/strtod.c
+++ b/lib/libc/stdlib/strtod.c
@@ -90,7 +90,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strtod.c,v 1.9 1997/03/25 17:07:30 rahnds Exp $";
+static char *rcsid = "$OpenBSD: strtod.c,v 1.10 1998/08/11 22:04:29 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
@@ -2004,6 +2004,10 @@ __dtoa
if (i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) {
#endif
d2 = d;
+#ifdef __GNUC__
+ /* Do not move instructions depending on d2 over this line. */
+ __asm__ __volatile__ ("" : : "X" (d2) : "memory");
+#endif
word0(d2) &= Frac_mask1;
word0(d2) |= Exp_11;
#ifdef IBM