summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-05-07 22:19:31 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-05-07 22:19:31 +0000
commit7657493d64c6d80359ef3a35f5de5a09b490b1ea (patch)
treee59f824bdf0e43a5fdbc0821e0882cf802ee4283
parentb02e4f767517ffad3d92f4cfb03fd681231fa3e4 (diff)
bring over our mods; the cnv*c have a problem now, described in the osf version of the cnv_float.h, at the end
-rw-r--r--sys/arch/hppa/spmath/cnv_float.h174
-rw-r--r--sys/arch/hppa/spmath/dbl_float.h54
-rw-r--r--sys/arch/hppa/spmath/dfadd.c58
-rw-r--r--sys/arch/hppa/spmath/dfcmp.c61
-rw-r--r--sys/arch/hppa/spmath/dfdiv.c62
-rw-r--r--sys/arch/hppa/spmath/dfmpy.c62
-rw-r--r--sys/arch/hppa/spmath/dfrem.c63
-rw-r--r--sys/arch/hppa/spmath/dfsqrt.c62
-rw-r--r--sys/arch/hppa/spmath/dfsub.c59
-rw-r--r--sys/arch/hppa/spmath/divsfm.c59
-rw-r--r--sys/arch/hppa/spmath/divsfr.c59
-rw-r--r--sys/arch/hppa/spmath/divsim.c59
-rw-r--r--sys/arch/hppa/spmath/divsir.c59
-rw-r--r--sys/arch/hppa/spmath/divu.S92
-rw-r--r--sys/arch/hppa/spmath/divufr.c60
-rw-r--r--sys/arch/hppa/spmath/divuir.c60
-rw-r--r--sys/arch/hppa/spmath/fcnvff.c75
-rw-r--r--sys/arch/hppa/spmath/fcnvfx.c259
-rw-r--r--sys/arch/hppa/spmath/fcnvfxt.c206
-rw-r--r--sys/arch/hppa/spmath/fcnvxf.c89
-rw-r--r--sys/arch/hppa/spmath/float.h57
-rw-r--r--sys/arch/hppa/spmath/fpbits.h52
-rw-r--r--sys/arch/hppa/spmath/frnd.c78
-rw-r--r--sys/arch/hppa/spmath/hppa.h52
-rw-r--r--sys/arch/hppa/spmath/impys.S124
-rw-r--r--sys/arch/hppa/spmath/impyu.S102
-rw-r--r--sys/arch/hppa/spmath/md.h53
-rw-r--r--sys/arch/hppa/spmath/mpyaccs.c67
-rw-r--r--sys/arch/hppa/spmath/mpyaccu.c67
-rw-r--r--sys/arch/hppa/spmath/mpys.c66
-rw-r--r--sys/arch/hppa/spmath/mpyscv.c60
-rw-r--r--sys/arch/hppa/spmath/mpyu.c59
-rw-r--r--sys/arch/hppa/spmath/mpyucv.c60
-rw-r--r--sys/arch/hppa/spmath/quad_float.h53
-rw-r--r--sys/arch/hppa/spmath/setovfl.c74
-rw-r--r--sys/arch/hppa/spmath/sfadd.c61
-rw-r--r--sys/arch/hppa/spmath/sfcmp.c63
-rw-r--r--sys/arch/hppa/spmath/sfdiv.c62
-rw-r--r--sys/arch/hppa/spmath/sfmpy.c62
-rw-r--r--sys/arch/hppa/spmath/sfrem.c63
-rw-r--r--sys/arch/hppa/spmath/sfsqrt.c62
-rw-r--r--sys/arch/hppa/spmath/sfsub.c61
-rw-r--r--sys/arch/hppa/spmath/sgl_float.h52
43 files changed, 1098 insertions, 2144 deletions
diff --git a/sys/arch/hppa/spmath/cnv_float.h b/sys/arch/hppa/spmath/cnv_float.h
index 785da4c797a..0c37652daaa 100644
--- a/sys/arch/hppa/spmath/cnv_float.h
+++ b/sys/arch/hppa/spmath/cnv_float.h
@@ -1,42 +1,18 @@
-/* $OpenBSD: cnv_float.h,v 1.6 2002/03/14 01:26:32 millert Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: cnv_float.h,v 1.7 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)cnv_float.h: Revision: 2.9.88.1 Date: 93/12/07 15:05:29 */
/*
* Some more constants
@@ -93,8 +69,8 @@
#define Dbl_roundnearest_from_dint(dint_opndB,dbl_opndA,dbl_opndB) \
if (Dintp2(dint_opndB) & 1<<(DBL_EXP_LENGTH - 2)) \
- if ((Dintp2(dint_opndB) << (34 -DBL_EXP_LENGTH)) || Dlowp2(dbl_opndB)) \
- if ((++Dallp2(dbl_opndB))==0) Dallp1(dbl_opndA)++
+ if ((Dintp2(dint_opndB) << (34 - DBL_EXP_LENGTH)) || Dlowp2(dbl_opndB)) \
+ if ((++Dallp2(dbl_opndB))==0) Dallp1(dbl_opndA)++
#define Sgl_isone_roundbit(sgl_value,exponent) \
((Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) >> 31)
@@ -162,8 +138,8 @@
inexact |= guard; \
dest >>= 1; \
Deposit_dsign(srcA,0); \
- Shiftdouble(Dallp1(srcA),Dallp2(srcB),30,dest); \
- odd = dest << 31; \
+ Shiftdouble(Dallp1(srcA),Dallp2(srcB),30,dest); \
+ odd = dest << 31; \
} \
else { \
inexact = Dallp2(srcB) << (2 + exp); \
@@ -211,7 +187,7 @@
((exponent > SGL_FX_MAX_EXP + 1) || Dsign(dbl_valueA)==0 || \
Dmantissap1(dbl_valueA)!=0 || (Dallp2(dbl_valueB)>>21)!=0 )
-#define Dbl_isone_roundbit(dbl_valueA,dbl_valueB,exponent) \
+#define Dbl_isone_roundbit(dbl_valueA,dbl_valueB,exponent) \
((exponent < (DBL_P - 33) ? \
Dallp1(dbl_valueA) >> ((30 - DBL_EXP_LENGTH) - exponent) : \
Dallp2(dbl_valueB) >> ((DBL_P - 2) - exponent)) & 1)
@@ -255,26 +231,26 @@
{if (exponent < 32) { \
Dintp1(destA) = 0; \
if (exponent <= 20) \
- Dintp2(destB) = Dallp1(dbl_valueA) >> (20-(exponent)); \
+ Dintp2(destB) = Dallp1(dbl_valueA) >> (20-exponent); \
else Variable_shift_double(Dallp1(dbl_valueA),Dallp2(dbl_valueB), \
- (52-(exponent)),Dintp2(destB)); \
+ 52-exponent,Dintp2(destB)); \
} \
else { \
if (exponent <= 52) { \
- Dintp1(destA) = Dallp1(dbl_valueA) >> (52-(exponent)); \
+ Dintp1(destA) = Dallp1(dbl_valueA) >> (52-exponent); \
if (exponent == 52) Dintp2(destB) = Dallp2(dbl_valueB); \
else Variable_shift_double(Dallp1(dbl_valueA),Dallp2(dbl_valueB), \
52-exponent,Dintp2(destB)); \
- } \
+ } \
else { \
Variable_shift_double(Dallp1(dbl_valueA),Dallp2(dbl_valueB), \
84-exponent,Dintp1(destA)); \
- Dintp2(destB) = Dallp2(dbl_valueB) << ((exponent)-52); \
+ Dintp2(destB) = Dallp2(dbl_valueB) << (exponent-52); \
} \
}}
-#define Dint_setzero(dresultA,dresultB) \
- Dintp1(dresultA) = 0; \
+#define Dint_setzero(dresultA,dresultB) \
+ Dintp1(dresultA) = 0; \
Dintp2(dresultB) = 0
#define Dint_setone_sign(dresultA,dresultB) \
@@ -310,7 +286,7 @@
#define Find_ms_one_bit(value, position) \
{ \
int var; \
- for (var=8; var >=1; var >>= 1) { \
+ for (var = 8; var >= 1; var >>= 1) { \
if (value >> (32 - position)) \
position -= var; \
else position += var; \
@@ -320,100 +296,6 @@
else position -= 2; \
}
-/*
- * The following 4 functions handle the assignment of a floating point
- * number to a 32-bit integer in cases where the floating point number
- * is too large (or small) to fit in the integer field.
- *
- * In all these cases, HP-UX would return an UNIMPLEMENTEDEXCEPTION
- * resulting in a SIGFPE being sent to the process. For BSD's math
- * library (and various other applications), this was unacceptable.
- * As a result, we now return maxint/minint (like most other OS's)
- * and either return an INEXACTEXCEPTION (SIGFPE) or set the inexact
- * flag (so that the program may continue execution).
- *
- * After discussing this with Jerry Huck @ HP, the one case where we
- * differ from BSD is for programs that try to convert a NaN to an
- * integer; in this case, we will return an UNIMPLEMENTEDEXCEPTION
- * since doing anything else would be completely unreasonable.
- *
- * jef
- */
-
-#define Dbl_return_overflow(srcp1, srcp2, resultp) \
- { \
- if (Dbl_isnan(srcp1, srcp2)) \
- return(UNIMPLEMENTEDEXCEPTION); \
- if (Dbl_iszero_sign(srcp1)) \
- *resultp = 0x7fffffff; \
- else \
- *resultp = 0x80000000; \
- if (Is_overflowtrap_enabled()) { \
- if (Is_inexacttrap_enabled()) \
- return(OVERFLOWEXCEPTION|INEXACTEXCEPTION); \
- else \
- Set_inexactflag(); \
- return(OVERFLOWEXCEPTION); \
- } \
- return(NOEXCEPTION); \
- }
-
-#define Dbl_return_overflow_dbl(srcp1, srcp2, resultp) \
- { \
- if (Dbl_isnan(srcp1, srcp2)) \
- return(UNIMPLEMENTEDEXCEPTION); \
- if (Dbl_iszero_sign(srcp1)) { \
- Dint_copytoptr(0x7fffffff,0xffffffff,resultp); \
- } else { \
- Dint_copytoptr(0x80000000,0x00000000,resultp); \
- } \
- if (Is_overflowtrap_enabled()) { \
- if (Is_inexacttrap_enabled()) \
- return(OVERFLOWEXCEPTION|INEXACTEXCEPTION); \
- else \
- Set_inexactflag(); \
- return(OVERFLOWEXCEPTION); \
- } \
- return(NOEXCEPTION); \
- }
-
-#define Sgl_return_overflow(src, resultp) \
- { \
- if (Sgl_isnan(src)) \
- return(UNIMPLEMENTEDEXCEPTION); \
- if (Sgl_iszero_sign(src)) \
- *resultp = 0x7fffffff; \
- else \
- *resultp = 0x80000000; \
- if (Is_overflowtrap_enabled()) { \
- if (Is_inexacttrap_enabled()) \
- return(OVERFLOWEXCEPTION|INEXACTEXCEPTION); \
- else \
- Set_inexactflag(); \
- return(OVERFLOWEXCEPTION); \
- } \
- return(NOEXCEPTION); \
- }
-
-#define Sgl_return_overflow_dbl(src, resultp) \
- { \
- if (Sgl_isnan(src)) \
- return(UNIMPLEMENTEDEXCEPTION); \
- if (Sgl_iszero_sign(src)) { \
- Dint_copytoptr(0x7fffffff,0xffffffff,resultp); \
- } else { \
- Dint_copytoptr(0x80000000,0x00000000,resultp); \
- } \
- if (Is_overflowtrap_enabled()) { \
- if (Is_inexacttrap_enabled()) \
- return(OVERFLOWEXCEPTION|INEXACTEXCEPTION); \
- else \
- Set_inexactflag(); \
- return(OVERFLOWEXCEPTION); \
- } \
- return(NOEXCEPTION); \
- }
-
int sgl_to_sgl_fcnvfx(sgl_floating_point *, sgl_floating_point *, unsigned int *);
int sgl_to_dbl_fcnvfx(sgl_floating_point *, dbl_integer *, unsigned int *);
int dbl_to_sgl_fcnvfx(dbl_floating_point *, int *, unsigned int *);
@@ -429,5 +311,3 @@ int sgl_to_dbl_fcnvxf(int *, dbl_floating_point *, unsigned int *);
int dbl_to_sgl_fcnvxf(dbl_integer *, sgl_floating_point *, unsigned int *);
int dbl_to_dbl_fcnvxf(dbl_integer *, dbl_floating_point *, unsigned int *);
-
-
diff --git a/sys/arch/hppa/spmath/dbl_float.h b/sys/arch/hppa/spmath/dbl_float.h
index 293071d08fb..d7d38063681 100644
--- a/sys/arch/hppa/spmath/dbl_float.h
+++ b/sys/arch/hppa/spmath/dbl_float.h
@@ -1,44 +1,18 @@
-/* $OpenBSD: dbl_float.h,v 1.7 2002/03/14 03:15:53 millert Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
+/* $OpenBSD: dbl_float.h,v 1.8 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
-#include <sys/cdefs.h>
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dbl_float.h: Revision: 2.9.88.1 Date: 93/12/07 15:05:32 */
/**************************************
* Declare double precision functions *
diff --git a/sys/arch/hppa/spmath/dfadd.c b/sys/arch/hppa/spmath/dfadd.c
index 8e465902163..6b175e1f0be 100644
--- a/sys/arch/hppa/spmath/dfadd.c
+++ b/sys/arch/hppa/spmath/dfadd.c
@@ -1,45 +1,21 @@
-/* $OpenBSD: dfadd.c,v 1.4 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
+/* $OpenBSD: dfadd.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dfadd.c: Revision: 2.7.88.1 Date: 93/12/07 15:05:35 */
-#include "../spmath/float.h"
-#include "../spmath/dbl_float.h"
+#include "float.h"
+#include "dbl_float.h"
/*
* Double_add: add two double precision values.
@@ -48,7 +24,7 @@ int
dbl_fadd(leftptr, rightptr, dstptr, status)
dbl_floating_point *leftptr, *rightptr, *dstptr;
unsigned int *status;
- {
+{
register unsigned int signless_upper_left, signless_upper_right, save;
register unsigned int leftp1, leftp2, rightp1, rightp2, extent;
register unsigned int resultp1 = 0, resultp2 = 0;
diff --git a/sys/arch/hppa/spmath/dfcmp.c b/sys/arch/hppa/spmath/dfcmp.c
index 594c3c15725..c5ae72bd936 100644
--- a/sys/arch/hppa/spmath/dfcmp.c
+++ b/sys/arch/hppa/spmath/dfcmp.c
@@ -1,47 +1,22 @@
-/* $OpenBSD: dfcmp.c,v 1.4 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: dfcmp.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
-
-#include "../spmath/float.h"
-#include "../spmath/dbl_float.h"
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dfcmp.c: Revision: 1.7.88.2 Date: 93/12/08 13:26:38 */
+#include "float.h"
+#include "dbl_float.h"
+
/*
* dbl_cmp: compare two values
*/
@@ -50,7 +25,7 @@ dbl_fcmp(leftptr, rightptr, cond, status)
dbl_floating_point *leftptr, *rightptr;
unsigned int cond; /* The predicate to be tested */
unsigned int *status;
- {
+{
register unsigned int leftp1, leftp2, rightp1, rightp2;
register int xorresult;
diff --git a/sys/arch/hppa/spmath/dfdiv.c b/sys/arch/hppa/spmath/dfdiv.c
index 1dbdae82042..bf29f19f19a 100644
--- a/sys/arch/hppa/spmath/dfdiv.c
+++ b/sys/arch/hppa/spmath/dfdiv.c
@@ -1,46 +1,21 @@
-/* $OpenBSD: dfdiv.c,v 1.4 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: dfdiv.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dfdiv.c: Revision: 2.11.88.1 Date: 93/12/07 15:05:39 */
-#include "../spmath/float.h"
-#include "../spmath/dbl_float.h"
+#include "float.h"
+#include "dbl_float.h"
/*
* Double Precision Floating-point Divide
@@ -48,9 +23,8 @@
int
dbl_fdiv(srcptr1,srcptr2,dstptr,status)
-
-dbl_floating_point *srcptr1, *srcptr2, *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr1, *srcptr2, *dstptr;
+ unsigned int *status;
{
register unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2;
register unsigned int opnd3p1, opnd3p2, resultp1, resultp2;
diff --git a/sys/arch/hppa/spmath/dfmpy.c b/sys/arch/hppa/spmath/dfmpy.c
index 9504c17abc0..5f084ea4923 100644
--- a/sys/arch/hppa/spmath/dfmpy.c
+++ b/sys/arch/hppa/spmath/dfmpy.c
@@ -1,46 +1,21 @@
-/* $OpenBSD: dfmpy.c,v 1.4 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: dfmpy.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dfmpy.c: Revision: 2.11.88.1 Date: 93/12/07 15:05:41 */
-#include "../spmath/float.h"
-#include "../spmath/dbl_float.h"
+#include "float.h"
+#include "dbl_float.h"
/*
* Double Precision Floating-point Multiply
@@ -48,9 +23,8 @@
int
dbl_fmpy(srcptr1,srcptr2,dstptr,status)
-
-dbl_floating_point *srcptr1, *srcptr2, *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr1, *srcptr2, *dstptr;
+ unsigned int *status;
{
register unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2;
register unsigned int opnd3p1, opnd3p2, resultp1, resultp2;
diff --git a/sys/arch/hppa/spmath/dfrem.c b/sys/arch/hppa/spmath/dfrem.c
index fc23126d485..fa89e255b91 100644
--- a/sys/arch/hppa/spmath/dfrem.c
+++ b/sys/arch/hppa/spmath/dfrem.c
@@ -1,56 +1,29 @@
-/* $OpenBSD: dfrem.c,v 1.4 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: dfrem.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dfrem.c: Revision: 1.7.88.1 Date: 93/12/07 15:05:43 */
-
-#include "../spmath/float.h"
-#include "../spmath/dbl_float.h"
+#include "float.h"
+#include "dbl_float.h"
/*
* Double Precision Floating-point Remainder
*/
int
dbl_frem(srcptr1,srcptr2,dstptr,status)
-
-dbl_floating_point *srcptr1, *srcptr2, *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr1, *srcptr2, *dstptr;
+ unsigned int *status;
{
register unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2;
register unsigned int resultp1, resultp2;
diff --git a/sys/arch/hppa/spmath/dfsqrt.c b/sys/arch/hppa/spmath/dfsqrt.c
index e5edb003dab..2043820eeda 100644
--- a/sys/arch/hppa/spmath/dfsqrt.c
+++ b/sys/arch/hppa/spmath/dfsqrt.c
@@ -1,46 +1,21 @@
-/* $OpenBSD: dfsqrt.c,v 1.5 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: dfsqrt.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dfsqrt.c: Revision: 1.9.88.1 Date: 93/12/07 15:05:46 */
-#include "../spmath/float.h"
-#include "../spmath/dbl_float.h"
+#include "float.h"
+#include "dbl_float.h"
/*
* Double Floating-point Square Root
@@ -49,9 +24,8 @@
/*ARGSUSED*/
int
dbl_fsqrt(srcptr,dstptr,status)
-
-dbl_floating_point *srcptr, *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr, *dstptr;
+ unsigned int *status;
{
register unsigned int srcp1, srcp2, resultp1, resultp2;
register unsigned int newbitp1, newbitp2, sump1, sump2;
diff --git a/sys/arch/hppa/spmath/dfsub.c b/sys/arch/hppa/spmath/dfsub.c
index 4e5a7d9a0e9..848cf855de6 100644
--- a/sys/arch/hppa/spmath/dfsub.c
+++ b/sys/arch/hppa/spmath/dfsub.c
@@ -1,46 +1,21 @@
-/* $OpenBSD: dfsub.c,v 1.4 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: dfsub.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)dfsub.c: Revision: 2.8.88.1 Date: 93/12/07 15:05:48 */
-#include "../spmath/float.h"
-#include "../spmath/dbl_float.h"
+#include "float.h"
+#include "dbl_float.h"
/*
* Double_subtract: subtract two double precision values.
@@ -49,7 +24,7 @@ int
dbl_fsub(leftptr, rightptr, dstptr, status)
dbl_floating_point *leftptr, *rightptr, *dstptr;
unsigned int *status;
- {
+{
register unsigned int signless_upper_left, signless_upper_right, save;
register unsigned int leftp1, leftp2, rightp1, rightp2, extent;
register unsigned int resultp1 = 0, resultp2 = 0;
diff --git a/sys/arch/hppa/spmath/divsfm.c b/sys/arch/hppa/spmath/divsfm.c
index 4a999085b32..96a0c10e385 100644
--- a/sys/arch/hppa/spmath/divsfm.c
+++ b/sys/arch/hppa/spmath/divsfm.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: divsfm.c,v 1.4 2001/03/29 03:58:17 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: divsfm.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)divsfm.c: Revision: 1.6.88.1 Date: 93/12/07 15:05:51 */
#include "md.h"
void
divsfm(opnd1,opnd2,result)
-
-int opnd1, opnd2;
-struct mdsfu_register *result;
+ int opnd1, opnd2;
+ struct mdsfu_register *result;
{
register int sign, op1_sign;
diff --git a/sys/arch/hppa/spmath/divsfr.c b/sys/arch/hppa/spmath/divsfr.c
index 972a01fe603..155060e7caf 100644
--- a/sys/arch/hppa/spmath/divsfr.c
+++ b/sys/arch/hppa/spmath/divsfr.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: divsfr.c,v 1.4 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: divsfr.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)divsfr.c: Revision: 1.6.88.1 Date: 93/12/07 15:05:53 */
#include "md.h"
void
divsfr(opnd1,opnd2,result)
-
-int opnd1, opnd2;
-struct mdsfu_register *result;
+ int opnd1, opnd2;
+ struct mdsfu_register *result;
{
int sign, op1_sign;
diff --git a/sys/arch/hppa/spmath/divsim.c b/sys/arch/hppa/spmath/divsim.c
index 1f77e0f53ad..6c8d0b3a92c 100644
--- a/sys/arch/hppa/spmath/divsim.c
+++ b/sys/arch/hppa/spmath/divsim.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: divsim.c,v 1.4 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: divsim.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)divsim.c: Revision: 1.6.88.1 Date: 93/12/07 15:05:56 */
#include "md.h"
void
divsim(opnd1,opnd2,result)
-
-int opnd1, opnd2;
-struct mdsfu_register *result;
+ int opnd1, opnd2;
+ struct mdsfu_register *result;
{
int sign, op1_sign;
diff --git a/sys/arch/hppa/spmath/divsir.c b/sys/arch/hppa/spmath/divsir.c
index 24715b170be..b0babcc868e 100644
--- a/sys/arch/hppa/spmath/divsir.c
+++ b/sys/arch/hppa/spmath/divsir.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: divsir.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: divsir.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)divsir.c: Revision: 1.6.88.1 Date: 93/12/07 15:05:58 */
#include "md.h"
void
divsir(opnd1,opnd2,result)
-
-int opnd1, opnd2;
-struct mdsfu_register *result;
+ int opnd1, opnd2;
+ struct mdsfu_register *result;
{
int sign, op1_sign;
diff --git a/sys/arch/hppa/spmath/divu.S b/sys/arch/hppa/spmath/divu.S
index cc6b0c4e80e..0a8f443113e 100644
--- a/sys/arch/hppa/spmath/divu.S
+++ b/sys/arch/hppa/spmath/divu.S
@@ -1,63 +1,39 @@
-/* $OpenBSD: divu.S,v 1.6 2002/01/04 08:50:30 miod Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: divu.S,v 1.7 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)divu.s: Revision: 1.11.88.1 Date: 93/12/07 15:06:01 */
#include <machine/asm.h>
-/**************************************************************************
- * Implement an integer divide routine for 32-bit operands and 32-bit quotient
- * and remainder with operand values of zero (divisor only) treated specially.
- *
- ***************************************************************************/
-/*
- * General registers
- */
-gr0 .reg %r0 /* General register zero */
-rem .reg %r3 /* remainder and upper part of dividend */
-quo .reg %r4 /* quotient and lower part of dividend */
-dvr .reg %r5 /* divisor */
-tp .reg %r6 /* temp. reg. */
+;************************************************************************
+; Implement an integer divide routine for 32-bit operands and 32-bit quotient
+; and remainder with operand values of zero (divisor only) treated specially.
+;
+;****************************************************************************
+; Definitions
+;****************************************************************************
+;
+; General registers
+;
+gr0 .equ 0 ; General register zero
+rem .equ 3 ; remainder and upper part of dividend
+quo .equ 4 ; quotient and lower part of dividend
+dvr .equ 5 ; divisor
+tp .equ 6 ; temp. reg.
+;******************************************************************************
.text
-
-/*****************************************************************************/
LEAF_ENTRY(divu)
stws,ma rem,4(sp) ; save registers on stack
stws,ma quo,4(sp) ; save registers on stack
@@ -144,9 +120,9 @@ LEAF_ENTRY(divu)
;
; end of divide routine
;
-finish stws rem,0(arg3) ; save remainder in high part
+finish stws rem,0(arg3) ; save remainder in high part
; of result
- stws quo,4(arg3) ; save quotient in low part
+ stws quo,4(arg3) ; save quotient in low part
; of result
ldws,mb -4(sp),tp ; restore registers
ldws,mb -4(sp),dvr ; restore registers
@@ -166,8 +142,8 @@ nosub addi 0,0,0 ; otherwise clear carry
addib,> -1,tp,loop ; inc. counter; finished?
addc quo,quo,quo ; shift bit of result into dvdl
b finish+4 ; finish up
- stws rem,0(arg3) ; save remainder in high part
+ stws rem,0(arg3) ; save remainder in high part
; of result
-
EXIT(divu)
+
.end
diff --git a/sys/arch/hppa/spmath/divufr.c b/sys/arch/hppa/spmath/divufr.c
index 2ba867130e7..aaa98d60dbd 100644
--- a/sys/arch/hppa/spmath/divufr.c
+++ b/sys/arch/hppa/spmath/divufr.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: divufr.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: divufr.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)divufr.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:03 */
#include "md.h"
void
divufr(opnd1,opnd2,result)
-
-unsigned int opnd1, opnd2;
-struct mdsfu_register *result;
+ unsigned int opnd1, opnd2;
+ struct mdsfu_register *result;
{
/* check divisor for zero */
if (opnd2 == 0) {
@@ -63,5 +36,4 @@ struct mdsfu_register *result;
/* do the divide */
divu(opnd1,0,opnd2,result);
- return;
}
diff --git a/sys/arch/hppa/spmath/divuir.c b/sys/arch/hppa/spmath/divuir.c
index 42b56306b3d..1b46c9b700b 100644
--- a/sys/arch/hppa/spmath/divuir.c
+++ b/sys/arch/hppa/spmath/divuir.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: divuir.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: divuir.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)divuir.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:06 */
#include "md.h"
void
divuir(opnd1,opnd2,result)
-
-unsigned int opnd1, opnd2;
-struct mdsfu_register *result;
+ unsigned int opnd1, opnd2;
+ struct mdsfu_register *result;
{
/* get source operands, check divisor for zero */
if (opnd2 == 0) {
@@ -57,5 +30,4 @@ struct mdsfu_register *result;
/* do the divide */
divu(0,opnd1,opnd2,result);
- return;
}
diff --git a/sys/arch/hppa/spmath/fcnvff.c b/sys/arch/hppa/spmath/fcnvff.c
index 3d9ba849bb8..361849e6afc 100644
--- a/sys/arch/hppa/spmath/fcnvff.c
+++ b/sys/arch/hppa/spmath/fcnvff.c
@@ -1,48 +1,23 @@
-/* $OpenBSD: fcnvff.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: fcnvff.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)fcnvff.c: Revision: 2.8.88.1 Date: 93/12/07 15:06:09 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
-#include "../spmath/dbl_float.h"
-#include "../spmath/cnv_float.h"
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
/*
* Single Floating-point to Double Floating-point
@@ -50,10 +25,9 @@
/*ARGSUSED*/
int
sgl_to_dbl_fcnvff(srcptr,dstptr,status)
-
-sgl_floating_point *srcptr;
-dbl_floating_point *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr;
+ dbl_floating_point *dstptr;
+ unsigned int *status;
{
register unsigned int src, resultp1, resultp2;
register int src_exponent;
@@ -137,10 +111,9 @@ unsigned int *status;
/*ARGSUSED*/
int
dbl_to_sgl_fcnvff(srcptr,dstptr,status)
-
-dbl_floating_point *srcptr;
-sgl_floating_point *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr;
+ sgl_floating_point *dstptr;
+ unsigned int *status;
{
register unsigned int srcp1, srcp2, result;
register int src_exponent, dest_exponent, dest_mantissa;
diff --git a/sys/arch/hppa/spmath/fcnvfx.c b/sys/arch/hppa/spmath/fcnvfx.c
index c646d8dffaa..397596d8a9e 100644
--- a/sys/arch/hppa/spmath/fcnvfx.c
+++ b/sys/arch/hppa/spmath/fcnvfx.c
@@ -1,48 +1,23 @@
-/* $OpenBSD: fcnvfx.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: fcnvfx.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)fcnvfx.c: Revision: 2.8.88.2 Date: 93/12/08 13:27:29 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
-#include "../spmath/dbl_float.h"
-#include "../spmath/cnv_float.h"
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
/*
* Single Floating-point to Single Fixed-point
@@ -50,10 +25,9 @@
/*ARGSUSED*/
int
sgl_to_sgl_fcnvfx(srcptr,dstptr,status)
-
-sgl_floating_point *srcptr;
-int *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr;
+ int *dstptr;
+ unsigned int *status;
{
register unsigned int src, temp;
register int src_exponent, result;
@@ -69,12 +43,28 @@ unsigned int *status;
/* check for MININT */
if ((src_exponent > SGL_FX_MAX_EXP + 1) ||
Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
- /*
- * Since source is a number which cannot be
- * represented in fixed-point format, return
- * largest (or smallest) fixed-point number.
- */
- Sgl_return_overflow(src,dstptr);
+ if( Sgl_isnan(src) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Sgl_iszero_sign(src)) result = 0x7fffffff;
+ else result = 0x80000000;
+
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ *dstptr = result;
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
}
/*
@@ -146,10 +136,9 @@ unsigned int *status;
/*ARGSUSED*/
int
sgl_to_dbl_fcnvfx(srcptr,dstptr,status)
-
-sgl_floating_point *srcptr;
-dbl_integer *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr;
+ dbl_integer *dstptr;
+ unsigned int *status;
{
register int src_exponent, resultp1;
register unsigned int src, temp, resultp2;
@@ -165,12 +154,33 @@ unsigned int *status;
/* check for MININT */
if ((src_exponent > DBL_FX_MAX_EXP + 1) ||
Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
- /*
- * Since source is a number which cannot be
- * represented in fixed-point format, return
- * largest (or smallest) fixed-point number.
- */
- Sgl_return_overflow_dbl(src,dstptr);
+ if( Sgl_isnan(src) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Sgl_iszero_sign(src)) {
+ resultp1 = 0x7fffffff;
+ resultp2 = 0xffffffff;
+ }
+ else {
+ resultp1 = 0x80000000;
+ resultp2 = 0;
+ }
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ Dint_copytoptr(resultp1,resultp2,dstptr);
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
Dint_set_minint(resultp1,resultp2);
Dint_copytoptr(resultp1,resultp2,dstptr);
@@ -261,10 +271,9 @@ unsigned int *status;
/*ARGSUSED*/
int
dbl_to_sgl_fcnvfx(srcptr,dstptr,status)
-
-dbl_floating_point *srcptr;
-int *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr;
+ int *dstptr;
+ unsigned int *status;
{
register unsigned int srcp1,srcp2, tempp1,tempp2;
register int src_exponent, result;
@@ -279,12 +288,28 @@ unsigned int *status;
if (src_exponent > SGL_FX_MAX_EXP) {
/* check for MININT */
if (Dbl_isoverflow_to_int(src_exponent,srcp1,srcp2)) {
- /*
- * Since source is a number which cannot be
- * represented in fixed-point format, return
- * largest (or smallest) fixed-point number.
- */
- Dbl_return_overflow(srcp1,srcp2,dstptr);
+ if( Dbl_isnan(srcp1,srcp2) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff;
+ else result = 0x80000000;
+
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ *dstptr = result;
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
}
/*
@@ -305,23 +330,41 @@ unsigned int *status;
/* round result */
switch (Rounding_mode()) {
case ROUNDPLUS:
- if (Dbl_iszero_sign(srcp1)) result++;
- break;
+ if (Dbl_iszero_sign(srcp1))
+ result++;
+ break;
case ROUNDMINUS:
- if (Dbl_isone_sign(srcp1)) result--;
- break;
+ if (Dbl_isone_sign(srcp1)) result--;
+ break;
case ROUNDNEAREST:
- if (Dbl_isone_roundbit(srcp1,srcp2,src_exponent))
+ if (Dbl_isone_roundbit(srcp1,srcp2,src_exponent))
if (Dbl_isone_stickybit(srcp1,srcp2,src_exponent) ||
(Dbl_isone_lowmantissap1(tempp1))) {
- if (Dbl_iszero_sign(srcp1)) result++;
- else result--;
+ if (Dbl_iszero_sign(srcp1)) result++;
+ else result--;
}
}
/* check for overflow */
if ((Dbl_iszero_sign(srcp1) && result < 0) ||
(Dbl_isone_sign(srcp1) && result > 0)) {
- Dbl_return_overflow(srcp1,srcp2,dstptr);
+
+ if (Dbl_iszero_sign(srcp1))
+ result = 0x7fffffff;
+ else
+ result = 0x80000000;
+
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ *dstptr = result;
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
}
}
}
@@ -334,16 +377,16 @@ unsigned int *status;
/* round result */
switch (Rounding_mode()) {
case ROUNDPLUS:
- if (Dbl_iszero_sign(srcp1)) result++;
- break;
+ if (Dbl_iszero_sign(srcp1)) result++;
+ break;
case ROUNDMINUS:
- if (Dbl_isone_sign(srcp1)) result--;
- break;
+ if (Dbl_isone_sign(srcp1)) result--;
+ break;
case ROUNDNEAREST:
- if (src_exponent == -1)
+ if (src_exponent == -1)
if (Dbl_isnotzero_mantissa(srcp1,srcp2)) {
- if (Dbl_iszero_sign(srcp1)) result++;
- else result--;
+ if (Dbl_iszero_sign(srcp1)) result++;
+ else result--;
}
}
}
@@ -362,10 +405,9 @@ unsigned int *status;
/*ARGSUSED*/
int
dbl_to_dbl_fcnvfx(srcptr,dstptr,status)
-
-dbl_floating_point *srcptr;
-dbl_integer *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr;
+ dbl_integer *dstptr;
+ unsigned int *status;
{
register int src_exponent, resultp1;
register unsigned int srcp1, srcp2, tempp1, tempp2, resultp2;
@@ -381,12 +423,33 @@ unsigned int *status;
/* check for MININT */
if ((src_exponent > DBL_FX_MAX_EXP + 1) ||
Dbl_isnotzero_mantissa(srcp1,srcp2) || Dbl_iszero_sign(srcp1)) {
- /*
- * Since source is a number which cannot be
- * represented in fixed-point format, return
- * largest (or smallest) fixed-point number.
- */
- Dbl_return_overflow_dbl(srcp1,srcp2,dstptr);
+ if( Dbl_isnan(srcp1,srcp2) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Dbl_iszero_sign(srcp1)) {
+ resultp1 = 0x7fffffff;
+ resultp2 = 0xffffffff;
+ }
+ else {
+ resultp1 = 0x80000000;
+ resultp2 = 0;
+ }
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ Dint_copytoptr(resultp1,resultp2,dstptr);
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
}
diff --git a/sys/arch/hppa/spmath/fcnvfxt.c b/sys/arch/hppa/spmath/fcnvfxt.c
index e20be8b112a..dad618df8c7 100644
--- a/sys/arch/hppa/spmath/fcnvfxt.c
+++ b/sys/arch/hppa/spmath/fcnvfxt.c
@@ -1,48 +1,23 @@
-/* $OpenBSD: fcnvfxt.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: fcnvfxt.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)fcnvfxt.c: Revision: 2.8.88.2 Date: 93/12/08 13:27:34 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
-#include "../spmath/dbl_float.h"
-#include "../spmath/cnv_float.h"
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
/*
* Convert single floating-point to single fixed-point format
@@ -51,10 +26,9 @@
/*ARGSUSED*/
int
sgl_to_sgl_fcnvfxt(srcptr,dstptr,status)
-
-sgl_floating_point *srcptr;
-int *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr;
+ int *dstptr;
+ unsigned int *status;
{
register unsigned int src, temp;
register int src_exponent, result;
@@ -69,12 +43,28 @@ unsigned int *status;
/* check for MININT */
if ((src_exponent > SGL_FX_MAX_EXP + 1) ||
Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
- /*
- * Since source is a number which cannot be
- * represented in fixed-point format, return
- * largest (or smallest) fixed-point number.
- */
- Sgl_return_overflow(src,dstptr);
+ if( Sgl_isnan(src) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Sgl_iszero_sign(src)) result = 0x7fffffff;
+ else result = 0x80000000;
+
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ *dstptr = result;
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
}
/*
@@ -112,10 +102,9 @@ unsigned int *status;
/*ARGSUSED*/
int
sgl_to_dbl_fcnvfxt(srcptr,dstptr,status)
-
-sgl_floating_point *srcptr;
-dbl_integer *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr;
+ dbl_integer *dstptr;
+ unsigned int *status;
{
register int src_exponent, resultp1;
register unsigned int src, temp, resultp2;
@@ -130,12 +119,33 @@ unsigned int *status;
/* check for MININT */
if ((src_exponent > DBL_FX_MAX_EXP + 1) ||
Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
- /*
- * Since source is a number which cannot be
- * represented in fixed-point format, return
- * largest (or smallest) fixed-point number.
- */
- Sgl_return_overflow_dbl(src,dstptr);
+ if( Sgl_isnan(src) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Sgl_iszero_sign(src)) {
+ resultp1 = 0x7fffffff;
+ resultp2 = 0xffffffff;
+ }
+ else {
+ resultp1 = 0x80000000;
+ resultp2 = 0;
+ }
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ Dint_copytoptr(resultp1,resultp2,dstptr);
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
Dint_set_minint(resultp1,resultp2);
Dint_copytoptr(resultp1,resultp2,dstptr);
@@ -178,10 +188,9 @@ unsigned int *status;
/*ARGSUSED*/
int
dbl_to_sgl_fcnvfxt(srcptr,dstptr,status)
-
-dbl_floating_point *srcptr;
-int *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr;
+ int *dstptr;
+ unsigned int *status;
{
register unsigned int srcp1, srcp2, tempp1, tempp2;
register int src_exponent, result;
@@ -195,7 +204,28 @@ unsigned int *status;
if (src_exponent > SGL_FX_MAX_EXP) {
/* check for MININT */
if (Dbl_isoverflow_to_int(src_exponent,srcp1,srcp2)) {
- Dbl_return_overflow(srcp1,srcp2,dstptr);
+ if( Dbl_isnan(srcp1,srcp2) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff;
+ else result = 0x80000000;
+
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ *dstptr = result;
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
}
/*
@@ -235,10 +265,9 @@ unsigned int *status;
/*ARGSUSED*/
int
dbl_to_dbl_fcnvfxt(srcptr,dstptr,status)
-
-dbl_floating_point *srcptr;
-dbl_integer *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr;
+ dbl_integer *dstptr;
+ unsigned int *status;
{
register int src_exponent, resultp1;
register unsigned int srcp1, srcp2, tempp1, tempp2, resultp2;
@@ -253,12 +282,33 @@ unsigned int *status;
/* check for MININT */
if ((src_exponent > DBL_FX_MAX_EXP + 1) ||
Dbl_isnotzero_mantissa(srcp1,srcp2) || Dbl_iszero_sign(srcp1)) {
- /*
- * Since source is a number which cannot be
- * represented in fixed-point format, return
- * largest (or smallest) fixed-point number.
- */
- Dbl_return_overflow_dbl(srcp1,srcp2,dstptr);
+ if( Dbl_isnan(srcp1,srcp2) )
+ /*
+ * On NaN go unimplemented.
+ */
+ return(UNIMPLEMENTEDEXCEPTION);
+ else {
+ if (Dbl_iszero_sign(srcp1)) {
+ resultp1 = 0x7fffffff;
+ resultp2 = 0xffffffff;
+ }
+ else {
+ resultp1 = 0x80000000;
+ resultp2 = 0;
+ }
+ if (Is_overflowtrap_enabled()) {
+ if (Is_inexacttrap_enabled())
+ return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(OVERFLOWEXCEPTION);
+ }
+ Set_overflowflag();
+ Dint_copytoptr(resultp1,resultp2,dstptr);
+ if (Is_inexacttrap_enabled() )
+ return(INEXACTEXCEPTION);
+ else Set_inexactflag();
+ return(NOEXCEPTION);
+ }
}
}
/*
diff --git a/sys/arch/hppa/spmath/fcnvxf.c b/sys/arch/hppa/spmath/fcnvxf.c
index d80705e8ee0..683f89d2aa3 100644
--- a/sys/arch/hppa/spmath/fcnvxf.c
+++ b/sys/arch/hppa/spmath/fcnvxf.c
@@ -1,58 +1,32 @@
-/* $OpenBSD: fcnvxf.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: fcnvxf.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)fcnvxf.c: Revision: 2.7.88.1 Date: 93/12/07 15:06:16 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
-#include "../spmath/dbl_float.h"
-#include "../spmath/cnv_float.h"
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
/*
* Convert single fixed-point to single floating-point format
*/
int
sgl_to_sgl_fcnvxf(srcptr,dstptr,status)
-
-int *srcptr;
-sgl_floating_point *dstptr;
-unsigned int *status;
+ int *srcptr;
+ sgl_floating_point *dstptr;
+ unsigned int *status;
{
register int src, dst_exponent;
register unsigned int result = 0;
@@ -119,10 +93,9 @@ unsigned int *status;
*/
int
sgl_to_dbl_fcnvxf(srcptr,dstptr,status)
-
-int *srcptr;
-dbl_floating_point *dstptr;
-unsigned int *status;
+ int *srcptr;
+ dbl_floating_point *dstptr;
+ unsigned int *status;
{
register int src, dst_exponent;
register unsigned int resultp1 = 0, resultp2 = 0;
@@ -169,10 +142,9 @@ unsigned int *status;
*/
int
dbl_to_sgl_fcnvxf(srcptr,dstptr,status)
-
-dbl_integer *srcptr;
-sgl_floating_point *dstptr;
-unsigned int *status;
+ dbl_integer *srcptr;
+ sgl_floating_point *dstptr;
+ unsigned int *status;
{
int dst_exponent, srcp1;
unsigned int result = 0, srcp2;
@@ -273,10 +245,9 @@ unsigned int *status;
*/
int
dbl_to_dbl_fcnvxf(srcptr,dstptr,status)
-
-dbl_integer *srcptr;
-dbl_floating_point *dstptr;
-unsigned int *status;
+ dbl_integer *srcptr;
+ dbl_floating_point *dstptr;
+ unsigned int *status;
{
register int srcp1, dst_exponent;
register unsigned int srcp2, resultp1 = 0, resultp2 = 0;
diff --git a/sys/arch/hppa/spmath/float.h b/sys/arch/hppa/spmath/float.h
index a84651605a6..700cbe05253 100644
--- a/sys/arch/hppa/spmath/float.h
+++ b/sys/arch/hppa/spmath/float.h
@@ -1,47 +1,22 @@
-/* $OpenBSD: float.h,v 1.4 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
+/* $OpenBSD: float.h,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)float.h: Revision: 2.14.88.2 Date: 93/12/08 13:27:42 */
#include <machine/float.h>
-
-#include "../spmath/fpbits.h"
-#include "../spmath/hppa.h"
+#include "fpbits.h"
+#include "hppa.h"
/*
* Declare the basic structures for the 3 different
diff --git a/sys/arch/hppa/spmath/fpbits.h b/sys/arch/hppa/spmath/fpbits.h
index bc1f38c0413..739035d0671 100644
--- a/sys/arch/hppa/spmath/fpbits.h
+++ b/sys/arch/hppa/spmath/fpbits.h
@@ -1,42 +1,18 @@
-/* $OpenBSD: fpbits.h,v 1.4 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
+/* $OpenBSD: fpbits.h,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)fpbits.h: Revision: 1.6.88.1 Date: 93/12/07 15:06:21 */
/*
* These macros are designed to be portable to all machines that have
diff --git a/sys/arch/hppa/spmath/frnd.c b/sys/arch/hppa/spmath/frnd.c
index 656c0171d9b..2bada11d1b8 100644
--- a/sys/arch/hppa/spmath/frnd.c
+++ b/sys/arch/hppa/spmath/frnd.c
@@ -1,49 +1,24 @@
-/* $OpenBSD: frnd.c,v 1.5 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: frnd.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)frnd.c: Revision: 2.7.88.1 Date: 93/12/07 15:06:24 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
-#include "../spmath/dbl_float.h"
-#include "../spmath/quad_float.h"
-#include "../spmath/cnv_float.h"
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "quad_float.h"
+#include "cnv_float.h"
/*
* Single Floating-point Round to Integer
@@ -52,9 +27,8 @@
/*ARGSUSED*/
int
sgl_frnd(srcptr,dstptr,status)
-
-sgl_floating_point *srcptr, *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr, *dstptr;
+ unsigned int *status;
{
register unsigned int src, result;
register int src_exponent;
@@ -156,9 +130,8 @@ unsigned int *status;
/*ARGSUSED*/
int
dbl_frnd(srcptr,dstptr,status)
-
-dbl_floating_point *srcptr, *dstptr;
-unsigned int *status;
+ dbl_floating_point *srcptr, *dstptr;
+ unsigned int *status;
{
register unsigned int srcp1, srcp2, resultp1, resultp2;
register int src_exponent;
@@ -259,9 +232,8 @@ unsigned int *status;
/*ARGSUSED*/
int
quad_frnd(srcptr,dstptr,status)
-
-quad_floating_point *srcptr, *dstptr;
-unsigned int *status;
+ quad_floating_point *srcptr, *dstptr;
+ unsigned int *status;
{
return(UNIMPLEMENTEDEXCEPTION);
}
diff --git a/sys/arch/hppa/spmath/hppa.h b/sys/arch/hppa/spmath/hppa.h
index e9cf4f0064d..216f5057521 100644
--- a/sys/arch/hppa/spmath/hppa.h
+++ b/sys/arch/hppa/spmath/hppa.h
@@ -1,42 +1,18 @@
-/* $OpenBSD: hppa.h,v 1.4 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: hppa.h,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)hppa.h: Revision: 2.7.88.1 Date: 93/12/07 15:06:26 */
/* amount is assumed to be a constant between 0 and 32 (non-inclusive) */
#define Shiftdouble(left,right,amount,dest) \
diff --git a/sys/arch/hppa/spmath/impys.S b/sys/arch/hppa/spmath/impys.S
index b1f1287c528..10ba5f98a1d 100644
--- a/sys/arch/hppa/spmath/impys.S
+++ b/sys/arch/hppa/spmath/impys.S
@@ -1,69 +1,45 @@
-/* $OpenBSD: impys.S,v 1.6 2002/01/04 08:50:30 miod Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: impys.S,v 1.7 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)impys.s: Revision: 1.11.88.1 Date: 93/12/07 15:06:28 */
#include <machine/asm.h>
-/****************************************************************************
- *
- * Implement an integer multiply routine for 32-bit operands and 64-bit product
- * with operand values of zero (multiplicand only) and -2**31 treated specially.
- * The algorithm uses the absolute value of the multiplier, four bits at a time,
- * from right to left, to generate partial product. Execution speed is more
- * important than program size in this implementation.
- *
- ***************************************************************************/
-/*
- * Definitions - General registers
- */
-gr0 .equ 0 /* General register zero */
-pu .equ 3 /* upper part of product */
-pl .equ 4 /* lower part of product */
-op2 .equ 4 /* multiplier */
-op1 .equ 5 /* multiplicand */
-cnt .equ 6 /* count in multiply */
-brindex .equ 7 /* index into the br. table */
-sign .equ 8 /* sign of product */
-pc .equ 9 /* carry bit of product, = 00...01 */
-pm .equ 10 /* value of -1 used in shifting */
+;****************************************************************************
+;
+;Implement an integer multiply routine for 32-bit operands and 64-bit product
+;with operand values of zero (multiplicand only) and -2**31 treated specially.
+;The algorithm uses the absolute value of the multiplier, four bits at a time,
+;from right to left, to generate partial product. Execution speed is more
+;important than program size in this implementation.
+;
+;****************************************************************************
+;
+; Definitions - General registers
+;
+gr0 .equ 0 ; General register zero
+pu .equ 3 ; upper part of product
+pl .equ 4 ; lower part of product
+op2 .equ 4 ; multiplier
+op1 .equ 5 ; multiplicand
+cnt .equ 6 ; count in multiply
+brindex .equ 7 ; index into the br. table
+sign .equ 8 ; sign of product
+pc .equ 9 ; carry bit of product, = 00...01
+pm .equ 10 ; value of -1 used in shifting
+;*****************************************************************************
.text
LEAF_ENTRY(impys)
@@ -88,14 +64,14 @@ mpy1 comb,< op1,gr0,mpya ; br. if multiplicand < 0
addib,= 0,op1,fini0 ; op1 = 0, product = 0
mpy2 addi 1,gr0,pc ; initialize pc to 00...01
movib,tr 8,cnt,mloop ; set count for mpy loop
- extru op2,31,4,brindex ; 4 bits as index into table
+ extru op2,31,4,brindex ; 4 bits as index into table
;
.align 8
;
b sh4c ; br. if sign overflow
sh4n shd pu,pl,4,pl ; shift product right 4 bits
addib,<= -1,cnt,mulend ; reduce count by 1, exit if
- extru pu,27,28,pu ; <= zero
+ extru pu,27,28,pu ; <= zero
;
mloop blr brindex,gr0 ; br. into table
; entries of 2 words
@@ -118,13 +94,13 @@ mtable ; two words per entry
;
; ---- bits = 0010 ---- add op1, add op1, then shift 4 bits
;
- addb,tr op1,pu,sh4n ; add 2*op1, to shift
- addb,uv op1,pu,sh4c ; product right 4 bits
+ addb,tr op1,pu,sh4n ; add 2*op1, to shift
+ addb,uv op1,pu,sh4c ; product right 4 bits
;
; ---- bits = 0011 ---- add op1, add 2*op1, shift 4 bits
;
- addb,tr op1,pu,sh4n-4 ; add op1 & 2*op1, shift
- sh1add,nsv op1,pu,pu ; product right 4 bits
+ addb,tr op1,pu,sh4n-4 ; add op1 & 2*op1, shift
+ sh1add,nsv op1,pu,pu ; product right 4 bits
;
; ---- bits = 0100 ---- shift 2, add op1, shift 2
;
@@ -207,21 +183,21 @@ sh4c addib,> -1,cnt,mloop ; decrement count, loop if > 0
mpyb add,= op2,op2,gr0 ; if <> 0, back to main sect.
b mpy1
sub 0,op2,op2 ; op2 = |multiplier|
- add,>= op1,gr0,gr0 ; if op1 < 0, invert sign,
+ add,>= op1,gr0,gr0 ; if op1 < 0, invert sign,
xor pm,sign,sign ; for correct result
;
; special case for multiplier = -2**31, op1 = signed multiplicand
; or multiplicand = -2**31, op1 = signed multiplier
;
shd op1,0,1,pl ; shift op1 left 31 bits
-mmax extrs op1,30,31,pu
+mmax extrs op1,30,31,pu
b signs ; negate product (if needed)
bb,>=,n sign,0,fini ; test sign of product
;
mpya add,= op1,op1,gr0 ; op1 = -2**31, special case
b mpy2
sub 0,op1,op1 ; op1 = |multiplicand|
- add,>= op2,gr0,gr0 ; if op2 < 0, invert sign,
+ add,>= op2,gr0,gr0 ; if op2 < 0, invert sign,
xor pm,sign,sign ; for correct result
movb,tr op2,op1,mmax ; use op2 as multiplicand
shd op1,0,1,pl ; shift it left 31 bits
@@ -252,8 +228,8 @@ sh1 addib,> -1,cnt,mloop ; loop if count > 0
sh2ns addib,tr 1,brindex,sh2sb+4 ; increment index
extru pu,29,30,pu ; shift unsigned
;
-sh2s shd pu,pl,2,pl ; shift with minus sign
- shd pm,pu,2,pu ;
+sh2s shd pu,pl,2,pl ; shift with minus sign
+ shd pm,pu,2,pu ;
sub pu,op1,pu ; subtract op1
shd pu,pl,2,pl ; shift with minus sign
addib,tr -1,cnt,mloop ; decrement count, loop
@@ -279,7 +255,7 @@ sh2us extru pu,29,30,pu ; shift 2 unsigned
addb,tr op1,pu,sh2a ; add op1
shd pu,pl,2,pl ; shift 2 bits
;
-sh2c shd pu,pl,2,pl
+sh2c shd pu,pl,2,pl
shd pc,pu,2,pu ; shift with carry
addb,tr op1,pu,sh2a ; add op1 to product
shd pu,pl,2,pl ; br. to sh2 to shift pu
@@ -309,6 +285,6 @@ fini stws pu,0(arg2) ; save high part of result
ldws,mb -4(sp),pl ; restore registers
bv 0(rp) ; return
ldws,mb -4(sp),pu ; restore registers
+EXIT(imyps)
-EXIT(impys)
.end
diff --git a/sys/arch/hppa/spmath/impyu.S b/sys/arch/hppa/spmath/impyu.S
index 623d47513dd..89475dadf45 100644
--- a/sys/arch/hppa/spmath/impyu.S
+++ b/sys/arch/hppa/spmath/impyu.S
@@ -1,55 +1,30 @@
-/* $OpenBSD: impyu.S,v 1.6 2002/02/04 23:04:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: impyu.S,v 1.7 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)impyu.s: Revision: 1.11.88.1 Date: 93/12/07 15:06:31 */
#include <machine/asm.h>
-/****************************************************************************
- *
- *Implement an integer multiply routine for 32-bit operands and 64-bit product
- * with operand values of zero (multiplicand only) and 2**32reated specially.
- * The algorithm uses the multiplier, four bits at a time, from right to left,
- * to generate partial product. Execution speed is more important than program
- * size in this implementation.
- *
- *****************************************************************************/
+;****************************************************************************
+;
+;Implement an integer multiply routine for 32-bit operands and 64-bit product
+; with operand values of zero (multiplicand only) and 2**32reated specially.
+; The algorithm uses the multiplier, four bits at a time, from right to left,
+; to generate partial product. Execution speed is more important than program
+; size in this implementation.
+;
+;******************************************************************************
;
; Definitions - General registers
;
@@ -60,12 +35,14 @@ op2 .equ 4 ; multiplier
op1 .equ 5 ; multiplicand
cnt .equ 6 ; count in multiply
brindex .equ 7 ; index into the br. table
-saveop2 .equ 8 ; save op2 if high bit of multiplicand
+saveop2 .equ 8 ; save op2 if high bit of multiplicand
; is set
pc .equ 9 ; carry bit of product, = 00...01
pm .equ 10 ; value of -1 used in shifting
temp .equ 6
+;****************************************************************************
+ .text
LEAF_ENTRY(impyu)
stws,ma pu,4(sp) ; save registers on stack
stws,ma pl,4(sp) ; save registers on stack
@@ -92,20 +69,20 @@ LEAF_ENTRY(impyu)
b mpy1 ; if op1 < 2**32, start multiply
add op2,gr0,saveop2 ; save op2 in saveop2
shd gr0,op2,1,pu ; shift op2 left 31 for result
- b fini ; go to finish
+ b fini ; go to finish
shd op2,gr0,1,pl
;
-mpy1 addi -1,gr0,pm ; initialize pm to 111...1
+mpy1 addi -1,gr0,pm ; initialize pm to 111...1
addi 1,gr0,pc ; initialize pc to 00...01
movib,tr 8,cnt,mloop ; set count for mpy loop
- extru op2,31,4,brindex ; 4 bits as index into table
+ extru op2,31,4,brindex ; 4 bits as index into table
;
.align 8
;
b sh4c ; br. if sign overflow
sh4n shd pu,pl,4,pl ; shift product right 4 bits
addib,<= -1,cnt,mulend ; reduce count by 1, exit if
- extru pu,27,28,pu ; <= zero
+ extru pu,27,28,pu ; <= zero
;
mloop blr brindex,gr0 ; br. into table
; entries of 2 words
@@ -128,13 +105,13 @@ mtable ; two words per entry
;
; ---- bits = 0010 ---- add op1, add op1, then shift 4 bits
;
- addb,tr op1,pu,sh4n ; add 2*op1, to shift
- addb,uv op1,pu,sh4c ; product right 4 bits
+ addb,tr op1,pu,sh4n ; add 2*op1, to shift
+ addb,uv op1,pu,sh4c ; product right 4 bits
;
; ---- bits = 0011 ---- add op1, add 2*op1, shift 4 bits
;
- addb,tr op1,pu,sh4n-4 ; add op1 & 2*op1, shift
- sh1add,nuv op1,pu,pu ; product right 4 bits
+ addb,tr op1,pu,sh4n-4 ; add op1 & 2*op1, shift
+ sh1add,nuv op1,pu,pu ; product right 4 bits
;
; ---- bits = 0100 ---- shift 2, add op1, shift 2
;
@@ -242,8 +219,8 @@ sh1 addib,> -1,cnt,mloop ; loop if count > 0
sh2ns addib,tr 1,brindex,sh2sb+4 ; increment index
extru pu,29,30,pu ; shift unsigned
;
-sh2s shd pu,pl,2,pl ; shift with minus sign
- shd pm,pu,2,pu ;
+sh2s shd pu,pl,2,pl ; shift with minus sign
+ shd pm,pu,2,pu ;
sub pu,op1,pu ; subtract op1
shd pu,pl,2,pl ; shift with minus sign
addib,> -1,cnt,mloop ; decrement count, loop if > 0
@@ -263,7 +240,7 @@ sh1sa extrs pu,30,31,pu ; signed
sub pu,op1,pu ; subtract op1 from product
shd pu,pl,3,pl ; shift 3 with minus sign
addib,> -1,cnt,mloop ; decrement count, loop if >0
- shd pm,pu,3,pu
+ shd pm,pu,3,pu
addb,tr op1,pu,lastadd ; do one more add, then finish
addb,=,n saveop2,gr0,fini ; check saveop2
;
@@ -274,7 +251,7 @@ sh2us extru pu,29,30,pu ; shift 2 unsigned
addb,tr op1,pu,sh2a ; add op1
shd pu,pl,2,pl ; shift 2 bits
;
-sh2c shd pu,pl,2,pl
+sh2c shd pu,pl,2,pl
shd pc,pu,2,pu ; shift with carry
addb,tr op1,pu,sh2a ; add op1 to product
shd pu,pl,2,pl ; br. to sh2 to shift pu
@@ -306,7 +283,6 @@ fini stws pu,0(arg2) ; save high part of result
ldws,mb -4(sp),pl ; restore registers
bv 0(rp) ; return
ldws,mb -4(sp),pu ; restore registers
-
-EXIT(impyu)
+EXIT(impu)
.end
diff --git a/sys/arch/hppa/spmath/md.h b/sys/arch/hppa/spmath/md.h
index 9e7624a2732..b703479add6 100644
--- a/sys/arch/hppa/spmath/md.h
+++ b/sys/arch/hppa/spmath/md.h
@@ -1,43 +1,18 @@
-/* $OpenBSD: md.h,v 1.5 2002/03/14 01:26:32 millert Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: md.h,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)md.h: Revision: 1.8.88.1 Date: 93/12/07 15:06:33 */
#include <sys/cdefs.h>
diff --git a/sys/arch/hppa/spmath/mpyaccs.c b/sys/arch/hppa/spmath/mpyaccs.c
index 86bbf112ac8..f6c37fa47c2 100644
--- a/sys/arch/hppa/spmath/mpyaccs.c
+++ b/sys/arch/hppa/spmath/mpyaccs.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: mpyaccs.c,v 1.4 2001/03/29 03:58:18 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: mpyaccs.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)mpyaccs.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:39 */
#include "md.h"
void
mpyaccs(opnd1,opnd2,result)
-
-int opnd1, opnd2;
-struct mdsfu_register *result;
+ int opnd1, opnd2;
+ struct mdsfu_register *result;
{
struct mdsfu_register temp;
int carry, sign;
@@ -56,12 +29,12 @@ struct mdsfu_register *result;
/* get result of low word add, and check for carry out */
if ((result_lo += (unsigned)temp.rslt_lo) < (unsigned)temp.rslt_lo)
carry = 1;
- else carry = 0;
+ else
+ carry = 0;
/* get result of high word add, and determine overflow status */
sign = result_hi ^ temp.rslt_hi;
result_hi += temp.rslt_hi + carry;
- if (sign >= 0 && (temp.rslt_hi ^ result_hi) < 0) overflow = TRUE;
-
- return;
+ if (sign >= 0 && (temp.rslt_hi ^ result_hi) < 0)
+ overflow = TRUE;
}
diff --git a/sys/arch/hppa/spmath/mpyaccu.c b/sys/arch/hppa/spmath/mpyaccu.c
index f0f27a559dc..9c5c6b2b79f 100644
--- a/sys/arch/hppa/spmath/mpyaccu.c
+++ b/sys/arch/hppa/spmath/mpyaccu.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: mpyaccu.c,v 1.5 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: mpyaccu.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)mpyaccu.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:41 */
#include "md.h"
void
mpyaccu(opnd1,opnd2,result)
-
-unsigned int opnd1, opnd2;
-struct mdsfu_register *result;
+ unsigned int opnd1, opnd2;
+ struct mdsfu_register *result;
{
struct mdsfu_register temp;
int carry;
@@ -56,11 +29,11 @@ struct mdsfu_register *result;
/* get result of low word add, and check for carry out */
if ((result_lo += (unsigned)temp.rslt_lo) < (unsigned)temp.rslt_lo)
carry = 1;
- else carry = 0;
+ else
+ carry = 0;
/* get result of high word add, and determine overflow status */
if ((result_hi += (unsigned)temp.rslt_hi + carry) <
- (unsigned)temp.rslt_hi) overflow = TRUE;
-
- return;
+ (unsigned)temp.rslt_hi)
+ overflow = TRUE;
}
diff --git a/sys/arch/hppa/spmath/mpys.c b/sys/arch/hppa/spmath/mpys.c
index e8ec579dcbe..1541ab3198f 100644
--- a/sys/arch/hppa/spmath/mpys.c
+++ b/sys/arch/hppa/spmath/mpys.c
@@ -1,58 +1,32 @@
-/* $OpenBSD: mpys.c,v 1.5 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: mpys.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)mpys.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:43 */
#include "md.h"
void
mpys(opnd1,opnd2,result)
-
-int opnd1, opnd2;
-struct mdsfu_register *result;
+ int opnd1, opnd2;
+ struct mdsfu_register *result;
{
impys(&opnd1,&opnd2,result);
/* determine overflow status */
if ((result_hi == 0 && result_lo >= 0) ||
- (result_hi == -1 && result_lo < 0)) overflow = FALSE;
- else overflow = TRUE;
- return;
+ (result_hi == -1 && result_lo < 0))
+ overflow = FALSE;
+ else
+ overflow = TRUE;
}
diff --git a/sys/arch/hppa/spmath/mpyscv.c b/sys/arch/hppa/spmath/mpyscv.c
index 5f75e311dd5..12a95c44ccc 100644
--- a/sys/arch/hppa/spmath/mpyscv.c
+++ b/sys/arch/hppa/spmath/mpyscv.c
@@ -1,54 +1,26 @@
-/* $OpenBSD: mpyscv.c,v 1.5 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: mpyscv.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)mpyscv.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:45 */
#include "md.h"
void
mpyscv(opnd1,opnd2,result)
-
-int opnd1, opnd2;
-struct mdsfu_register *result;
+ int opnd1, opnd2;
+ struct mdsfu_register *result;
{
impys(&opnd1,&opnd2,result);
overflow = FALSE;
- return;
}
diff --git a/sys/arch/hppa/spmath/mpyu.c b/sys/arch/hppa/spmath/mpyu.c
index 46fbcbf7934..5de03eb55d8 100644
--- a/sys/arch/hppa/spmath/mpyu.c
+++ b/sys/arch/hppa/spmath/mpyu.c
@@ -1,52 +1,25 @@
-/* $OpenBSD: mpyu.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: mpyu.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)mpyu.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:48 */
#include "md.h"
void
mpyu(opnd1,opnd2,result)
-
-unsigned int opnd1, opnd2;
-struct mdsfu_register *result;
+ unsigned int opnd1, opnd2;
+ struct mdsfu_register *result;
{
impyu(&opnd1,&opnd2,result);
/* determine overflow status */
diff --git a/sys/arch/hppa/spmath/mpyucv.c b/sys/arch/hppa/spmath/mpyucv.c
index 2050e2eccad..7edd16a4e76 100644
--- a/sys/arch/hppa/spmath/mpyucv.c
+++ b/sys/arch/hppa/spmath/mpyucv.c
@@ -1,54 +1,26 @@
-/* $OpenBSD: mpyucv.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: mpyucv.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)mpyucv.c: Revision: 1.6.88.1 Date: 93/12/07 15:06:50 */
#include "md.h"
void
mpyucv(opnd1,opnd2,result)
-
-unsigned int opnd1, opnd2;
-struct mdsfu_register *result;
+ unsigned int opnd1, opnd2;
+ struct mdsfu_register *result;
{
impyu(&opnd1,&opnd2,result);
overflow = FALSE;
- return;
}
diff --git a/sys/arch/hppa/spmath/quad_float.h b/sys/arch/hppa/spmath/quad_float.h
index d382958148f..a0a6da4434e 100644
--- a/sys/arch/hppa/spmath/quad_float.h
+++ b/sys/arch/hppa/spmath/quad_float.h
@@ -1,43 +1,18 @@
-/* $OpenBSD: quad_float.h,v 1.6 2002/03/14 01:26:32 millert Exp $ */
-
+/* $OpenBSD: quad_float.h,v 1.7 2002/05/07 22:19:30 mickey Exp $ */
/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)quad_float.h: Revision: 1.7.88.1 Date: 93/12/07 15:06:55 */
/******************************
* Quad precision functions *
diff --git a/sys/arch/hppa/spmath/setovfl.c b/sys/arch/hppa/spmath/setovfl.c
index 55d30750c9e..e829a317bc5 100644
--- a/sys/arch/hppa/spmath/setovfl.c
+++ b/sys/arch/hppa/spmath/setovfl.c
@@ -1,52 +1,27 @@
-/* $OpenBSD: setovfl.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: setovfl.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)setovfl.c: Revision: 1.7.88.1 Date: 93/12/07 15:06:57 */
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
-#include "../spmath/dbl_float.h"
-
-sgl_floating_point sgl_setoverflow(sign)
-
-unsigned int sign;
+/*ARGSUSED*/
+sgl_floating_point
+sgl_setoverflow(sign)
+ unsigned int sign;
{
sgl_floating_point result;
@@ -79,9 +54,10 @@ unsigned int sign;
return(result);
}
-dbl_floating_point dbl_setoverflow(sign)
-
-unsigned int sign;
+/*ARGSUSED*/
+dbl_floating_point
+dbl_setoverflow(sign)
+ unsigned int sign;
{
dbl_floating_point result;
diff --git a/sys/arch/hppa/spmath/sfadd.c b/sys/arch/hppa/spmath/sfadd.c
index 98afffe8929..a55fcdba9bd 100644
--- a/sys/arch/hppa/spmath/sfadd.c
+++ b/sys/arch/hppa/spmath/sfadd.c
@@ -1,46 +1,21 @@
-/* $OpenBSD: sfadd.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: sfadd.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sfadd.c: Revision: 2.7.88.1 Date: 93/12/07 15:07:00 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
+#include "float.h"
+#include "sgl_float.h"
/*
* Single_add: add two single precision values.
@@ -49,7 +24,7 @@ int
sgl_fadd(leftptr, rightptr, dstptr, status)
sgl_floating_point *leftptr, *rightptr, *dstptr;
unsigned int *status;
- {
+{
register unsigned int left, right, result, extent;
register unsigned int signless_upper_left, signless_upper_right, save;
@@ -515,4 +490,4 @@ sgl_fadd(leftptr, rightptr, dstptr, status)
else Set_inexactflag();
}
return(NOEXCEPTION);
- }
+}
diff --git a/sys/arch/hppa/spmath/sfcmp.c b/sys/arch/hppa/spmath/sfcmp.c
index ec9aca6cf62..89133920823 100644
--- a/sys/arch/hppa/spmath/sfcmp.c
+++ b/sys/arch/hppa/spmath/sfcmp.c
@@ -1,47 +1,22 @@
-/* $OpenBSD: sfcmp.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: sfcmp.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
-
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sfcmp.c: Revision: 1.7.88.2 Date: 93/12/08 13:28:43 */
+#include "float.h"
+#include "sgl_float.h"
+
/*
* sgl_cmp: compare two values
*/
@@ -50,7 +25,7 @@ sgl_fcmp(leftptr, rightptr, cond, status)
sgl_floating_point *leftptr, *rightptr;
unsigned int cond; /* The predicate to be tested */
unsigned int *status;
- {
+{
register unsigned int left, right;
register int xorresult;
@@ -150,4 +125,4 @@ sgl_fcmp(leftptr, rightptr, cond, status)
}
}
return(NOEXCEPTION);
- }
+}
diff --git a/sys/arch/hppa/spmath/sfdiv.c b/sys/arch/hppa/spmath/sfdiv.c
index aa005d2bf02..724d4681cb8 100644
--- a/sys/arch/hppa/spmath/sfdiv.c
+++ b/sys/arch/hppa/spmath/sfdiv.c
@@ -1,55 +1,29 @@
-/* $OpenBSD: sfdiv.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: sfdiv.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sfdiv.c: Revision: 2.9.88.1 Date: 93/12/07 15:07:05 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
+#include "float.h"
+#include "sgl_float.h"
/*
* Single Precision Floating-point Divide
*/
int
sgl_fdiv(srcptr1,srcptr2,dstptr,status)
-
-sgl_floating_point *srcptr1, *srcptr2, *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr1, *srcptr2, *dstptr;
+ unsigned int *status;
{
register unsigned int opnd1, opnd2, opnd3, result;
register int dest_exponent, count;
diff --git a/sys/arch/hppa/spmath/sfmpy.c b/sys/arch/hppa/spmath/sfmpy.c
index 9c219030dcf..57809a3a38d 100644
--- a/sys/arch/hppa/spmath/sfmpy.c
+++ b/sys/arch/hppa/spmath/sfmpy.c
@@ -1,55 +1,29 @@
-/* $OpenBSD: sfmpy.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: sfmpy.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sfmpy.c: Revision: 2.9.88.1 Date: 93/12/07 15:07:07 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
+#include "float.h"
+#include "sgl_float.h"
/*
* Single Precision Floating-point Multiply
*/
int
sgl_fmpy(srcptr1,srcptr2,dstptr,status)
-
-sgl_floating_point *srcptr1, *srcptr2, *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr1, *srcptr2, *dstptr;
+ unsigned int *status;
{
register unsigned int opnd1, opnd2, opnd3, result;
register int dest_exponent, count;
diff --git a/sys/arch/hppa/spmath/sfrem.c b/sys/arch/hppa/spmath/sfrem.c
index fb6c4597f27..ec8460cb9ca 100644
--- a/sys/arch/hppa/spmath/sfrem.c
+++ b/sys/arch/hppa/spmath/sfrem.c
@@ -1,56 +1,29 @@
-/* $OpenBSD: sfrem.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: sfrem.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sfrem.c: Revision: 1.7.88.1 Date: 93/12/07 15:07:10 */
-
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
+#include "float.h"
+#include "sgl_float.h"
/*
* Single Precision Floating-point Remainder
*/
int
sgl_frem(srcptr1,srcptr2,dstptr,status)
-
-sgl_floating_point *srcptr1, *srcptr2, *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr1, *srcptr2, *dstptr;
+ unsigned int *status;
{
register unsigned int opnd1, opnd2, result;
register int opnd1_exponent, opnd2_exponent, dest_exponent, stepcount;
diff --git a/sys/arch/hppa/spmath/sfsqrt.c b/sys/arch/hppa/spmath/sfsqrt.c
index c6a14d697d2..ecdc82ac337 100644
--- a/sys/arch/hppa/spmath/sfsqrt.c
+++ b/sys/arch/hppa/spmath/sfsqrt.c
@@ -1,46 +1,21 @@
-/* $OpenBSD: sfsqrt.c,v 1.5 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: sfsqrt.c,v 1.6 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sfsqrt.c: Revision: 1.9.88.1 Date: 93/12/07 15:07:13 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
+#include "float.h"
+#include "sgl_float.h"
/*
* Single Floating-point Square Root
@@ -49,9 +24,8 @@
/*ARGSUSED*/
int
sgl_fsqrt(srcptr,dstptr,status)
-
-sgl_floating_point *srcptr, *dstptr;
-unsigned int *status;
+ sgl_floating_point *srcptr, *dstptr;
+ unsigned int *status;
{
register unsigned int src, result;
register int src_exponent, newbit, sum;
diff --git a/sys/arch/hppa/spmath/sfsub.c b/sys/arch/hppa/spmath/sfsub.c
index 67743c754b0..51250672cd1 100644
--- a/sys/arch/hppa/spmath/sfsub.c
+++ b/sys/arch/hppa/spmath/sfsub.c
@@ -1,46 +1,21 @@
-/* $OpenBSD: sfsub.c,v 1.4 2001/03/29 03:58:19 mickey Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
+/* $OpenBSD: sfsub.c,v 1.5 2002/05/07 22:19:30 mickey Exp $ */
/*
- * pmk1.1
- */
-/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sfsub.c: Revision: 2.7.88.1 Date: 93/12/07 15:07:15 */
-#include "../spmath/float.h"
-#include "../spmath/sgl_float.h"
+#include "float.h"
+#include "sgl_float.h"
/*
* Single_subtract: subtract two single precision values.
@@ -49,7 +24,7 @@ int
sgl_fsub(leftptr, rightptr, dstptr, status)
sgl_floating_point *leftptr, *rightptr, *dstptr;
unsigned int *status;
- {
+{
register unsigned int left, right, result, extent;
register unsigned int signless_upper_left, signless_upper_right, save;
@@ -518,4 +493,4 @@ sgl_fsub(leftptr, rightptr, dstptr, status)
else Set_inexactflag();
}
return(NOEXCEPTION);
- }
+}
diff --git a/sys/arch/hppa/spmath/sgl_float.h b/sys/arch/hppa/spmath/sgl_float.h
index 0ba5e639f9c..ef2ecae8ce4 100644
--- a/sys/arch/hppa/spmath/sgl_float.h
+++ b/sys/arch/hppa/spmath/sgl_float.h
@@ -1,42 +1,18 @@
-/* $OpenBSD: sgl_float.h,v 1.6 2002/03/14 01:26:32 millert Exp $ */
-
-/*
- * Copyright 1996 1995 by Open Software Foundation, Inc.
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appears in all copies and
- * that both the copyright notice and this permission notice appear in
- * supporting documentation.
- *
- * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
- * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * pmk1.1
- */
+/* $OpenBSD: sgl_float.h,v 1.7 2002/05/07 22:19:30 mickey Exp $ */
/*
- * (c) Copyright 1986 HEWLETT-PACKARD COMPANY
- *
- * To anyone who acknowledges that this file is provided "AS IS"
- * without any express or implied warranty:
- * permission to use, copy, modify, and distribute this file
- * for any purpose is hereby granted without fee, provided that
- * the above copyright notice and this notice appears in all
- * copies, and that the name of Hewlett-Packard Company not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * Hewlett-Packard Company makes no representations about the
- * suitability of this software for any purpose.
- */
+ (c) Copyright 1986 HEWLETT-PACKARD COMPANY
+ To anyone who acknowledges that this file is provided "AS IS"
+ without any express or implied warranty:
+ permission to use, copy, modify, and distribute this file
+ for any purpose is hereby granted without fee, provided that
+ the above copyright notice and this notice appears in all
+ copies, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+ Hewlett-Packard Company makes no representations about the
+ suitability of this software for any purpose.
+*/
+/* @(#)sgl_float.h: Revision: 2.8.88.1 Date: 93/12/07 15:07:17 */
#include <sys/cdefs.h>