Enhancement to support IEEE compatible double.
Created attachment 47015 [details] Proposed extension.
Created attachment 47023 [details] double64-3.diff: Patch including libgcc bits.
Created attachment 47030 [details] double64-4.diff: patch that also supports --with-long-double64
Created attachment 47114 [details] double64-5.diff: Support --with-double={32|64} --with-long-double={32|64}
Created attachment 47149 [details] double64-6.diff: Support --with-double={|32|64|32,64|64,32} --with-long-double={|32|64|32,64|64,32|double} gcc/ Support 64-bit double and 64-bit long double configurations. PR target/92055 * config.gcc (tm_defines) [avr]: Set from --with-double=, --with-long-double=. * config/avr/t-multilib: Remove. * config/avr/t-avr: Output of genmultilib.awk is now fully dynamically generated and no more part of the repo. (HAVE_DOUBLE_MULTILIB, HAVE_LONG_DOUBLE_MULTILIB): New variables. Pass them down to... * config/avr/genmultilib.awk: ...here and handle them. * gcc/config/avr/avr.opt (-mdouble=, avr_double). New option and var. (-mlong-double=, avr_long_double). New option and var. * common/config/avr/avr-common.c (opts.h): Include. (diagnostic.h): Include. (TARGET_OPTION_OPTIMIZATION_TABLE) <-mdouble=>: Set default as requested by --with-double=. <-mlong-double=>: Set default as requested by --with-long-double=. (TARGET_OPTION_OPTIMIZATION_TABLE) <-mdouble=, -mlong-double=>: Set default as requested by --with-double= (TARGET_HANDLE_OPTION): Define to this... (avr_handle_option): ...new hook worker. * config/avr/avr.h (DOUBLE_TYPE_SIZE): Define to avr_double. (LONG_DOUBLE_TYPE_SIZE): Define to avr_long_double. (avr_double_lib): New proto for spec function. (EXTRA_SPEC_FUNCTIONS) <double-lib>: Add. (DRIVER_SELF_SPECS): Call %:double-lib. * config/avr/avr.c (avr_option_override): Assert sizeof(long double) >= sizeof(double) for the target. * config/avr/avr-c.c (avr_cpu_cpp_builtins) [__HAVE_DOUBLE_MULTILIB__, __HAVE_LONG_DOUBLE_MULTILIB__] [__HAVE_DOUBLE64__, __HAVE_DOUBLE32__, __DEFAULT_DOUBLE__=] [__HAVE_LONG_DOUBLE64__, __HAVE_LONG_DOUBLE32__] [__HAVE_LONG_DOUBLE_IS_DOUBLE__, __DEFAULT_LONG_DOUBLE__=]: New built-in defined depending on --with-double=, --with-long-double=. * config/avr/driver-avr.c (avr_double_lib): New spec function. * doc/invoke.tex (AVR Options) <-mdouble=,-mlong-double=>: Doc. libgcc/ Support 64-bit double and 64-bit long double configurations. PR target/92055 * config/avr/t-avr (HOST_LIBGCC2_CFLAGS): Only add -DF=SF if long double is a 32-bit type. * config/avr/t-avrlibc: Copy double64 and long-double64 multilib(s) from the vanilla one. * config/avr/t-copy-libgcc: New Makefile snip.
Author: gjl Date: Thu Nov 7 09:19:31 2019 New Revision: 277908 URL: https://gcc.gnu.org/viewcvs?rev=277908&root=gcc&view=rev Log: gcc/ Support 64-bit double and 64-bit long double configurations. PR target/92055 * config.gcc (tm_defines) [avr]: Set from --with-double=, --with-long-double=. * config/avr/t-multilib: Remove. * config/avr/t-avr: Output of genmultilib.awk is now fully dynamically generated and no more part of the repo. (HAVE_DOUBLE_MULTILIB, HAVE_LONG_DOUBLE_MULTILIB): New variables. Pass them down to... * config/avr/genmultilib.awk: ...here and handle them. * gcc/config/avr/avr.opt (-mdouble=, avr_double). New option and var. (-mlong-double=, avr_long_double). New option and var. * common/config/avr/avr-common.c (opts.h, diagnostic.h): Include. (TARGET_OPTION_OPTIMIZATION_TABLE) <-mdouble=, -mlong-double=>: Set default as requested by --with-double= (TARGET_HANDLE_OPTION): Define to this... (avr_handle_option): ...new hook worker. * config/avr/avr.h (DOUBLE_TYPE_SIZE): Define to avr_double. (LONG_DOUBLE_TYPE_SIZE): Define to avr_long_double. (avr_double_lib): New proto for spec function. (EXTRA_SPEC_FUNCTIONS) <double-lib>: Add. (DRIVER_SELF_SPECS): Call %:double-lib. * config/avr/avr.c (avr_option_override): Assert sizeof(long double) >= sizeof(double) for the target. * config/avr/avr-c.c (avr_cpu_cpp_builtins) [__HAVE_DOUBLE_MULTILIB__, __HAVE_LONG_DOUBLE_MULTILIB__] [__HAVE_DOUBLE64__, __HAVE_DOUBLE32__, __DEFAULT_DOUBLE__=] [__HAVE_LONG_DOUBLE64__, __HAVE_LONG_DOUBLE32__] [__HAVE_LONG_DOUBLE_IS_DOUBLE__, __DEFAULT_LONG_DOUBLE__=]: New built-in define depending on --with-double=, --with-long-double=. * config/avr/driver-avr.c (avr_double_lib): New spec function. * doc/invoke.tex (AVR Options) <-mdouble=,-mlong-double=>: Doc. * doc/install.texi (Cross-Compiler-Specific Options) <--with-double=, --with-long-double=>: Doc. libgcc/ Support 64-bit double and 64-bit long double configurations. PR target/92055 * config/avr/t-avr (HOST_LIBGCC2_CFLAGS): Only add -DF=SF if long double is a 32-bit type. * config/avr/t-avrlibc: Copy double64 and long-double64 multilib(s) from the vanilla one. * config/avr/t-copy-libgcc: New Makefile snip. Added: trunk/libgcc/config/avr/t-copy-libgcc Removed: trunk/gcc/config/avr/t-multilib Modified: trunk/gcc/ChangeLog trunk/gcc/common/config/avr/avr-common.c trunk/gcc/config.gcc trunk/gcc/config/avr/avr-c.c trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.h trunk/gcc/config/avr/avr.opt trunk/gcc/config/avr/driver-avr.c trunk/gcc/config/avr/genmultilib.awk trunk/gcc/config/avr/t-avr trunk/gcc/doc/install.texi trunk/gcc/doc/invoke.texi trunk/libgcc/ChangeLog trunk/libgcc/config.host trunk/libgcc/config/avr/t-avr trunk/libgcc/config/avr/t-avrlibc
Added for v10.
Author: gjl Date: Fri Nov 8 08:49:07 2019 New Revision: 277954 URL: https://gcc.gnu.org/viewcvs?rev=277954&root=gcc&view=rev Log: PR target/92055 * config/avr/avr.opt (-mdouble=, -mlong-double=): Fix a missing '-' when displaying these options in the help screen. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.opt
Author: gjl Date: Wed Nov 13 08:18:35 2019 New Revision: 278115 URL: https://gcc.gnu.org/viewcvs?rev=278115&root=gcc&view=rev Log: PR target/92055 * config/avr/t-avr (avr-mcus): Do not depend on $(srcdir)/config/avr/t-multilib. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/t-avr
Author: gjl Date: Mon Nov 25 08:59:06 2019 New Revision: 278668 URL: https://gcc.gnu.org/viewcvs?rev=278668&root=gcc&view=rev Log: gcc/ Build double32 / long-double32 multilibs if needed. PR target/92055 * config/avr/t-avr: (HAVE_DOUBLE_MULTILIB, HAVE_LONG_DOUBLE_MULTILIB): Remove vars. (HAVE_DOUBLE32, HAVE_LONG_DOUBLE32, WITH_LONG_DOUBLE) (HAVE_DOUBLE64, HAVE_LONG_DOUBLE64, WITH_DOUBLE): Set from tm_defines and pass to genmultilib.awk. * config/avr/genmultilib.awk: Use these variables to add double32 and / or long-double32 multilib(s) as needed. * config/avr/driver-avr.c (avr_double_lib): Adjust comment. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/driver-avr.c trunk/gcc/config/avr/genmultilib.awk trunk/gcc/config/avr/t-avr
Author: gjl Date: Thu Nov 28 10:29:30 2019 New Revision: 278805 URL: https://gcc.gnu.org/viewcvs?rev=278805&root=gcc&view=rev Log: Must use push insn to pass varargs arguments of DFmode because otherwise the middle-end generates wrong code. PR target/92055 * config/avr/avr.md (MPUSH) [DF, DC]: Add modes to mode iterator. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.md
Author: gjl Date: Thu Dec 5 09:47:35 2019 New Revision: 278992 URL: https://gcc.gnu.org/viewcvs?rev=278992&root=gcc&view=rev Log: PR target/92055 * config/avr/t-avrlibc (MULTISUBDIR): Search for double, not double64. Modified: trunk/libgcc/ChangeLog trunk/libgcc/config/avr/t-avrlibc
Author: gjl Date: Wed Jan 8 09:31:07 2020 New Revision: 279994 URL: https://gcc.gnu.org/viewcvs?rev=279994&root=gcc&view=rev Log: Implement 64-bit double functions. gcc/ PR target/92055 * config.gcc (tm_defines) [target=avr]: Support --with-libf7, --with-double-comparison. * doc/install.texi: Document them. * config/avr/avr-c.c (avr_cpu_cpp_builtins) <WITH_LIBF7_LIBGCC, WITH_LIBF7_MATH, WITH_LIBF7_MATH_SYMBOLS> <WITH_DOUBLE_COMPARISON>: New built-in defines. * doc/invoke.texi (AVR Built-in Macros): Document them. * config/avr/avr-protos.h (avr_float_lib_compare_returns_bool): New. * config/avr/avr.c (avr_float_lib_compare_returns_bool): New function. * config/avr/avr.h (FLOAT_LIB_COMPARE_RETURNS_BOOL): New macro. libgcc/ PR target/92055 * config.host (tmake_file) [target=avr]: Add t-libf7, t-libf7-math, t-libf7-math-symbols as specified by --with-libf7=. * config/avr/t-avrlibc: Don't copy libgcc.a if there are modules depending on sizeof (double) or sizeof (long double). * config/avr/libf7: New folder. libgcc/config/avr/libf7/ PR target/92055 * t-libf7: New file. * t-libf7-math: New file. * t-libf7-math-symbols: New file. * libf7-common.mk: New file. * libf7-asm-object.mk: New file. * libf7-c-object.mk: New file. * asm-defs.h: New file. * libf7.h: New file. * libf7.c: New file. * libf7-asm.sx: New file. * libf7-array.def: New file. * libf7-const.def: New file. * libf7-constdef.h: New file. * f7renames.sh: New script. * f7wraps.sh: New script. * f7-renames.h: New generated file. * f7-wraps.h: New generated file. Added: trunk/libgcc/config/avr/libf7/ trunk/libgcc/config/avr/libf7/ChangeLog (with props) trunk/libgcc/config/avr/libf7/asm-defs.h (with props) trunk/libgcc/config/avr/libf7/f7-renames.h (with props) trunk/libgcc/config/avr/libf7/f7-wraps.h (with props) trunk/libgcc/config/avr/libf7/f7renames.sh (with props) trunk/libgcc/config/avr/libf7/f7wraps.sh (with props) trunk/libgcc/config/avr/libf7/libf7-array.def (with props) trunk/libgcc/config/avr/libf7/libf7-asm-object.mk (with props) trunk/libgcc/config/avr/libf7/libf7-asm.sx (with props) trunk/libgcc/config/avr/libf7/libf7-c-object.mk (with props) trunk/libgcc/config/avr/libf7/libf7-common.mk (with props) trunk/libgcc/config/avr/libf7/libf7-const.def (with props) trunk/libgcc/config/avr/libf7/libf7-constdef.h (with props) trunk/libgcc/config/avr/libf7/libf7.c (with props) trunk/libgcc/config/avr/libf7/libf7.h (with props) trunk/libgcc/config/avr/libf7/t-libf7 (with props) trunk/libgcc/config/avr/libf7/t-libf7-math (with props) trunk/libgcc/config/avr/libf7/t-libf7-math-symbols (with props) Modified: trunk/gcc/ChangeLog trunk/gcc/config.gcc trunk/gcc/config/avr/avr-c.c trunk/gcc/config/avr/avr-protos.h trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.h trunk/gcc/doc/install.texi trunk/gcc/doc/invoke.texi trunk/libgcc/ChangeLog trunk/libgcc/config.host trunk/libgcc/config/avr/t-avrlibc Propchange: trunk/libgcc/config/avr/libf7/ChangeLog ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/ChangeLog ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/asm-defs.h ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/asm-defs.h ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/f7-renames.h ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/f7-renames.h ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/f7-wraps.h ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/f7-wraps.h ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/f7renames.sh ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/f7renames.sh ('svn:executable' added) Propchange: trunk/libgcc/config/avr/libf7/f7renames.sh ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/f7wraps.sh ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/f7wraps.sh ('svn:executable' added) Propchange: trunk/libgcc/config/avr/libf7/f7wraps.sh ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-array.def ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-array.def ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-asm-object.mk ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-asm-object.mk ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-asm.sx ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-asm.sx ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-c-object.mk ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-c-object.mk ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-common.mk ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-common.mk ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-const.def ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-const.def ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-constdef.h ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7-constdef.h ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7.c ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7.c ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/libf7.h ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/libf7.h ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/t-libf7 ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/t-libf7 ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/t-libf7-math ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/t-libf7-math ('svn:mime-type' added) Propchange: trunk/libgcc/config/avr/libf7/t-libf7-math-symbols ('svn:eol-style' added) Propchange: trunk/libgcc/config/avr/libf7/t-libf7-math-symbols ('svn:mime-type' added)
The master branch has been updated by Georg-Johann Lay <gjl@gcc.gnu.org>: https://gcc.gnu.org/g:780e19f87c8a69e425b6f98703e6931f49518a80 commit r10-5942-g780e19f87c8a69e425b6f98703e6931f49518a80 Author: Georg-Johann Lay <avr@gjlay.de> Date: Tue Jan 14 17:45:40 2020 +0100 The mentioned auto-generated file is no more part of the GCC sources, it's auto-generated in $(builddir) during build. PR target/92055 * contrib/gcc_update (files_and_dependencies): Remove entry for gcc/config/avr/t-multilib.