www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/13/02:44:14

Date: Wed, 12 Oct 1994 18:14:30 -0400 (EDT)
From: Kimberley Burchett <OKRA AT max DOT tiac DOT net>
Subject: this is optimization?
To: DJGPP Mailing List <djgpp AT sun DOT soe DOT clarkson DOT edu>

  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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019