Best register usage

Jonathon McKitrick jcm at FreeBSD-uk.eu.org
Tue Sep 27 18:32:00 PDT 2005


A couple of questions...

first, I understand that BSD is C based, so system calls are expected to
respect (and preserve) esi, edi, and ebx.

second, I understand that the string instructions work on esi and edi.

Aside from that, what reasons are there for choosing one register over another
for indirect addressing?  Is there compelling reason to keep addresses in esi
and/or edi?  What about calls?  Is it better to 'call' a subroutine from a
particular register, other than preservation of ebx/esi/edi?

jcm
--
If you cannot do something well, learn to enjoy doing it poorly.





More information about the Users mailing list