From owner-freebsd-sparc64@FreeBSD.ORG Sat Mar 20 21:20:03 2010 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE5B106566B for ; Sat, 20 Mar 2010 21:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 34D4D8FC18 for ; Sat, 20 Mar 2010 21:20:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2KLK31U087934 for ; Sat, 20 Mar 2010 21:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2KLK3bX087926; Sat, 20 Mar 2010 21:20:03 GMT (envelope-from gnats) Date: Sat, 20 Mar 2010 21:20:03 GMT Message-Id: <201003202120.o2KLK3bX087926@freefall.freebsd.org> To: freebsd-sparc64@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: sparc64/144900: commit references a PR X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 21:20:03 -0000 The following reply was made to PR sparc64/144900; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: sparc64/144900: commit references a PR Date: Sat, 20 Mar 2010 21:16:10 +0000 (UTC) Author: marius Date: Sat Mar 20 21:15:56 2010 New Revision: 205394 URL: http://svn.freebsd.org/changeset/base/205394 Log: Ensure that __fpu_ftox() both returns the high bits and res[1] contains the low bits also in the default case. PR: 144900 Obtained from: OpenBSD MFC after: 3 days Modified: head/lib/libc/sparc64/fpu/fpu_implode.c Modified: head/lib/libc/sparc64/fpu/fpu_implode.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 21:04:47 2010 (r205393) +++ head/lib/libc/sparc64/fpu/fpu_implode.c Sat Mar 20 21:15:56 2010 (r205394) @@ -248,8 +248,8 @@ __fpu_ftox(fe, fp, res) sign = fp->fp_sign; switch (fp->fp_class) { case FPC_ZERO: - res[1] = 0; - return (0); + i = 0; + goto done; case FPC_NUM: /* @@ -273,15 +273,17 @@ __fpu_ftox(fe, fp, res) break; if (sign) i = -i; - res[1] = (int)i; - return (i >> 32); + goto done; default: /* Inf, qNaN, sNaN */ break; } /* overflow: replace any inexact exception with invalid */ fe->fe_cx = (fe->fe_cx & ~FSR_NX) | FSR_NV; - return (0x7fffffffffffffffLL + sign); + i = 0x7fffffffffffffffLL + sign; +done: + res[1] = i & 0xffffffff; + return (i >> 32); } /* _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"