xref: /openbsd-src/sys/arch/hppa/spmath/mpys.c (revision 7eec34da5ce3d990cd99bf62b82bcd810afc1ed3)
1*7eec34daSmickey /*	$OpenBSD: mpys.c,v 1.7 2003/04/10 17:27:58 mickey Exp $	*/
28a472b3eSmickey /*
3c2feb252Smickey   (c) Copyright 1986 HEWLETT-PACKARD COMPANY
4c2feb252Smickey   To anyone who acknowledges that this file is provided "AS IS"
5c2feb252Smickey   without any express or implied warranty:
6c2feb252Smickey       permission to use, copy, modify, and distribute this file
7c2feb252Smickey   for any purpose is hereby granted without fee, provided that
8c2feb252Smickey   the above copyright notice and this notice appears in all
9c2feb252Smickey   copies, and that the name of Hewlett-Packard Company not be
10c2feb252Smickey   used in advertising or publicity pertaining to distribution
11c2feb252Smickey   of the software without specific, written prior permission.
12c2feb252Smickey   Hewlett-Packard Company makes no representations about the
13c2feb252Smickey   suitability of this software for any purpose.
148a472b3eSmickey */
15c2feb252Smickey /* @(#)mpys.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:43 */
168a472b3eSmickey 
174f9f21c7Smickey #include "md.h"
188a472b3eSmickey 
19b94afd46Smickey void
mpys(opnd1,opnd2,result)20b94afd46Smickey mpys(opnd1,opnd2,result)
218a472b3eSmickey 	int opnd1, opnd2;
228a472b3eSmickey 	struct mdsfu_register *result;
238a472b3eSmickey {
24*7eec34daSmickey 	s_xmpy(&opnd1,&opnd2,result);
258a472b3eSmickey 
268a472b3eSmickey 	/* determine overflow status */
278a472b3eSmickey 	if ((result_hi == 0 && result_lo >= 0) ||
28c2feb252Smickey 	    (result_hi == -1 && result_lo < 0))
29c2feb252Smickey 		overflow = FALSE;
30c2feb252Smickey 	else
31c2feb252Smickey 		overflow = TRUE;
328a472b3eSmickey }
33