tags:

views:

174

answers:

1

Hello, I have used gdb to step through the assembler code that implement the standard C sin() function in the standard C math library (-lm -march=pentium3 -mfpmath=387). There is a lot of stub there and I don't know why they have not simply inlined the fsin assembler instruction. The same happens with other mathematic functions. Why they don't just call the corresponding FPU instruction?

A: 

You should probably enable intrinsics - the intrinsic implementation of sinf is pretty much sure to be inlined (unless, say, someone takes an address of it, or some other unusual circumstances).

On VS that amounts to compiling with /Oi.

Ofek Shilon