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 56#include <machine/frame.h> 57#include <machine/fp.h> 58#include <machine/fsr.h> 59#include <machine/ieee.h> 60#include <machine/instr.h> 61 62#include "fpu_arith.h" 63#include "fpu_emu.h" 64#include "fpu_extern.h" |
65#include "__sparc_utrap_private.h" |
66 67/* 68 * N.B.: in all of the following, we assume the FP format is 69 * 70 * --------------------------- 71 * | s | exponent | fraction | 72 * --------------------------- 73 * --- 200 unchanged lines hidden (view full) --- 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 /* 287 * Input is a signalling NaN. All operations that return 288 * an input NaN operand put it through a ``NaN conversion'', 289 * which basically just means ``turn on the quiet bit''. 290 * We do this here so that all NaNs internally look quiet --- 16 unchanged lines hidden --- |