_fpmath.h revision 110566
1178476Sjb/*-
2178476Sjb * Copyright (c) 2002, 2003 David Schultz <dschultz@uclink.Berkeley.EDU>
3178476Sjb * All rights reserved.
4178476Sjb *
5178476Sjb * Redistribution and use in source and binary forms, with or without
6178476Sjb * modification, are permitted provided that the following conditions
7178476Sjb * are met:
8178476Sjb * 1. Redistributions of source code must retain the above copyright
9178476Sjb *    notice, this list of conditions and the following disclaimer.
10178476Sjb * 2. Redistributions in binary form must reproduce the above copyright
11178476Sjb *    notice, this list of conditions and the following disclaimer in the
12178476Sjb *    documentation and/or other materials provided with the distribution.
13178476Sjb *
14178476Sjb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15178476Sjb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16178476Sjb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17178476Sjb * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18178476Sjb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19178476Sjb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20178476Sjb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21178476Sjb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22178476Sjb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23178476Sjb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24178476Sjb * SUCH DAMAGE.
25178476Sjb *
26178476Sjb * $FreeBSD: head/lib/libc/amd64/_fpmath.h 110566 2003-02-08 20:37:55Z mike $
27178476Sjb */
28178476Sjb
29178476Sjbunion IEEEl2bits {
30178476Sjb	long double	e;
31178476Sjb	struct {
32178476Sjb		unsigned int	manl	:32;
33178476Sjb		unsigned int	manh	:32;
34178476Sjb		unsigned int	exp	:15;
35178476Sjb		unsigned int	sign	:1;
36178476Sjb		unsigned int	junk	:16;
37178476Sjb	} bits;
38178476Sjb};
39178476Sjb
40178476Sjb#define	mask_nbit_l(u)	((u).bits.manh &= 0x7fffffff)
41178476Sjb