Topic created on: April 11, 2013 10:50 CDT by nopsledshell .
i would like to get information about the output generated from two compilers (GCC and Visual CPP) - what the code below do? what was the original source code? what is the difference between those two compilers when generating the assembly code?
gcc:
mov edx, [ebp+var_4]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, edx
mov [ebp+var_8], eax
Visual CPP:
mov ecx, [ebp+var_4]
sub ecx, 1Eh
neg ecx
sbb ecx, ecx
mov [ebp+var_C], ecx