Mail Archives: djgpp/1998/04/22/08:46:45
> > I've made a little program and when I looked in the disassembler
> > window while running the program, I saw movl %eax,%eax. Why is
> > this instruction there? Did I forget to turn on optimization
> > somewhere?
Be sure to use -O or -O2 on the command-line. But I don't think
that's the problem. Could be because the compiler tries to align
jump-labels at 4 (or 8) byte boundaries for speed. Maybe the movl
%eax,%eax is faster than two nop's?
> Uhm.. It's because the compiler is like stupid and stuff..
No it's not. GCC is (at least one of) the best optimizing portable
compiler around.
--
Groeten, Michel. http://www.cs.vu.nl/~mdruiter
____________
\ /====\ / "You know, Beavis, you need things that suck,
\/ \/ to have things that are cool", Butt-Head.
- Raw text -