This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Creating a more efficient sincos interface
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Thu, 13 Sep 2018 17:32:42 +0300 (MSK)
- Subject: Re: RFC: Creating a more efficient sincos interface
- References: <HE1PR08MB1035741787AE270399E22EA7831B0@HE1PR08MB1035.eurprd08.prod.outlook.com>
On Thu, 13 Sep 2018, Wilco Dijkstra wrote:
> What do people think? Ideally I'd like to support this in a generic way so all targets can
> benefit, but it's also feasible to enable it on a per-target basis. Also since not all libraries
> will support the new interface, there would have to be a flag or configure option to switch
> the new interface off if not supported (maybe automatically based on the math.h header).
GCC already has __builtin_cexpi for this, so I think you can introduce cexpi
implementation in libc, and then adjust expand_builtin_cexpi appropriately.
I wonder if it would be possible to add a fallback cexpi implementation to
libgcc.a that would be picked by the linker if there's no such symbol in libm?
Alexander