Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2010 19:10:11 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-sparc64@FreeBSD.org
Subject:   Re: sparc64/144900: commit references a PR
Message-ID:  <201003301910.o2UJABjp050812@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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: Tue, 30 Mar 2010 19:04:06 +0000 (UTC)

 Author: marius
 Date: Tue Mar 30 19:03:29 2010
 New Revision: 205892
 URL: http://svn.freebsd.org/changeset/base/205892
 
 Log:
   MFC: r205394
   
   Ensure that __fpu_ftox() both returns the high bits and res[1] contains
   the low bits also in the default case.
   
   PR:i		144900
   Obtained from:	OpenBSD
 
 Modified:
   stable/6/lib/libc/sparc64/fpu/fpu_implode.c
 Directory Properties:
   stable/6/lib/libc/   (props changed)
 
 Modified: stable/6/lib/libc/sparc64/fpu/fpu_implode.c
 ==============================================================================
 --- stable/6/lib/libc/sparc64/fpu/fpu_implode.c	Tue Mar 30 19:03:27 2010	(r205891)
 +++ stable/6/lib/libc/sparc64/fpu/fpu_implode.c	Tue Mar 30 19:03:29 2010	(r205892)
 @@ -252,8 +252,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:
  		/*
 @@ -277,15 +277,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"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003301910.o2UJABjp050812>