提交 ed97dfd9 编写于 作者: R Rich Felker

improve macro logic for enabling arm math asm

in order to take advantage of the fpu in -mfloat-abi=softfp mode, the
__VFP_FP__ (presence of vfp fpu) was checked instead of checking for
__ARM_PCS_VFP (hardfloat EABI variant). however, the latter macro is
the one that's actually specified by the ABI documents rather than
being compiler-specific, and should also be checked in case __VFP_FP__
is not defined on some compilers or some configurations.
上级 790580b2
#include <math.h>
#if __VFP_FP__ && !__SOFTFP__
#if __ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__)
double sqrt(double x)
{
......
#include <math.h>
#if __VFP_FP__ && !__SOFTFP__
#if __ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__)
float sqrtf(float x)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册