mbox series

[avr,0/3] Support 64-bit (long) double.

Message ID 268c2e7e-aca7-58fa-602c-6b9dafc133e7@gjlay.de
Headers show
Series Support 64-bit (long) double. | expand

Message

Georg-Johann Lay Dec. 16, 2019, 4:40 p.m. UTC
Now that the avr backend can support 64-bit floats by means of 
configure-options --with-double= and --with-long-double=, this patch 
series adds some routines to support it.

It's an ad-hoc, avr-specific implementation in assembly and GNU-C which 
is added as a new subfolder in libgcc/config/avr/libf7.

Patch 1/3 is the GCC changes: Documentation and new avr-specific 
configure options:

--with-libf7 selects to which level double support from libf7 is added 
to libgcc.

--with-double-comparison select what FLOAT_LIB_COMPARE_RETURNS_BOOL returns.

I wrote the libf7 code from scratch and put it under GPL v3 + library 
exception, so it should be no problem to have it as part of libgcc.

Patch 2/3 is the libgcc additions:

--with-libf7 selects which makefile-snips from libf7 to use.

Patch 3/3 is the actual libf7 implementation.  A great deal of which is 
assembly, together with C + inline assembly for higher routines.

Ok for trunk?

Johann

Comments

Georg-Johann Lay Dec. 16, 2019, 4:46 p.m. UTC | #1
Am 16.12.19 um 17:40 schrieb Georg-Johann Lay:

Patch 2/3 is the libgcc additions:

--with-libf7 selects which makefile-snips from libf7 to use.

libgcc/
	* 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.
Georg-Johann Lay Dec. 16, 2019, 4:49 p.m. UTC | #2
Am 16.12.19 um 17:40 schrieb Georg-Johann Lay:
Patch 3/3 is the actual libf7 implementation.  A great deal of which is
assembly, together with C + inline assembly for higher routines.

Johann

libgcc/config/avr/libf7/
	* 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.
Georg-Johann Lay Dec. 28, 2019, 11:53 a.m. UTC | #3
Ping #1

> Now that the avr backend can support 64-bit floats by means of 
> configure-options --with-double= and --with-long-double=, this patch 
> series adds some routines to support it.
> 
> It's an ad-hoc, avr-specific implementation in assembly and GNU-C which 
> is added as a new subfolder in libgcc/config/avr/libf7.
> 
> Patch 1/3 is the GCC changes: Documentation and new avr-specific 
> configure options:
> 
> --with-libf7 selects to which level double support from libf7 is added 
> to libgcc.
> 
> --with-double-comparison select what FLOAT_LIB_COMPARE_RETURNS_BOOL 
> returns.
> 
> I wrote the libf7 code from scratch and put it under GPL v3 + library 
> exception, so it should be no problem to have it as part of libgcc.
> 
> Patch 2/3 is the libgcc additions:
> 
> --with-libf7 selects which makefile-snips from libf7 to use.
> 
> Patch 3/3 is the actual libf7 implementation.  A great deal of which is 
> assembly, together with C + inline assembly for higher routines.
> 
> Ok for trunk?
> 
> Johann
>
Georg-Johann Lay Dec. 28, 2019, 11:54 a.m. UTC | #4
Ping #1

> Am 16.12.19 um 17:40 schrieb Georg-Johann Lay:
> 
> Patch 2/3 is the libgcc additions:
> 
> --with-libf7 selects which makefile-snips from libf7 to use.
> 
> libgcc/
>     * 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.
>
Georg-Johann Lay Dec. 28, 2019, 11:55 a.m. UTC | #5
Ping #1

> Am 16.12.19 um 17:40 schrieb Georg-Johann Lay:
> Patch 3/3 is the actual libf7 implementation.  A great deal of which is
> assembly, together with C + inline assembly for higher routines.
> 
> Johann
> 
> libgcc/config/avr/libf7/
>     * 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.
>
Jeff Law Jan. 6, 2020, 4:26 p.m. UTC | #6
On Mon, 2019-12-16 at 17:46 +0100, Georg-Johann Lay wrote:
> Am 16.12.19 um 17:40 schrieb Georg-Johann Lay:
> 
> Patch 2/3 is the libgcc additions:
> 
> --with-libf7 selects which makefile-snips from libf7 to use.
> 
> libgcc/
> 	* 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.
Same as #1/3, libf7->libf77.  Otherwise this looks reasonable.

jeff
Jeff Law Jan. 6, 2020, 4:26 p.m. UTC | #7
On Mon, 2019-12-16 at 17:49 +0100, Georg-Johann Lay wrote:
> Am 16.12.19 um 17:40 schrieb Georg-Johann Lay:
> Patch 3/3 is the actual libf7 implementation.  A great deal of which is
> assembly, together with C + inline assembly for higher routines.
> 
> Johann
> 
> libgcc/config/avr/libf7/
> 	* 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.
Same with this one was well.  libf7->libf77.

jeff