aboutsummaryrefslogtreecommitdiff
path: root/source/8086-SSE
diff options
context:
space:
mode:
Diffstat (limited to 'source/8086-SSE')
-rw-r--r--source/8086-SSE/extF80M_isSignalingNaN.c2
-rw-r--r--source/8086-SSE/f128M_isSignalingNaN.c2
-rw-r--r--source/8086-SSE/s_commonNaNToExtF80M.c2
-rw-r--r--source/8086-SSE/s_commonNaNToExtF80UI.c2
-rw-r--r--source/8086-SSE/s_commonNaNToF128M.c2
-rw-r--r--source/8086-SSE/s_commonNaNToF128UI.c2
-rw-r--r--source/8086-SSE/s_commonNaNToF16UI.c51
-rw-r--r--source/8086-SSE/s_commonNaNToF32UI.c2
-rw-r--r--source/8086-SSE/s_commonNaNToF64UI.c2
-rw-r--r--source/8086-SSE/s_extF80MToCommonNaN.c2
-rw-r--r--source/8086-SSE/s_extF80UIToCommonNaN.c2
-rw-r--r--source/8086-SSE/s_f128MToCommonNaN.c2
-rw-r--r--source/8086-SSE/s_f128UIToCommonNaN.c2
-rw-r--r--source/8086-SSE/s_f16UIToCommonNaN.c59
-rw-r--r--source/8086-SSE/s_f32UIToCommonNaN.c2
-rw-r--r--source/8086-SSE/s_f64UIToCommonNaN.c2
-rw-r--r--source/8086-SSE/s_propagateNaNExtF80M.c2
-rw-r--r--source/8086-SSE/s_propagateNaNExtF80UI.c2
-rw-r--r--source/8086-SSE/s_propagateNaNF128M.c2
-rw-r--r--source/8086-SSE/s_propagateNaNF128UI.c2
-rw-r--r--source/8086-SSE/s_propagateNaNF16UI.c63
-rw-r--r--source/8086-SSE/s_propagateNaNF32UI.c2
-rw-r--r--source/8086-SSE/s_propagateNaNF64UI.c2
-rw-r--r--source/8086-SSE/softfloat_raiseFlags.c2
-rw-r--r--source/8086-SSE/specialize.h41
25 files changed, 232 insertions, 24 deletions
diff --git a/source/8086-SSE/extF80M_isSignalingNaN.c b/source/8086-SSE/extF80M_isSignalingNaN.c
index 4a05f54..be3dc40 100644
--- a/source/8086-SSE/extF80M_isSignalingNaN.c
+++ b/source/8086-SSE/extF80M_isSignalingNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/f128M_isSignalingNaN.c b/source/8086-SSE/f128M_isSignalingNaN.c
index 9ca5fea..6560615 100644
--- a/source/8086-SSE/f128M_isSignalingNaN.c
+++ b/source/8086-SSE/f128M_isSignalingNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_commonNaNToExtF80M.c b/source/8086-SSE/s_commonNaNToExtF80M.c
index cbccf1d..42e6adc 100644
--- a/source/8086-SSE/s_commonNaNToExtF80M.c
+++ b/source/8086-SSE/s_commonNaNToExtF80M.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_commonNaNToExtF80UI.c b/source/8086-SSE/s_commonNaNToExtF80UI.c
index cea01d9..d88c3bf 100644
--- a/source/8086-SSE/s_commonNaNToExtF80UI.c
+++ b/source/8086-SSE/s_commonNaNToExtF80UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_commonNaNToF128M.c b/source/8086-SSE/s_commonNaNToF128M.c
index f54cd49..ec0301e 100644
--- a/source/8086-SSE/s_commonNaNToF128M.c
+++ b/source/8086-SSE/s_commonNaNToF128M.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_commonNaNToF128UI.c b/source/8086-SSE/s_commonNaNToF128UI.c
index 64b9e0e..256b77b 100644
--- a/source/8086-SSE/s_commonNaNToF128UI.c
+++ b/source/8086-SSE/s_commonNaNToF128UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_commonNaNToF16UI.c b/source/8086-SSE/s_commonNaNToF16UI.c
new file mode 100644
index 0000000..15e6dae
--- /dev/null
+++ b/source/8086-SSE/s_commonNaNToF16UI.c
@@ -0,0 +1,51 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3b, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr )
+{
+
+ return (uint_fast16_t) aPtr->sign<<15 | 0x7E00 | aPtr->v64>>54;
+
+}
+
diff --git a/source/8086-SSE/s_commonNaNToF32UI.c b/source/8086-SSE/s_commonNaNToF32UI.c
index 47557ce..39c8522 100644
--- a/source/8086-SSE/s_commonNaNToF32UI.c
+++ b/source/8086-SSE/s_commonNaNToF32UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_commonNaNToF64UI.c b/source/8086-SSE/s_commonNaNToF64UI.c
index 7fc5dfe..bdfb0d1 100644
--- a/source/8086-SSE/s_commonNaNToF64UI.c
+++ b/source/8086-SSE/s_commonNaNToF64UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_extF80MToCommonNaN.c b/source/8086-SSE/s_extF80MToCommonNaN.c
index 3a4c17e..476f17e 100644
--- a/source/8086-SSE/s_extF80MToCommonNaN.c
+++ b/source/8086-SSE/s_extF80MToCommonNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_extF80UIToCommonNaN.c b/source/8086-SSE/s_extF80UIToCommonNaN.c
index bae4aa7..dd63151 100644
--- a/source/8086-SSE/s_extF80UIToCommonNaN.c
+++ b/source/8086-SSE/s_extF80UIToCommonNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_f128MToCommonNaN.c b/source/8086-SSE/s_f128MToCommonNaN.c
index 76dd5c5..f080fd8 100644
--- a/source/8086-SSE/s_f128MToCommonNaN.c
+++ b/source/8086-SSE/s_f128MToCommonNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_f128UIToCommonNaN.c b/source/8086-SSE/s_f128UIToCommonNaN.c
index 750d22b..9c2ec2f 100644
--- a/source/8086-SSE/s_f128UIToCommonNaN.c
+++ b/source/8086-SSE/s_f128UIToCommonNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_f16UIToCommonNaN.c b/source/8086-SSE/s_f16UIToCommonNaN.c
new file mode 100644
index 0000000..0b5273c
--- /dev/null
+++ b/source/8086-SSE/s_f16UIToCommonNaN.c
@@ -0,0 +1,59 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3b, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr )
+{
+
+ if ( softfloat_isSigNaNF16UI( uiA ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid );
+ }
+ zPtr->sign = uiA>>15;
+ zPtr->v64 = (uint_fast64_t) uiA<<54;
+ zPtr->v0 = 0;
+
+}
+
diff --git a/source/8086-SSE/s_f32UIToCommonNaN.c b/source/8086-SSE/s_f32UIToCommonNaN.c
index 2bb28f8..0a14729 100644
--- a/source/8086-SSE/s_f32UIToCommonNaN.c
+++ b/source/8086-SSE/s_f32UIToCommonNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_f64UIToCommonNaN.c b/source/8086-SSE/s_f64UIToCommonNaN.c
index 4339ce9..bb9c2fa 100644
--- a/source/8086-SSE/s_f64UIToCommonNaN.c
+++ b/source/8086-SSE/s_f64UIToCommonNaN.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_propagateNaNExtF80M.c b/source/8086-SSE/s_propagateNaNExtF80M.c
index 67d81ba..80b5897 100644
--- a/source/8086-SSE/s_propagateNaNExtF80M.c
+++ b/source/8086-SSE/s_propagateNaNExtF80M.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_propagateNaNExtF80UI.c b/source/8086-SSE/s_propagateNaNExtF80UI.c
index 16f4251..3fc1d7a 100644
--- a/source/8086-SSE/s_propagateNaNExtF80UI.c
+++ b/source/8086-SSE/s_propagateNaNExtF80UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_propagateNaNF128M.c b/source/8086-SSE/s_propagateNaNF128M.c
index fff5503..cf0cf69 100644
--- a/source/8086-SSE/s_propagateNaNF128M.c
+++ b/source/8086-SSE/s_propagateNaNF128M.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_propagateNaNF128UI.c b/source/8086-SSE/s_propagateNaNF128UI.c
index 6954505..d650365 100644
--- a/source/8086-SSE/s_propagateNaNF128UI.c
+++ b/source/8086-SSE/s_propagateNaNF128UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_propagateNaNF16UI.c b/source/8086-SSE/s_propagateNaNF16UI.c
new file mode 100644
index 0000000..7f88498
--- /dev/null
+++ b/source/8086-SSE/s_propagateNaNF16UI.c
@@ -0,0 +1,63 @@
+
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3b, by John R. Hauser.
+
+Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
+California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the University nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=============================================================================*/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either `uiA' or `uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB )
+{
+ bool isSigNaNA;
+
+ isSigNaNA = softfloat_isSigNaNF16UI( uiA );
+ if ( isSigNaNA || softfloat_isSigNaNF16UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid );
+ if ( isSigNaNA ) return uiA | 0x0200;
+ }
+ return (isNaNF16UI( uiA ) ? uiA : uiB) | 0x0200;
+
+}
+
diff --git a/source/8086-SSE/s_propagateNaNF32UI.c b/source/8086-SSE/s_propagateNaNF32UI.c
index 010cef8..19c8654 100644
--- a/source/8086-SSE/s_propagateNaNF32UI.c
+++ b/source/8086-SSE/s_propagateNaNF32UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/s_propagateNaNF64UI.c b/source/8086-SSE/s_propagateNaNF64UI.c
index ca5b1bd..9186fdb 100644
--- a/source/8086-SSE/s_propagateNaNF64UI.c
+++ b/source/8086-SSE/s_propagateNaNF64UI.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/softfloat_raiseFlags.c b/source/8086-SSE/softfloat_raiseFlags.c
index 7b5ba25..5ba1502 100644
--- a/source/8086-SSE/softfloat_raiseFlags.c
+++ b/source/8086-SSE/softfloat_raiseFlags.c
@@ -2,7 +2,7 @@
/*============================================================================
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
All rights reserved.
diff --git a/source/8086-SSE/specialize.h b/source/8086-SSE/specialize.h
index 8a71e46..d2c6b22 100644
--- a/source/8086-SSE/specialize.h
+++ b/source/8086-SSE/specialize.h
@@ -2,7 +2,7 @@
/*============================================================================
This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a+, by John R. Hauser.
+Package, Release 3b, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
California. All rights reserved.
@@ -47,7 +47,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define init_detectTininess softfloat_tininess_afterRounding
/*----------------------------------------------------------------------------
-| The values to return on conversions to 32-bit integer format that raise an
+| The values to return on conversions to 32-bit integer formats that raise an
| invalid exception.
*----------------------------------------------------------------------------*/
#define ui32_fromPosOverflow 0xFFFFFFFF
@@ -58,7 +58,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define i32_fromNaN 0x7FFFFFFF
/*----------------------------------------------------------------------------
-| The values to return on conversions to 64-bit integer format that raise an
+| The values to return on conversions to 64-bit integer formats that raise an
| invalid exception.
*----------------------------------------------------------------------------*/
#define ui64_fromPosOverflow UINT64_C( 0xFFFFFFFFFFFFFFFF )
@@ -82,6 +82,41 @@ struct commonNaN {
};
/*----------------------------------------------------------------------------
+| The bit pattern for a default generated 16-bit floating-point NaN.
+*----------------------------------------------------------------------------*/
+#define defaultNaNF16UI 0xFE00
+
+/*----------------------------------------------------------------------------
+| Returns true when 16-bit unsigned integer `uiA' has the bit pattern of a
+| 16-bit floating-point signaling NaN.
+| Note: This macro evaluates its argument more than once.
+*----------------------------------------------------------------------------*/
+#define softfloat_isSigNaNF16UI( uiA ) ((((uiA) & 0x7E00) == 0x7C00) && ((uiA) & 0x01FF))
+
+/*----------------------------------------------------------------------------
+| Assuming `uiA' has the bit pattern of a 16-bit floating-point NaN, converts
+| this NaN to the common NaN form, and stores the resulting common NaN at the
+| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
+| exception is raised.
+*----------------------------------------------------------------------------*/
+void softfloat_f16UIToCommonNaN( uint_fast16_t uiA, struct commonNaN *zPtr );
+
+/*----------------------------------------------------------------------------
+| Converts the common NaN pointed to by `aPtr' into a 16-bit floating-point
+| NaN, and returns the bit pattern of this value as an unsigned integer.
+*----------------------------------------------------------------------------*/
+uint_fast16_t softfloat_commonNaNToF16UI( const struct commonNaN *aPtr );
+
+/*----------------------------------------------------------------------------
+| Interpreting `uiA' and `uiB' as the bit patterns of two 16-bit floating-
+| point values, at least one of which is a NaN, returns the bit pattern of
+| the combined NaN result. If either `uiA' or `uiB' has the pattern of a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+uint_fast16_t
+ softfloat_propagateNaNF16UI( uint_fast16_t uiA, uint_fast16_t uiB );
+
+/*----------------------------------------------------------------------------
| The bit pattern for a default generated 32-bit floating-point NaN.
*----------------------------------------------------------------------------*/
#define defaultNaNF32UI 0xFFC00000