1 /* $NetBSD: md.h,v 1.3 2005/12/11 12:17:40 christos Exp $ */
3 /* $OpenBSD: md.h,v 1.4 2001/03/29 03:58:18 mickey Exp $ */
6 * Copyright 1996 1995 by Open Software Foundation, Inc.
9 * Permission to use, copy, modify, and distribute this software and
10 * its documentation for any purpose and without fee is hereby granted,
11 * provided that the above copyright notice appears in all copies and
12 * that both the copyright notice and this permission notice appear in
13 * supporting documentation.
15 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
17 * FOR A PARTICULAR PURPOSE.
19 * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
20 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
21 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
22 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
23 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30 * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
32 * To anyone who acknowledges that this file is provided "AS IS"
33 * without any express or implied warranty:
34 * permission to use, copy, modify, and distribute this file
35 * for any purpose is hereby granted without fee, provided that
36 * the above copyright notice and this notice appears in all
37 * copies, and that the name of Hewlett-Packard Company not be
38 * used in advertising or publicity pertaining to distribution
39 * of the software without specific, written prior permission.
40 * Hewlett-Packard Company makes no representations about the
41 * suitability of this software for any purpose.
44 #include <sys/cdefs.h>
45 #include <sys/types.h>
47 /*****************************************************************
48 * Muliply/Divide SFU Internal State *
49 *****************************************************************/
50 struct mdsfu_register
{
56 #define result_hi result->rslt_hi
57 #define result_lo result->rslt_lo
58 #define overflow result->ovflow
74 /* Simply copy the arguments to the emulated copies of the registers */
75 #define mdrr(reg1,reg2,result) {result_hi = reg1;result_lo = reg2;}
82 int resulthi
, /* high word of result */
83 resultlo
; /* low word of result */
86 void divsfm(int, int, struct mdsfu_register
*);
87 void divsfr(int, int, struct mdsfu_register
*);
88 void divsim(int, int, struct mdsfu_register
*);
89 void divsir(int, int, struct mdsfu_register
*);
91 void divu(int, int, int, struct mdsfu_register
*);
92 void divufr(unsigned int, unsigned int, struct mdsfu_register
*);
93 void divuir(unsigned int, unsigned int, struct mdsfu_register
*);
95 void mpyaccs(int, int, struct mdsfu_register
*);
96 void mpyaccu(unsigned int, unsigned int, struct mdsfu_register
*);
97 void mpys(int, int, struct mdsfu_register
*);
98 void mpyscv(int, int, struct mdsfu_register
*);
99 void mpyu(unsigned int, unsigned int, struct mdsfu_register
*);
100 void mpyucv(unsigned int, unsigned int, struct mdsfu_register
*);
102 int impys(int *, int *, struct mdsfu_register
*);
103 int impyu(int *, int *, struct mdsfu_register
*);