こんにちは、最適化に問題があります。
組み込み関数を使用して gcc テストの 1 つをコンパイルしようとしました。
#include <stdio.h>
#ifdef HAVE_C99_RUNTIME
double test1 (double x)
{
return __builtin_pow (x, 1/3);
}
double test2 (double x)
{
return __builtin_pow (x, 4./3.);
}
double test3a (double x)
{
return __builtin_pow (x, 5./3.);
}
double test3b (double x)
{
return __builtin_pow (x, -5./3.);
}
double test4 (double x)
{
return __builtin_pow (x, 7./3.);
}
#endif
次の 2 つの方法でコンパイルしようと
し
gcc -mglibc -O -ffast-math -std=c99 -fno-ident -S -o builtins-58.s
ました call pow
。call cbrt
2つの方法:代わりに
gcc -mbionic -O -ffast-math -std=c99 -fno-ident -S -o builtins-58.s
使用して、出力を取得しました-mbionic
-mglibc
call pow
optmimization
関数がどのようにbuiltin
機能するか知っている人はいますかBionic