Enzyme icon indicating copy to clipboard operation
Enzyme copied to clipboard

Add support for soft float

Open tgymnich opened this issue 2 years ago • 5 comments

https://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html

Adding support for mul and div would be a good start.

Runtime Function: complex float __mulsc3 (float a, float b, float c, float d)
Runtime Function: complex double __muldc3 (double a, double b, double c, double d)
Runtime Function: complex long double __multc3 (long double a, long double b, long double c, long double d)
Runtime Function: complex long double __mulxc3 (long double a, long double b, long double c, long double d)
These functions return the product of a + ib and c + id, following the rules of C99 Annex G.

Runtime Function: complex float __divsc3 (float a, float b, float c, float d)
Runtime Function: complex double __divdc3 (double a, double b, double c, double d)
Runtime Function: complex long double __divtc3 (long double a, long double b, long double c, long double d)
Runtime Function: complex long double __divxc3 (long double a, long double b, long double c, long double d)
These functions return the quotient of a + ib and c + id (i.e., (a + ib) / (c + id)), following the rules of C99 Annex G.

tgymnich avatar Mar 15 '22 11:03 tgymnich

@tgymnich how many of these are done right now (And can we convert to a check list)?

wsmoses avatar Aug 02 '22 04:08 wsmoses

@wsmoses all of them

tgymnich avatar Aug 02 '22 11:08 tgymnich

If they're all done can we close?

wsmoses avatar Aug 02 '22 13:08 wsmoses

The link contains some more functions. But we can still close this.

tgymnich avatar Aug 02 '22 13:08 tgymnich

Can you add those functions to this issue then? It's fine to keep open but we should mark which ones need doing

wsmoses avatar Aug 02 '22 13:08 wsmoses