On Thu, Jul 13, 2017 at 5:12 PM, Andrew Pinski wrote: > Hi, > This patch adds Decimal floating point support to aarch64. It is > the base support in that since there is no hardware support for DFP, > it just defines the ABI. The ABI I chose is that _Decimal32 is > treated like float, _Decimal64 is treated like double and _Decimal128 > is treated like long double. In that they are passed via the floating > registers (sN, dN, qN). > Is this ok an ABI? > > Is the patch ok? Bootstrapped and tested on aarch64-linux-gnu with > --enable-decimal-float with no regressions and all of the dfp > testcases pass. I just noticed I messed up by attaching the wrong patch. Here is the correct one. Thanks, Andrew > > Thanks, > Andrew Pinski > > gcc/ChangeLog: > * config/aarch64/aarch64.c (aarch64_split_128bit_move): Handle TDmode. > (aarch64_classify_address): Likewise. > (aarch64_legitimize_address_displacement): Likewise. > (aarch64_legitimize_address): Likewise. > (aarch64_constant_pool_reload_icode): Handle SD, DD, and TD modes. > (aarch64_secondary_reload): Handle TDmode. > (aarch64_valid_floating_const): For decimal floating point return false. > (aarch64_gimplify_va_arg_expr): Handle SD, DD, and TD modes. > (aapcs_vfp_sub_candidate): Likewise. > (aarch64_vfp_is_call_or_return_candidate): Handle MODE_DECIMAL_FLOAT. > (aarch64_scalar_mode_supported_p): For DECIMAL_FLOAT_MODE_P, return > default_decimal_float_supported_p. > * config/aarch64/iterators.md (GPF_TF_F16): Add SD, DD, and TD modes. > (SFD): New iterator. > (DFD): New iterator. > (TFD): New iterator. > (GPF_TF): Add SD, DD, and TD modes. > (TX): Add TD mode. > * config/aarch64/aarch64.md (*movsf_aarch64): Use SFD iterator. > (*movdf_aarch64): Use DFD iterator. > (*movtf_aarch64): Use TFD iterator. > (define_split for TF): Use TFD iterator. > > > gcc/testsuite/ChangeLog: > * c-c++-common/dfp/pr39986.c: Allow for word instead of just long. > > libgcc/ChangeLog: > * config.host (aarch64*-*-elf): Add t-dfprules to tmake_file. > (aarch64*-*-freebsd*): Likewise. > (aarch64*-*-linux*): Likewise.