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