Deleted Added
sdiff udiff text old ( 95587 ) new ( 96422 )
full compact
1/*
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This software was developed by the Computer Systems Engineering group
6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
7 * contributed to Berkeley.
8 *

--- 30 unchanged lines hidden (view full) ---

39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
41 *
42 * @(#)fpu_explode.c 8.1 (Berkeley) 6/11/93
43 * $NetBSD: fpu_explode.c,v 1.5 2000/08/03 18:32:08 eeh Exp $
44 */
45
46#include <sys/cdefs.h>
47__FBSDID("$FreeBSD: head/lib/libc/sparc64/fpu/fpu_explode.c 95587 2002-04-27 21:56:28Z jake $");
48
49/*
50 * FPU subroutines: `explode' the machine's `packed binary' format numbers
51 * into our internal format.
52 */
53
54#include <sys/param.h>
55

--- 187 unchanged lines hidden (view full) ---

243 * operations are performed.)
244 */
245void
246__fpu_explode(fe, fp, type, reg)
247 struct fpemu *fe;
248 struct fpn *fp;
249 int type, reg;
250{
251 u_int s;
252 u_int64_t l;
253
254 l = __fpu_getreg64(reg & ~1);
255 s = __fpu_getreg(reg);
256 fp->fp_sign = s >> 31;
257 fp->fp_sticky = 0;
258 switch (type) {
259 case FTYPE_LNG:
260 s = __fpu_xtof(fp, l);
261 break;
262
263 case FTYPE_INT:
264 s = __fpu_itof(fp, s);
265 break;
266
267 case FTYPE_SNG:
268 s = __fpu_stof(fp, s);
269 break;
270
271 case FTYPE_DBL:
272 s = __fpu_dtof(fp, s, __fpu_getreg(reg + 1));
273 break;
274
275 case FTYPE_EXT:
276 s = __fpu_qtof(fp, s, __fpu_getreg(reg + 1),
277 __fpu_getreg(reg + 2),
278 __fpu_getreg(reg + 3));
279 break;
280
281 default:
282 __utrap_panic("fpu_explode");
283 }
284
285 if (s == FPC_QNAN && (fp->fp_mant[0] & FP_QUIETBIT) == 0) {
286 /*

--- 20 unchanged lines hidden ---