diff --git a/sysdeps/sparc/sparc64/Implies b/sysdeps/sparc/sparc64/Implies
index 7abc50e..fe5eccd 100644
--- a/sysdeps/sparc/sparc64/Implies
+++ b/sysdeps/sparc/sparc64/Implies
@@ -4,4 +4,3 @@ ieee754/ldbl-128
 ieee754/dbl-64/wordsize-64
 ieee754/dbl-64
 ieee754/flt-32
-sparc/sparc64/soft-fp
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index 0963a55..16b7605 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -1,3 +1,23 @@
+#  Makefile for SPARC 64-bit.
+#  Copyright (C) 1997-2018 Free Software Foundation, Inc.
+#  This file is part of the GNU C Library.
+#  Contributed by Jakub Jelinek (jj@ultra.linux.cz).
+#
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
 sysdep-CFLAGS += -Wa,-Av9a -mvis
 
 ifeq ($(subdir),string)
@@ -17,3 +37,15 @@ endif
 ifeq ($(subdir),nptl)
 libpthread-routines += cpu_relax
 endif
+
+ifeq ($(subdir),soft-fp)
+sparc64-quad-routines := qp_add qp_cmp qp_cmpe qp_div qp_dtoq qp_feq qp_fge \
+	qp_fgt qp_fle qp_flt qp_fne qp_itoq qp_mul qp_neg qp_qtod qp_qtoi   \
+	qp_qtos qp_qtoui qp_qtoux qp_qtox qp_sqrt qp_stoq qp_sub qp_uitoq   \
+	qp_uxtoq qp_xtoq qp_util
+sysdep_routines += $(sparc64-quad-routines)
+endif
+
+ifeq ($(subdir),math)
+CPPFLAGS += -I../soft-fp/
+endif
diff --git a/sysdeps/sparc/sparc64/Versions b/sysdeps/sparc/sparc64/Versions
index 4cef7bc..b2661ed 100644
--- a/sysdeps/sparc/sparc64/Versions
+++ b/sysdeps/sparc/sparc64/Versions
@@ -4,6 +4,12 @@ libc {
     __align_cpy_1; __align_cpy_2; __align_cpy_4;
     __align_cpy_8; __align_cpy_16;
   }
