From 6b63fb6a9d8f4e18392a35d224486d81e50fe0fc Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Sat, 7 Jun 2014 01:41:27 +0000 Subject: Fix modf() on sparc For large integral values, modf returned uninitialized data in iptr since 1992. Found while debugging python segfaults. ok miod --- lib/libc/arch/sparc/gen/modf.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3