This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

gcc for arm cortex a 编译的代码没有生成 vsqrt 指令?

现在用cortex a9,和arm-eabi-gcc 编译一段数学运算,其中有乘除和sqrt,编译选项 -mfpu=vfpv3 -mfloat-abi=softfp,看了反汇编,已经有 vmul,vdiv 这些浮点指令了,但是 sqrt 却是调用的 sqrt 函数,没有生成 vsqrt 指令。然后-O1 优化之后,才生成了 vsqrt 指令。这是怎么回事?

为什么乘除的浮点指令都生成了,而sqrt 却只能在打开优化才能生成vsqrt?

另外,arm gcc 的 -O1 选项都打开那些优化了?