Mail Archives: djgpp/1998/08/25/12:58:14
From: | GAMMELJL AT SLU DOT EDU
|
Date: | Tue, 25 Aug 1998 08:37:55 -0500 (CDT)
|
Subject: | assembly language
|
To: | djgpp AT delorie DOT com
|
Message-id: | <01J10IURTRN694HU4A@SLU.EDU>
|
Organization: | SAINT LOUIS UNIVERSITY St. Louis, MO
|
MIME-version: | 1.0
|
Thanks to those who responded to my query about
movl $0x0,%edx vs xorl %edx,%edx
The movl sets %edx to zero, whereas xorl sets %edx and the carry bit to
zero. Thus the two statements above are not exactly the same thing.
This fact could make little difference to all but a few programmers,
and those few probably already know to avoid the xorl command when
writing codes in assembly language. I find that the movl command
results in faster executables even when xorl can be used as above
(in those cases in which the carry bit does not matter).
- Raw text -