@@ -0,0 +1,32 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This file is part of GCC.
+
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+
+# GCC 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+hardfp_float_modes := sf
+# di and ti are provided by libgcc2.c where needed.
+hardfp_int_modes := si
+hardfp_extensions :=
+hardfp_truncations :=
+
+# Emulate 64 bit float:
+FPBIT = true
+DPBIT = true
+# Don't build functions handled by 32 bit hardware:
+LIB2FUNCS_EXCLUDE = _addsub_sf _mul_sf _div_sf \
+ _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
+ _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf \
+ _thenan_sf _sf_to_usi _usi_to_sf
@@ -144,7 +144,11 @@ mips*-*-*)
cpu_type=mips
tmake_file="mips/t-mips"
if test "${libgcc_cv_mips_hard_float}" = yes; then
- tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
+ if test "${libgcc_cv_mips_single_float}" = yes; then
+ tmake_file="${tmake_file} t-hardfp-sf t-hardfp"
+ else
+ tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
+ fi
else
tmake_file="${tmake_file} t-softfp-sfdf"
fi
@@ -794,13 +798,18 @@ mips*-*-linux*) # Linux MIPS, either
# instructions that are not supported on r5900.
;;
*)
- tmake_file="${tmake_file} mips/t-mips16 t-slibgcc-libgcc"
+ if test x$with_arch != xr5900; then
+ tmake_file="${tmake_file} mips/t-mips16 t-slibgcc-libgcc"
+ fi
;;
esac
md_unwind_header=mips/linux-unwind.h
;;
mips*-sde-elf*)
- tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
+ tmake_file="$tmake_file mips/t-crtstuff"
+ if test x$with_arch != xr5900; then
+ tmake_file="$tmake_file mips/t-mips16"
+ fi
case "${with_newlib}" in
yes)
# newlib / libgloss.
@@ -828,7 +837,10 @@ mipsisa64sb1-*-elf* | mipsisa64sb1el-*-e
extra_parts="$extra_parts crti.o crtn.o"
;;
mips-*-elf* | mipsel-*-elf*)
- tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
+ tmake_file="$tmake_file mips/t-elf mips/t-crtstuff"
+ if test x$with_arch != xr5900; then
+ tmake_file="$tmake_file mips/t-mips16"
+ fi
extra_parts="$extra_parts crti.o crtn.o"
;;
mipsr5900-*-elf* | mipsr5900el-*-elf*)
@@ -836,7 +848,10 @@ mipsr5900-*-elf* | mipsr5900el-*-elf*)
extra_parts="$extra_parts crti.o crtn.o"
;;
mips64-*-elf* | mips64el-*-elf*)
- tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
+ tmake_file="$tmake_file mips/t-elf mips/t-crtstuff"
+ if test x$with_arch != xr5900; then
+ tmake_file="$tmake_file mips/t-mips16"
+ fi
extra_parts="$extra_parts crti.o crtn.o"
;;
mips64r5900-*-elf* | mips64r5900el-*-elf*)
@@ -852,7 +867,10 @@ mips64orion-*-elf* | mips64orionel-*-elf
extra_parts="$extra_parts crti.o crtn.o"
;;
mips*-*-rtems*)
- tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
+ tmake_file="$tmake_file mips/t-elf mips/t-crtstuff"
+ if test x$with_arch != xr5900; then
+ tmake_file="$tmake_file mips/t-mips16"
+ fi
extra_parts="$extra_parts crti.o crtn.o"
;;
mips-wrs-vxworks)
@@ -302,6 +302,14 @@ mips*-*-*)
#endif],
[libgcc_cv_mips_hard_float=yes],
[libgcc_cv_mips_hard_float=no])])
+ AC_CACHE_CHECK([whether the target is single-float],
+ [libgcc_cv_mips_single_float],
+ [AC_COMPILE_IFELSE(
+ [#ifndef __mips_single_float
+ #error FOO
+ #endif],
+ [libgcc_cv_mips_single_float=yes],
+ [libgcc_cv_mips_single_float=no])])
esac
# Collect host-machine-specific information.
@@ -4352,6 +4352,26 @@ rm -f core conftest.err conftest.$ac_obj
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_mips_hard_float" >&5
$as_echo "$libgcc_cv_mips_hard_float" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target is single-float" >&5
+$as_echo_n "checking whether the target is single-float... " >&6; }
+if test "${libgcc_cv_mips_single_float+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __mips_single_float
+ #error FOO
+ #endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libgcc_cv_mips_single_float=yes
+else
+ libgcc_cv_mips_single_float=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_mips_single_float" >&5
+$as_echo "$libgcc_cv_mips_single_float" >&6; }
esac
# Collect host-machine-specific information.