I am trying to count the number of dynamic floating-point instructions executed by the CPU in the binary created by GCC for the 30 different programs from the poly bench benchmark using the pin tool. All the floating instructions in x86 are under the X87_ALU category as per the x86 Encoder-Decoder (XED) documentation.
For some reason, I am getting it to be zero for all of the programs unlike all other instruction categories like Binary, load, store, nop, etc. I dissembled the binary using objdump and can't see a single line with an opcode starting from f.
Also, I produced web assembly (.wasm) binaries for all the programs using emscripten (emcc) and later converted the .wasm binary to dissembled .wat file. In those files too, I don't see any floating-point instructions.
PS: From the google searches I have been doing, I understand that x86 has a whole different floating-point unit and stack-based handling for these. Maybe I am missing something on this front?
Any lead on how to see the floating-point instructions in the dissembled binary?
For almost all modern code, FPU is not used and scalar SSE is used instead.
Reasons to use FPU (rather than scalar SSE) are:
sin()
and sqrt()
, or use BCD, but code size is significantly more important than performance. This is extremely unlikely.