Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How does SHR/SHL work?

Author: Olaf Jenkner

Date: 12:00:23 02/14/01

Go up one level in this thread


On February 14, 2001 at 13:38:43, Severi Salminen wrote:

>Hi!
>
>I managed to speedup my movegenerator quite a bit making the crucial assembler
>functions completely branchless. Then I noticed one thing I was not quite sure
>about. I was using SHR eax,cl with values of cl more than 32 - first I didn't
>consider this possibility. So: Is SHR eax,33 same as SHR eax,1 - is cl allways
>between 0 and 32? It seems to be. Everything seemed to function just right so
>was I just very lucky to _not_ notice this before trying?
>
>Severi
There is no problem. At least the 386 (because of compatibility perhaps
all later ones too, but my book is quite old) uses only the last 5 bits.
The 8086 uses all 8 Bits.

OJe




This page took 0 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.