cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

overnite81
Journeyman III

Question regarding x86 and VC++2008

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

Regards.

0 Likes
1 Reply
avk
Adept III

Well, the Microsoft compilers can generate an optimized binary code, but there are several other compilers exist that can generate more optimized binary code, for example, Intel's.
0 Likes