Question regarding x86 and VC++2008

Discussion created by overnite81 on Dec 20, 2008
Latest reply on Dec 22, 2008 by avk

Hi, I have the following question

Is there a compiler option for x86 in VC++2008 to enforce arithmetic operations with memory operands?

For example, instead of

mov eax,dword ptr [ebp+4]
mov edx,dword ptr [ebp+8]
add eax,edx

The compiler would generate the following

mov eax,dword ptr [ebp+4]
add eax,dword ptr [ebp+8]

The default compiler options seem to ignore such optimizations at all