I was writing a vsprintf function to use my 64-bit OS kernel (written by C), and checked that it works well in Visual Studio and Cygwin gcc.Then, I put to my kernel and run... but kernel doesn't works well
I debugged and figured out the problem: vsprintf contains next assembly code
movdqa xmm0,XMMWORD PTR [rip+0x0]
The real problem is that I NEVER use floating point!
I guess that was gcc's optimization, and It seems to be correct because It works well without optimization.
Is there any solution, so to speak, gcc option that disable optimization with xmm registers?