summaryrefslogtreecommitdiff
path: root/lib/libc/arch
diff options
context:
space:
mode:
authorTobias Ulmer <tobiasu@cvs.openbsd.org>2014-06-07 01:41:27 +0000
committerTobias Ulmer <tobiasu@cvs.openbsd.org>2014-06-07 01:41:27 +0000
commit6b63fb6a9d8f4e18392a35d224486d81e50fe0fc (patch)
tree2c7d825caa1b44c3f554b74b0ac6e1c8d07ac299 /lib/libc/arch
parentc0b7c3bead09d4d16ed46e22e8237c22f390e178 (diff)
Fix modf() on sparc
For large integral values, modf returned uninitialized data in iptr since 1992. Found while debugging python segfaults. ok miod
Diffstat (limited to 'lib/libc/arch')
-rw-r--r--lib/libc/arch/sparc/gen/modf.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/arch/sparc/gen/modf.S b/lib/libc/arch/sparc/gen/modf.S
index 6eda1351ef4..f5102305df0 100644
--- a/lib/libc/arch/sparc/gen/modf.S
+++ b/lib/libc/arch/sparc/gen/modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.8 2012/08/22 17:19:35 pascal Exp $ */
+/* $OpenBSD: modf.S,v 1.9 2014/06/07 01:41:26 tobiasu Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -175,11 +175,11 @@ Lbig:
*/
#ifdef __PIC__
PICCY_SET(L0, %l0, %o7)
- std %f0, [%i2] ! *ival = val;
+ std %i0, [%i2] ! *ival = val;
ldd [%l0], %f0 ! return 0.0;
#else
sethi %hi(L0), %l0
- std %f0, [%i2] ! *ival = val;
+ std %i0, [%i2] ! *ival = val;
ldd [%l0 + %lo(L0)], %f0 ! return 0.0;
#endif
ret