2012-09-05 10:47:50 +02:00
|
|
|
# This file is used if not configured --with-avrlibc=no
|
|
|
|
#
|
|
|
|
# AVR-Libc comes with hand-optimized float routines.
|
|
|
|
# For historical reasons, these routines live in AVR-Libc
|
|
|
|
# and not in libgcc and use the same function names like libgcc.
|
|
|
|
# To get the best support, i.e. always use the routines from
|
|
|
|
# AVR-Libc, we remove these routines from libgcc.
|
|
|
|
#
|
|
|
|
# See also PR54461.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Arithmetic:
|
|
|
|
# __addsf3 __subsf3 __divsf3 __mulsf3 __negsf2
|
|
|
|
#
|
|
|
|
# Comparison:
|
|
|
|
# __cmpsf2 __unordsf2
|
|
|
|
# __eqsf2 __lesf2 __ltsf2 __nesf2 __gesf2 __gtsf2
|
|
|
|
#
|
|
|
|
# Conversion:
|
|
|
|
# __fixsfdi __fixunssfdi __floatdisf __floatundisf
|
|
|
|
# __fixsfsi __fixunssfsi __floatsisf __floatunsisf
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# These functions are contained in modules:
|
|
|
|
#
|
|
|
|
# _addsub_sf.o: __addsf3 __subsf3
|
|
|
|
# _mul_sf.o: __mulsf3
|
|
|
|
# _div_sf.o: __divsf3
|
|
|
|
# _negate_sf.o: __negsf2
|
|
|
|
#
|
|
|
|
# _compare_sf.o: __cmpsf2
|
|
|
|
# _unord_sf.o: __unordsf2
|
|
|
|
# _eq_sf.o: __eqsf2
|
|
|
|
# _ne_sf.o: __nesf2
|
|
|
|
# _ge_sf.o: __gesf2
|
|
|
|
# _gt_sf.o: __gtsf2
|
|
|
|
# _le_sf.o: __lesf2
|
|
|
|
# _lt_sf.o: __ltsf2
|
|
|
|
#
|
|
|
|
# _fixsfdi.o: __fixsfdi
|
|
|
|
# _fixunssfdi.o: __fixunssfdi
|
|
|
|
# _fixunssfsi.o: __fixunssfsi
|
|
|
|
# _floatdisf.o: __floatdisf
|
|
|
|
# _floatundisf.o: __floatundisf
|
|
|
|
# _sf_to_si.o: __fixsfsi
|
|
|
|
# _si_to_sf.o: __floatsisf
|
|
|
|
# _usi_to_sf.o: __floatunsisf
|
|
|
|
|
|
|
|
|
|
|
|
# SFmode
|
|
|
|
LIB2FUNCS_EXCLUDE += \
|
|
|
|
_addsub_sf \
|
|
|
|
_negate_sf \
|
|
|
|
_mul_sf _div_sf \
|
|
|
|
\
|
|
|
|
_compare_sf \
|
|
|
|
_unord_sf \
|
|
|
|
_eq_sf _ne_sf \
|
|
|
|
_gt_sf _ge_sf \
|
|
|
|
_lt_sf _le_sf \
|
|
|
|
\
|
|
|
|
_si_to_sf _sf_to_si \
|
|
|
|
_usi_to_sf _sf_to_usi \
|
|
|
|
_fixunssfsi _fixsfdi \
|
|
|
|
_fixunssfdi \
|
|
|
|
_floatdisf _floatundisf
|
Support 64-bit double and 64-bit long double configurations.
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.
From-SVN: r277908
2019-11-07 10:19:31 +01:00
|
|
|
|
2020-01-08 10:31:07 +01:00
|
|
|
ifeq (,$(WITH_LIBF7_MATH_SYMBOLS))
|
|
|
|
|
|
|
|
# No modules depend on __SIZEOF_LONG_DOUBLE__ or __SIZEOF_DOUBLE__
|
|
|
|
# which means we might have an opportunity to copy libgcc.a.
|
|
|
|
# WITH_LIBF7_MATH_SYMBOLS is set by libf7/t-libf7-math-symbols.
|
|
|
|
|
Support 64-bit double and 64-bit long double configurations.
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.
From-SVN: r277908
2019-11-07 10:19:31 +01:00
|
|
|
ifneq (,$(findstring avr,$(MULTISUBDIR)))
|
|
|
|
|
|
|
|
# We are not in the avr2 (default) subdir, hence copying will work.
|
|
|
|
# In default dir, copying won'twork because the default multilib is
|
|
|
|
# built after all the others.
|
|
|
|
|
2019-12-05 10:47:35 +01:00
|
|
|
ifneq (,$(findstring double,$(MULTISUBDIR)))
|
Support 64-bit double and 64-bit long double configurations.
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.
From-SVN: r277908
2019-11-07 10:19:31 +01:00
|
|
|
|
2019-12-05 10:47:35 +01:00
|
|
|
# We are in double{32|64}/libgcc or long-double{32|64}/libgcc:
|
Support 64-bit double and 64-bit long double configurations.
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.
From-SVN: r277908
2019-11-07 10:19:31 +01:00
|
|
|
# Just copy from the [long ]double=float multilib; we would remove any DFmode
|
|
|
|
# bits from this multilib variant, anyway, because the current assumption
|
|
|
|
# is that avr-libc hosts *all* the IEEE-double stuff.
|
|
|
|
|
|
|
|
LIB2FUNCS_EXCLUDE := %
|
|
|
|
LIB1ASMFUNCS :=
|
|
|
|
libgcc-objects :=
|
|
|
|
libgcov-objects :=
|
|
|
|
objects :=
|
|
|
|
|
|
|
|
t-copy-libgcc.dep: $(srcdir)/config/avr/t-copy-libgcc
|
|
|
|
-rm -f libgcc.a
|
|
|
|
-rm -f libgcov.a
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
libgcc.a libgcov.a libgcc_tm.h: t-copy-libgcc.dep
|
|
|
|
|
|
|
|
Makefile: t-copy-libgcc.dep
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
2020-01-08 10:31:07 +01:00
|
|
|
endif
|