www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/09/08:37:10

Xref: news2.mv.net comp.os.msdos.djgpp:3617
From: nicolas AT dsys DOT ceng DOT cea DOT fr (Eric NICOLAS)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: mov %eax, %eax in generated asm source
Date: 9 May 1996 06:43:09 GMT
Organization: Commissariat a l'energie atomique, Grenoble (France)
Lines: 22
Message-ID: <4ms45t$8jv@news.cea.fr>
References: <4mnhbv$qs2 AT doc DOT zippo DOT com>
Reply-To: nicolas AT dsys DOT ceng DOT cea DOT fr
NNTP-Posting-Host: hudson.ceng.cea.fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


>Can anyone tell me the purpose of the code that is generated by
>gcc -S fred.c
>
>whereby it generates
>
>mov %eax, %eax
>
>???? It seems like a time-waster to me ??

I *think* this is one of the most efficient way for testing if %eax is 
zero without modifying it. the other way is "or %eax,%eax".

-- 
Eric Nicolas <nicolas AT dsys DOT ceng DOT cea DOT fr>

Take a look to the SWORD home page :
	france:	http://bunny.ensea.fr/Pages_Perso/Cedric_Joulain/sword.web/home.html
	us:	http://www.iquest.net/~cworley/sword.web/home.html


- Raw text -


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