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: Anonymous 2016-01-04 8:39

>>40
buying compilers
buying manuals
assuming Intel doesn't cripple low-end hardware
X sucks, why its popular?

Name: Anonymous 2016-01-04 8:49

>>41
Who are you quoting?

Name: Anonymous 2016-01-04 8:55

Name: Anonymous 2016-01-04 12:47

>>42
It's not quoting, it's greentext.

Name: Anonymous 2016-01-04 14:13

>>44
Take your colorblind out of here.

Name: Anonymous 2016-01-04 14:16

It's 2016 and cudder is still cuddering. Cudder off, you mothercudder.

Name: Anonymous 2016-01-04 14:24

>>45
I'm not colourblind, I'm cis-eyed colourflexible and pantone.

Name: Cudder !cXCudderUE 2016-01-05 4:42

>>40
ICC is free for non-commercial use.

And it shows that the stupid wankers working on other compilers are barking up the wrong tree wrt optimisations.

Name: Anonymous 2016-01-05 5:31

>>48
Its true, but they have conditions on who they give it to.
https://software.intel.com/en-us/qualify-for-free-software

Name: Anonymous 2016-01-05 6:21

>>44
But who are you quoting?

>>48
All software where performance is likely to matter will always be commercially developed. It helps no one that
You may use the Materials only for non-commercial use where You receive no fee, salary or any other form of compensation. The Materials may not be used for any other purpose, whether "for profit" or "not for profit." Any work performed or produced as a result of use of the Materials cannot be performed or produced for the benefit of other parties for a fee, compensation or any other reimbursement or remuneration.
(https://software.intel.com/sites/default/files/managed/2a/bb/Master-EULA-for-Intel-Sw-Development-Products-September-2015.pdf), where they also extend their grip to the output binary ICC produces.

Name: Anonymous 2016-01-05 7:21

Also, ICC is closed source: it could contain anything,fatal bugs, backdoors and logic bombs.

Name: Cudder !cXCudderUE 2017-11-12 5:54

It's (almost) 2018 and COMPILERS ARE STILL STUPID

mov ebp, [edi+eax*4]
lea eax, [edi+eax*4]
inc ebp
mov [eax], ebp

Name: Anonymous 2017-11-12 9:19

>>52
Were you expecting 7 bytes of instructions using one temporary? Too bad! It was 9 bytes of instructions using two temporary all along!

Name: Anonymous 2017-11-12 13:44

>>52
I've got to admit, that's pretty stupid.

Name: Anonymous 2017-11-12 15:20

>>52
So how do we improve this, famberlam?

Name: Cudder !cXCudderUE 2017-11-12 16:17

>>53-55
That sequence could be replaced by one 3-byte instruction:

inc dword ptr [edi+eax*4]

The value in ebp is not used after this, so there's no point at all in getting it into a named register.

Name: Anonymous 2017-11-12 16:30

>>55
inc
can take memory operands.

Name: Cudder !cXCudderUE 2017-11-13 7:18

cmp dword ptr[esi], 0
setz dl
test dl, 4
jnz some_label


I have a feeling this time the programmer was the stupid one, because I can't otherwise see how a compiler would generate that unless the input was really if((*foo == 0) & 4) ...

Name: Cudder !cXCudderUE 2017-11-26 6:54

sub ecx, 0
jz ...
dec ecx
jz ...
dec ecx
jnz ...

Wait... what?

Name: Anonymous 2017-11-26 7:07

>>59
Maybe ecx is larger than 2 very often.

Name: Anonymous 2017-11-26 7:10

sub ecx, 0
Why?

Name: >>60 2017-11-26 7:32

>>60
Equal to 2, god dammit.

Name: Anonymous 2017-11-29 3:43

>>48
Gosh, guess that makes it fine then!

Name: Anonymous 2017-12-01 0:50

Reminder that cudder thinks VS2012 is a good compiler that should still be used.

Name: Anonymous 2017-12-01 8:06

>>64
Cudder is all talk and no action!

Name: Anonymous 2017-12-01 8:13

compile those dubs!

Name: Anonymous 2017-12-01 23:54

>>66
Back to 4chan, please.

Name: Anonymous 2017-12-02 2:45

>>66
nice dubs bruh

Name: Anonymous 2017-12-02 2:51

>>68
Way to bump a five year old thread.

Name: Anonymous 2017-12-02 10:11

>>69
back to jp or at least dqn you sad roleplayer

Name: Anonymous 2017-12-02 11:44

>>69
Cudder bumped it.

Name: Anonymous 2017-12-02 15:03

>>70
Never heard of those places.

Name: Cudder !cXCudderUE 2017-12-10 6:09

mov edi, [esp+20]
xor ebx, ebx
mov [esp+20], edi


Seriously.

Name: Anonymous 2017-12-10 21:58

Bump

Name: Anonymous 2017-12-10 22:01

>>73
xor ebx, ebx

does this even do anything? wtf?

Name: Cudder !cXCudderUE 2017-12-10 22:49

>>75
:facepalm:

Name: Anonymous 2017-12-10 22:54

>>76
YHBT

Name: Cudder !cXCudderUE 2018-01-21 17:02

It's 2018 and COMPILERS ARE STILL STUPID

xor ecx, ecx
xor ebp, ebp
mov cx, [edi]
mov bp, [edi+2]
add edi, 2
xor eax, eax
add edi, 2
mov ax, [edi]
add edi, 2


This compiler has apparently never heard of movzx or movsx.

Name: Anonymous 2018-01-21 17:19

>>78
pls explain?? i dont know what this means i am a java coder

Name: Anonymous 2018-01-21 17:20

>>77
nice dubs though

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