summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/softfloat3
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2026-04-28 20:04:48 +0700
committer GitHub <noreply@github.com>2026-04-28 23:04:48 +1000
commit1810633dcc067261ed629aaaf7ca54a2e3638aea (patch)
tree22613fd3603d54b8f98242454fafb4d0dfc9a021 /3rdparty/softfloat3
parent797381847f762ac985c34bea84c0b7aeef4c3360 (diff)
3rdparty: Retired softfloat2. (#15270)
cpu/i386, machine/i8087.cpp: Migrated to SoftFloat 3.
Diffstat (limited to '3rdparty/softfloat3')
-rw-r--r--3rdparty/softfloat3/bochs_ext/isNaN.c69
-rw-r--r--3rdparty/softfloat3/bochs_ext/softfloat3_ext.h5
2 files changed, 74 insertions, 0 deletions
diff --git a/3rdparty/softfloat3/bochs_ext/isNaN.c b/3rdparty/softfloat3/bochs_ext/isNaN.c
new file mode 100644
index 00000000000..248d6efda36
--- /dev/null
+++ b/3rdparty/softfloat3/bochs_ext/isNaN.c
@@ -0,0 +1,69 @@
+/*============================================================================
+
+This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
+Package, Release 3e, 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 "../source/include/softfloat.h"
+#include "../source/include/internals.h"
+#include "../source/8086/specialize.h"
+
+bool f16_isNaN(float16_t a)
+{
+ return isNaNF16UI(a.v);
+}
+
+bool f32_isNaN(float32_t a)
+{
+ return isNaNF32UI(a.v);
+}
+
+bool f64_isNaN(float64_t a)
+{
+ return isNaNF64UI(a.v);
+}
+
+bool extF80_isNaN(extFloat80_t a)
+{
+ return isNaNExtF80UI(a.signExp, a.signif);
+}
+
+bool f128_isNaN(float128_t a)
+{
+ union ui128_f128 u;
+
+ u.f = a;
+
+ return isNaNF128UI(u.ui.v64, u.ui.v0);
+}
diff --git a/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h b/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h
index 03b3688c740..f6be9418169 100644
--- a/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h
+++ b/3rdparty/softfloat3/bochs_ext/softfloat3_ext.h
@@ -19,3 +19,8 @@ extFloat80_t extFloat80_logn(extFloat80_t a);
extFloat80_t extFloat80_log2(extFloat80_t a);
extFloat80_t extFloat80_log10(extFloat80_t a);
extFloat80_t extFloat80_scale(extFloat80_t a, extFloat80_t b);
+bool f16_isNaN(float16_t a);
+bool f32_isNaN(float32_t a);
+bool f64_isNaN(float64_t a);
+bool extF80_isNaN(extFloat80_t a);
+bool f128_isNaN(float128_t a);