summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/spmath/sfadd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/hppa/spmath/sfadd.c')
-rw-r--r--sys/arch/hppa/spmath/sfadd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/hppa/spmath/sfadd.c b/sys/arch/hppa/spmath/sfadd.c
index 55208a4d9c5..3e052e85d50 100644
--- a/sys/arch/hppa/spmath/sfadd.c
+++ b/sys/arch/hppa/spmath/sfadd.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: sfadd.c,v 1.3 1998/07/02 19:05:51 mickey Exp $ */
+
/*
* Copyright 1996 1995 by Open Software Foundation, Inc.
* All Rights Reserved
@@ -43,6 +45,7 @@
/*
* Single_add: add two single precision values.
*/
+int
sgl_fadd(leftptr, rightptr, dstptr, status)
sgl_floating_point *leftptr, *rightptr, *dstptr;
unsigned int *status;
@@ -491,10 +494,11 @@ sgl_fadd(leftptr, rightptr, dstptr, status)
{
Sgl_setwrapped_exponent(result,result_exponent,ovfl);
*dstptr = result;
- if (inexact)
+ if (inexact) {
if (Is_inexacttrap_enabled())
return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
else Set_inexactflag();
+ }
return(OVERFLOWEXCEPTION);
}
else
@@ -506,8 +510,9 @@ sgl_fadd(leftptr, rightptr, dstptr, status)
}
else Sgl_set_exponent(result,result_exponent);
*dstptr = result;
- if(inexact)
+ if(inexact) {
if(Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
else Set_inexactflag();
+ }
return(NOEXCEPTION);
}