The code:
double Ret_Value=0;
by default, VS2012 compiles to:
10112128 xorps xmm0,xmm0
1011212E movsd mmword ptr [Ret_Value],xmm0
If SSE2 is disabled in the project settings, this is compiled for:
101102AC fldz
101102AE lea eax,[Ret_Value]
101102B1 push eax
101102B2 fstp qword ptr [Ret_Value]
Edit: I'm not sure what push, and leaassociated with this initialization, it may be done after that, just shows their disassembler for this line of C ++ code.
Is SSE2 significantly better? Except these two instructions are shorter? What is optimization here?
As it was discovered: the application started crashing on an old processor that does not support SSE2.
source
share