crt: Replace the arm version of exp2.c with assembly files

If built with -ffast-math, clang replaces the call to pow(2, x) with
exp2(x) directly, making the implementation of exp2() an infinite
recursion. This can be either avoided by building these object files
with -fno-builtin, -fno-builtin-pow, or by implementing the function
in assembly.

For aarch64, the same already happens even without -ffast-math,
and due to that, the aarch64 exp2 function wrapper already is
implemented in assembly.

While building with -ffast-math can break certain math routines and
thus can be considered a self-inflicted issue, it's safest to avoid
constructs that potentially can be optimized into an infinite self
recursion.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 files changed