سؤال

There is a comparison:

if( val0 > val1 )

where val0 and val1 are double variables.

The code generated by the Apple LLVM compiler is

+0x184  vcmpe.f64                      d17, d16
+0x188  vmrs                           APSR_nzcv, fpscr <-- FP status transfer (30 cycles stall of ALU)
+0x18c  ble.w                          .....

Is there any way to avoid this kind of transfer?

[UPDATE] The code is running on the Cortex-A8 processor.

هل كانت مفيدة؟

المحلول

As it seems it's impossible to avoid flags transition as with the code flow management deals ARM part of the processor, not Neon co-processor. Question is closed.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top