Reputation: 111
On an ARM cortex m0:
How many cycles does it take to perform multiplication of single precision floats and store them into a float? i.e. x = a*b; Where x, a, and b are single precision IEE 754 float point.
Upvotes: 1
Views: 1833
Reputation: 93476
The answer will obviously depend on your compiler's implementation of software floating point. You could measure it or you could step the code in your debugger and count the instructions executed.
There is a question here, with an answer that suggests 35 cycles on an Intel XScale example, that may be broadly comparable with your target, however that was for an FPU emulation example. With FPU emulation, an FPU instruction causes an invalid instruction exception on hardware without an FPU, and the exception handler interprets the instruction and calls the appropriate software function - there is a small overhead in that, that you will not have in a direct software implementation.
Upvotes: 3