aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/riscv
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2019-11-01 20:35:12 +0000
committerJim Wilson <wilson@gcc.gnu.org>2019-11-01 13:35:12 -0700
commit8dc56a2244cfe35cbdb53e0f586c16f90a2677e4 (patch)
tree36b8771939940a546ff3d1b3be2e849fb2c83dd0 /libgcc/config/riscv
parent2df0c2315a21a05838c8015d27678d236f4d0cd4 (diff)
downloadgcc-8dc56a2244cfe35cbdb53e0f586c16f90a2677e4.zip
gcc-8dc56a2244cfe35cbdb53e0f586c16f90a2677e4.tar.gz
gcc-8dc56a2244cfe35cbdb53e0f586c16f90a2677e4.tar.bz2
RISC-V: Build soft-float divide routines for -mno-fdiv.
Using -mno-fdiv gives linker errors unless we build the missing divide routines in libgcc always. There is at least one university project designing RISC-V parts without FP divide that wants to use the option. libgcc/ * config/riscv/t-softfp32 (softfp_extra): Add FP divide routines From-SVN: r277723
Diffstat (limited to 'libgcc/config/riscv')
-rw-r--r--libgcc/config/riscv/t-softfp3217
1 files changed, 17 insertions, 0 deletions
diff --git a/libgcc/config/riscv/t-softfp32 b/libgcc/config/riscv/t-softfp32
index 1bd51e8..59be1df 100644
--- a/libgcc/config/riscv/t-softfp32
+++ b/libgcc/config/riscv/t-softfp32
@@ -12,7 +12,11 @@ softfp_float_modes := tf
softfp_extensions := sftf dftf
softfp_truncations := tfsf tfdf
+# Enable divide routines to make -mno-fdiv work.
+softfp_extras := divsf3 divdf3
+
else
+# !ABI_DOUBLE
softfp_float_modes := df tf
softfp_extensions := sfdf sftf dftf
@@ -20,7 +24,20 @@ softfp_truncations := dfsf tfsf tfdf
ifndef ABI_SINGLE
softfp_float_modes += sf
+else
+# ABI_SINGLE
+
+# Enable divide routines to make -mno-fdiv work.
+softfp_extras := divsf3
+
endif
endif
+
+else
+# ABI_QUAD
+
+# Enable divide routines to make -mno-fdiv work.
+softfp_extras := divsf3 divdf3 divtf3
+
endif