diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-06-08 22:00:35 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-06-08 22:00:35 +0000 |
commit | 34b0cb6bec86f841e65827bb4ce9833993d76ba9 (patch) | |
tree | 6e219b6d6a5b2c0f1376e75af8143ddf3132723a | |
parent | 69a849b8086f2a11905df141b8233ef83d9e9e5f (diff) |
On ARM, make GCC generate code which uses our library fabs, fabsf,
and fabsl calls, instead of inlining its builtins implemented with
__gedf2 & __negdf2 softfloat calls which is wrong and actually
slower.
Looked over by miod@. Also kettenis@ noted, that GCC4 has this fixed.
-rw-r--r-- | gnu/usr.bin/gcc/gcc/builtins.def | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/gcc/builtins.def b/gnu/usr.bin/gcc/gcc/builtins.def index 39279a1e514..e8bef49bdd0 100644 --- a/gnu/usr.bin/gcc/gcc/builtins.def +++ b/gnu/usr.bin/gcc/gcc/builtins.def @@ -159,6 +159,20 @@ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_LABS, "__builtin_labs", BT_FN_LONG_LONG) +#ifdef __arm__ +DEF_FALLBACK_BUILTIN(BUILT_IN_FABS, + "__builtin_fabs", + BT_FN_DOUBLE_DOUBLE, + ATTR_CONST_NOTHROW_LIST) +DEF_FALLBACK_BUILTIN(BUILT_IN_FABSF, + "__builtin_fabsf", + BT_FN_FLOAT_FLOAT, + ATTR_CONST_NOTHROW_LIST) +DEF_FALLBACK_BUILTIN(BUILT_IN_FABSL, + "__builtin_fabsl", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + ATTR_CONST_NOTHROW_LIST) +#else /* __arm__ */ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABS, "__builtin_fabs", BT_FN_DOUBLE_DOUBLE) @@ -168,6 +182,7 @@ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSF, DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSL, "__builtin_fabsl", BT_FN_LONG_DOUBLE_LONG_DOUBLE) +#endif /* __arm__ */ DEF_C99_BUILTIN(BUILT_IN_LLABS, "__builtin_llabs", |