+  GLIBC_2.2 {
+    _Qp_add; _Qp_cmp; _Qp_cmpe; _Qp_div; _Qp_dtoq; _Qp_feq; _Qp_fge; _Qp_fgt;
+    _Qp_fle; _Qp_flt; _Qp_fne; _Qp_itoq; _Qp_mul; _Qp_neg; _Qp_qtod; _Qp_qtoi;
+    _Qp_qtos; _Qp_qtoui; _Qp_qtoux; _Qp_qtox; _Qp_sqrt; _Qp_stoq; _Qp_sub;
+    _Qp_uitoq; _Qp_uxtoq; _Qp_xtoq;
+  }
 }
 libm {
   GLIBC_2.1 {
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_add.c b/sysdeps/sparc/sparc64/qp_add.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_add.c
rename to sysdeps/sparc/sparc64/qp_add.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_cmp.c b/sysdeps/sparc/sparc64/qp_cmp.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_cmp.c
rename to sysdeps/sparc/sparc64/qp_cmp.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c b/sysdeps/sparc/sparc64/qp_cmpe.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c
rename to sysdeps/sparc/sparc64/qp_cmpe.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_div.c b/sysdeps/sparc/sparc64/qp_div.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_div.c
rename to sysdeps/sparc/sparc64/qp_div.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c b/sysdeps/sparc/sparc64/qp_dtoq.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c
rename to sysdeps/sparc/sparc64/qp_dtoq.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_feq.c b/sysdeps/sparc/sparc64/qp_feq.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_feq.c
rename to sysdeps/sparc/sparc64/qp_feq.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fge.c b/sysdeps/sparc/sparc64/qp_fge.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_fge.c
rename to sysdeps/sparc/sparc64/qp_fge.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fgt.c b/sysdeps/sparc/sparc64/qp_fgt.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_fgt.c
rename to sysdeps/sparc/sparc64/qp_fgt.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fle.c b/sysdeps/sparc/sparc64/qp_fle.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_fle.c
rename to sysdeps/sparc/sparc64/qp_fle.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_flt.c b/sysdeps/sparc/sparc64/qp_flt.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_flt.c
rename to sysdeps/sparc/sparc64/qp_flt.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_fne.c b/sysdeps/sparc/sparc64/qp_fne.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_fne.c
rename to sysdeps/sparc/sparc64/qp_fne.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_itoq.c b/sysdeps/sparc/sparc64/qp_itoq.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_itoq.c
rename to sysdeps/sparc/sparc64/qp_itoq.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_mul.c b/sysdeps/sparc/sparc64/qp_mul.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_mul.c
rename to sysdeps/sparc/sparc64/qp_mul.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_neg.S b/sysdeps/sparc/sparc64/qp_neg.S
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_neg.S
rename to sysdeps/sparc/sparc64/qp_neg.S
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_qtod.c b/sysdeps/sparc/sparc64/qp_qtod.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_qtod.c
rename to sysdeps/sparc/sparc64/qp_qtod.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c b/sysdeps/sparc/sparc64/qp_qtoi.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c
rename to sysdeps/sparc/sparc64/qp_qtoi.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_qtos.c b/sysdeps/sparc/sparc64/qp_qtos.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_qtos.c
rename to sysdeps/sparc/sparc64/qp_qtos.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c b/sysdeps/sparc/sparc64/qp_qtoui.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c
rename to sysdeps/sparc/sparc64/qp_qtoui.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c b/sysdeps/sparc/sparc64/qp_qtoux.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c
rename to sysdeps/sparc/sparc64/qp_qtoux.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_qtox.c b/sysdeps/sparc/sparc64/qp_qtox.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_qtox.c
rename to sysdeps/sparc/sparc64/qp_qtox.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c b/sysdeps/sparc/sparc64/qp_sqrt.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c
rename to sysdeps/sparc/sparc64/qp_sqrt.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_stoq.c b/sysdeps/sparc/sparc64/qp_stoq.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_stoq.c
rename to sysdeps/sparc/sparc64/qp_stoq.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_sub.c b/sysdeps/sparc/sparc64/qp_sub.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_sub.c
rename to sysdeps/sparc/sparc64/qp_sub.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c b/sysdeps/sparc/sparc64/qp_uitoq.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c
rename to sysdeps/sparc/sparc64/qp_uitoq.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_util.c b/sysdeps/sparc/sparc64/qp_util.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_util.c
rename to sysdeps/sparc/sparc64/qp_util.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c b/sysdeps/sparc/sparc64/qp_uxtoq.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c
rename to sysdeps/sparc/sparc64/qp_uxtoq.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c b/sysdeps/sparc/sparc64/qp_xtoq.c
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c
rename to sysdeps/sparc/sparc64/qp_xtoq.c
diff --git a/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h b/sysdeps/sparc/sparc64/sfp-machine.h
similarity index 100%
rename from sysdeps/sparc/sparc64/soft-fp/sfp-machine.h
rename to sysdeps/sparc/sparc64/sfp-machine.h
diff --git a/sysdeps/sparc/sparc64/soft-fp/Makefile b/sysdeps/sparc/sparc64/soft-fp/Makefile
deleted file mode 100644
index e785b8c..0000000
--- a/sysdeps/sparc/sparc64/soft-fp/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#  Software floating-point emulation.
-#  Makefile for SPARC v9 ABI mandated long double utility
-#  functions (_Qp_*).
-#  Copyright (C) 1999-2018 Free Software Foundation, Inc.
-#  This file is part of the GNU C Library.
-#  Contributed by Jakub Jelinek (jj@ultra.linux.cz).
-#
-
-# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# The GNU C Library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, see
-# <http://www.gnu.org/licenses/>.
-
-ifeq ($(subdir),soft-fp)
-sparc64-quad-routines := qp_add qp_cmp qp_cmpe qp_div qp_dtoq qp_feq qp_fge \
-	qp_fgt qp_fle qp_flt qp_fne qp_itoq qp_mul qp_neg qp_qtod qp_qtoi   \
-	qp_qtos qp_qtoui qp_qtoux qp_qtox qp_sqrt qp_stoq qp_sub qp_uitoq   \
-	qp_uxtoq qp_xtoq qp_util
-sysdep_routines += $(sparc64-quad-routines)
-endif
-
-ifeq ($(subdir),math)
-CPPFLAGS += -I../soft-fp/
-endif
diff --git a/sysdeps/sparc/sparc64/soft-fp/Versions b/sysdeps/sparc/sparc64/soft-fp/Versions
deleted file mode 100644
index 9e89c3c..0000000
--- a/sysdeps/sparc/sparc64/soft-fp/Versions
+++ /dev/null
@@ -1,8 +0,0 @@
-libc {
-  GLIBC_2.2 {
-    _Qp_add; _Qp_cmp; _Qp_cmpe; _Qp_div; _Qp_dtoq; _Qp_feq; _Qp_fge; _Qp_fgt;
-    _Qp_fle; _Qp_flt; _Qp_fne; _Qp_itoq; _Qp_mul; _Qp_neg; _Qp_qtod; _Qp_qtoi;
-    _Qp_qtos; _Qp_qtoui; _Qp_qtoux; _Qp_qtox; _Qp_sqrt; _Qp_stoq; _Qp_sub;
-    _Qp_uitoq; _Qp_uxtoq; _Qp_xtoq;
-  }
-}
diff --git a/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c b/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c
deleted file mode 100644
index 5e78940..0000000
--- a/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Software floating-point emulation.
-   ilogbl(x, exp)
-   Copyright (C) 1999-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek (jj@ultra.linux.cz).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* ilogbl(long double x)
- * return the binary exponent of non-zero x
- * ilogbl(0) = 0x80000001
- * ilogbl(inf/NaN) = 0x7fffffff (no signal is raised)
- */
-
-#include "soft-fp.h"
-#include "quad.h"
-#include <math.h>
-
-int __ieee754_ilogbl (long double x)
-{
-  FP_DECL_EX;
-  FP_DECL_Q(X);
-
-/*
-  FP_UNPACK_Q(X, x);
-  switch (X_c)
-    {
-    case FP_CLS_ZERO:
-      return FP_ILOGB0;
-    case FP_CLS_NAN:
-    case FP_CLS_INF:
-      return FP_ILOGBNAN;
-    default:
-      return X_e;
-    }
- */
-  FP_UNPACK_RAW_Q(X, x);
-  switch (X_e)
-    {
-    default:
-      return X_e - _FP_EXPBIAS_Q;
-    case 0:
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
-      if (_FP_FRAC_ZEROP_4(X))
-	return FP_ILOGB0;
-      else
-	{
-	  _FP_I_TYPE shift;
-	  _FP_FRAC_CLZ_4(shift, X);
-	  shift -= _FP_FRACXBITS_Q;
-	  return X_e - _FP_EXPBIAS_Q - 1 + shift;
-	}
-#else
-      if (_FP_FRAC_ZEROP_2(X))
-	return FP_ILOGB0;
-      else
-	{
-	  _FP_I_TYPE shift;
-	  _FP_FRAC_CLZ_2(shift, X);
-	  shift -= _FP_FRACXBITS_Q;
-	  return X_e - _FP_EXPBIAS_Q - 1 + shift;
-	}
-#endif
-    case _FP_EXPBIAS_Q:
-      return FP_ILOGBNAN;
-    }
-}
