Author: Walter Faxon
Date: 19:50:40 12/06/02
Go up one level in this thread
On December 06, 2002 at 05:33:42, Matt Taylor wrote: <snip> > >It's also a tad strange that the code loads dl and then copies edx into eax. >It would be more direct to simply store the table value in eax. > <snip> I get the feeling that, for the compiler in question at least, once it decides that a register is going to be used as an address or offset, it loses or ignores its knowledge of the register's bitwise mapping. It preps edx to receive the byte in dl, uses eax to load dl, then copies the whole thing to eax. If it used eax to write to al directly, the compiler would think it still needs to mask out the (already zeroed) rest of eax afterwards. So it does it this way because the reg-reg copy is faster and the edx prep can be overlapped with other work. Anyway, that's a possible explanation. One would need detailed knowledge of the compiler to know for sure. (And don't get mad at the compiler writers; writing good compilers is hard work!) -- Walter
This page took 0.02 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.