Mail Archives: djgpp/1994/10/13/02:44:14
I was going over the asm output of a program and I came across this
little snippet:
movl %eax,-4(%ebp)
movl -4(%ebp),%eax
There wasn't a label in between or anything, just this totally useless
instruction. This was with -O3.
I've also come across silly little things like this:
movl %eax,%edx
sall %edx,6
movl %edx,%eax
instead of:
sall %edx,6
movl %eax,%edx
Another useless instruction, but this one is a little more vague so I
guess I can forgive the compiler (barely). But the first example is just
ridiculous!
Kim
- Raw text -