Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

It's 2016 and COMPILERS ARE STILL STUPID

Name: Cudder !cXCudderUE 2015-12-31 22:29

Just analysing a device driver for hardware few months old... as usual, it's as bloated as a week-old dead pig overall but then I come across pieces like this:

shl ecx, 4
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd
mov ecx, edx
and ecx, 3
rep stosb


:facepalm:

Name: Cudder !HBl1hGyY4Y 2018-02-06 4:36

>>96
I'm guessing it was something like

x = *((short*)p)++;
y = *p++;


since the code before that is (there are some other intervening unrelated instructions too, signified by ...):

mov ax, [ebp+0]
...
mov bl, [ebp+2]
...
add ebp, 2
...
inc ebp


Not sure of compiler. Might be MSVC

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List