[PATCH 01/13] math: Decompose math-use-builtins.h

Wilco Dijkstra Wilco.Dijkstra@arm.com
Wed Jun 10 10:19:01 GMT 2020


Hi Adhemerval,

We've moved from lots of little target implementations to one file and
now back to lots of little target headers?

It makes a lot more sense to use a single target header for this.
You don't need much magic to make this work, eg. each target only
adds defines for any functions it supports (say for all float types), and
the generic header then does something like this:

#include "math-use-builtins.h" // from target if exists, empty generic version

#ifndef USE_ROUND_BUILTIN
# define USE_ROUND_BUILTIN 0
# define USE_ROUNDF_BUILTIN 0
# define USE_ROUNDL_BUILTIN 0
# define USE_ROUNDF128_BUILTIN 0
#endif

Wouldn't that be simpler overall?

Cheers,
Wilco


More information about the Libc-alpha mailing list