58 lines
1.7 KiB
Diff
58 lines
1.7 KiB
Diff
From 5920c7d65bf452ddec031bfcbe610404324a38bc Mon Sep 17 00:00:00 2001
|
|
From: swcompiler <lc@wxiat.com>
|
|
Date: Mon, 25 Nov 2024 16:52:12 +0800
|
|
Subject: [PATCH 08/16] Sw64 Port: libgfortran
|
|
|
|
---
|
|
libgfortran/config/fpu-glibc.h | 6 +++---
|
|
libgfortran/configure.host | 2 ++
|
|
2 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/libgfortran/config/fpu-glibc.h b/libgfortran/config/fpu-glibc.h
|
|
index 265ef6938..8a5eb3c99 100644
|
|
--- a/libgfortran/config/fpu-glibc.h
|
|
+++ b/libgfortran/config/fpu-glibc.h
|
|
@@ -446,7 +446,7 @@ set_fpu_state (void *state)
|
|
int
|
|
support_fpu_underflow_control (int kind __attribute__((unused)))
|
|
{
|
|
-#if defined(__alpha__) && defined(FE_MAP_UMZ)
|
|
+#if (defined(__alpha__) || defined(__sw_64__)) && defined(FE_MAP_UMZ)
|
|
return (kind == 4 || kind == 8) ? 1 : 0;
|
|
#else
|
|
return 0;
|
|
@@ -457,7 +457,7 @@ support_fpu_underflow_control (int kind __attribute__((unused)))
|
|
int
|
|
get_fpu_underflow_mode (void)
|
|
{
|
|
-#if defined(__alpha__) && defined(FE_MAP_UMZ)
|
|
+#if (defined(__alpha__) || defined(__sw_64__)) && defined(FE_MAP_UMZ)
|
|
|
|
fenv_t state = __ieee_get_fp_control ();
|
|
|
|
@@ -475,7 +475,7 @@ get_fpu_underflow_mode (void)
|
|
void
|
|
set_fpu_underflow_mode (int gradual __attribute__((unused)))
|
|
{
|
|
-#if defined(__alpha__) && defined(FE_MAP_UMZ)
|
|
+#if (defined(__alpha__) || defined(__sw_64__)) && defined(FE_MAP_UMZ)
|
|
|
|
fenv_t state = __ieee_get_fp_control ();
|
|
|
|
diff --git a/libgfortran/configure.host b/libgfortran/configure.host
|
|
index 3d6c2db77..ddd24ac12 100644
|
|
--- a/libgfortran/configure.host
|
|
+++ b/libgfortran/configure.host
|
|
@@ -71,6 +71,8 @@ case "${host_cpu}" in
|
|
ieee_flags="-mieee" ;;
|
|
sh*)
|
|
ieee_flags="-mieee" ;;
|
|
+ sw_64*)
|
|
+ ieee_flags="-mieee" ;;
|
|
esac
|
|
|
|
tmake_file=
|
|
--
|
|
2.25.1
|
|
|