Mail Archives: djgpp/1998/08/26/04:32:07
GAMMELJL AT SLU DOT EDU wrote:
>
> 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).
Hi!!
the problem with the movl is that the instruction code is bigger
because of the constate $0x0 that is included in it whereas not for the
xorl... ;)
bye
--
^ ^ ^
| | |
+-+-+ Fabrice ILPONSE
| email: fabrice AT asim DOT lip6 DOT fr
|
|
-
- Raw text -