aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorMonk Chiang <sh.chiang04@gmail.com>2018-04-06 05:51:33 +0000
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>2018-04-06 05:51:33 +0000
commite22862689667e739d308140d72e8cc85ed116a2f (patch)
treed2c7d8e25a700eade32158174a160be46dcc37c4 /gcc/config.gcc
parent58e297628fe95a905d73878915df4e004612369d (diff)
downloadgcc-e22862689667e739d308140d72e8cc85ed116a2f.zip
gcc-e22862689667e739d308140d72e8cc85ed116a2f.tar.gz
gcc-e22862689667e739d308140d72e8cc85ed116a2f.tar.bz2
[NDS32] Add hard float support.
gcc/ * config.gcc (nds32*-*-*): Add v2j v3f v3s checking. (nds32*-*-*): Add float and fpu_config into supported_defaults. * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA. * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN, UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS. * config/nds32/constraints.md: New constraints and checking for hard float configuration. * config/nds32/iterators.md: New mode iterator and attribute for hard float configuration. * config/nds32/nds32-doubleword.md: Use hard float alternatives and patterns. * config/nds32/nds32-fpu.md: New file. * config/nds32/nds32-md-auxiliary.c: New functions and checkings to deal with hard float code generation. * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and ARCH_V3S. (abi_type, float_reg_number): New enum type. * config/nds32/nds32-predicates.c: New predicates for hard float. * config/nds32/nds32-protos.h: Declare functions for hard float. * config/nds32/nds32.c: Implementation for hard float configuration. * config/nds32/nds32.h: Definitions for hard float configuration. * config/nds32/nds32.md: Include hard float machine description and modify patterns for hard float configuration. * config/nds32/nds32.opt: New options for hard float configuration. * config/nds32/predicates.md: New predicates for hard float configuration. Co-Authored-By: Chung-Ju Wu <jasonwucj@gmail.com> From-SVN: r259161
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc42
1 files changed, 38 insertions, 4 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index b8a9877..75d0ae8 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4278,15 +4278,26 @@ case "${target}" in
;;
nds32*-*-*)
- supported_defaults="arch cpu nds32_lib"
+ supported_defaults="arch cpu nds32_lib float fpu_config"
# process --with-arch
case "${with_arch}" in
- "" | v2 | v3 | v3m)
+ "" | v3 )
+ tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
+ ;;
+ v2 | v2j | v3m)
# OK
+ tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
+ ;;
+ v3f)
+ tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=1"
+ ;;
+ v3s)
+ tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=2"
+
;;
*)
- echo "Cannot accept --with-arch=$with_arch, available values are: v2 v3 v3m" 1>&2
+ echo "Cannot accept --with-arch=$with_arch, available values are: v2 v2j v3 v3m v3f v3s" 1>&2
exit 1
;;
esac
@@ -4321,8 +4332,31 @@ case "${target}" in
exit 1
;;
esac
- ;;
+ # process --with-float
+ case "${with_float}" in
+ "" | soft | hard)
+ # OK
+ ;;
+ *)
+ echo "Cannot accept --with-float=$with_float, available values are: soft hard" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # process --with-config-fpu
+ case "${with_config_fpu}" in
+ "" | 0 | 1 | 2 | 3)
+ # OK
+ ;;
+ *)
+ echo "Cannot accept --with-config-fpu=$with_config_fpu, available values from 0 to 7" 1>&2
+ exit 1
+ ;;
+ esac
+
+
+ ;;
nios2*-*-*)
supported_defaults="arch"
case "$with_arch" in