Annotation of sys/arch/hppa/spmath/mpyaccu.c, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: mpyaccu.c,v 1.7 2003/04/10 17:27:58 mickey Exp $ */
! 2: /*
! 3: (c) Copyright 1986 HEWLETT-PACKARD COMPANY
! 4: To anyone who acknowledges that this file is provided "AS IS"
! 5: without any express or implied warranty:
! 6: permission to use, copy, modify, and distribute this file
! 7: for any purpose is hereby granted without fee, provided that
! 8: the above copyright notice and this notice appears in all
! 9: copies, and that the name of Hewlett-Packard Company not be
! 10: used in advertising or publicity pertaining to distribution
! 11: of the software without specific, written prior permission.
! 12: Hewlett-Packard Company makes no representations about the
! 13: suitability of this software for any purpose.
! 14: */
! 15: /* @(#)mpyaccu.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:41 */
! 16:
! 17: #include "md.h"
! 18:
! 19: void
! 20: mpyaccu(opnd1,opnd2,result)
! 21: unsigned int opnd1, opnd2;
! 22: struct mdsfu_register *result;
! 23: {
! 24: struct mdsfu_register temp;
! 25: int carry;
! 26:
! 27: u_xmpy(&opnd1,&opnd2,&temp);
! 28:
! 29: /* get result of low word add, and check for carry out */
! 30: if ((result_lo += (unsigned)temp.rslt_lo) < (unsigned)temp.rslt_lo)
! 31: carry = 1;
! 32: else
! 33: carry = 0;
! 34:
! 35: /* get result of high word add, and determine overflow status */
! 36: if ((result_hi += (unsigned)temp.rslt_hi + carry) <
! 37: (unsigned)temp.rslt_hi)
! 38: overflow = TRUE;
! 39: }
CVSweb