<div dir="ltr">On Sun, Aug 21, 2011 at 19:42, Thomas Schilling <span dir="ltr">&lt;<a href="mailto:nominolo@googlemail.com">nominolo@googlemail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 16 August 2011 15:39, Johan Tibell &lt;<a href="mailto:johan.tibell@gmail.com">johan.tibell@gmail.com</a>&gt; wrote:<br>
&gt; the CPU masks out the<br>
&gt; last 5 bits in the shift amount and only uses those when shifting<br>
<br>
</div>As an aside, this may be how it&#39;s specified now in all modern x86(-64)<br>
CPUs, but it definitely wasn&#39;t true for all CPUs.  Some older x86 CPUs<br>
actually would set the value to zero if the shift amount was greater<br>
than the word length.  (I&#39;m not sure which, but may have been<br>
different in early 386 CPUs and Athlon CPUs.)</blockquote><div><br></div><div>FWIW I vaguely recall a bit of an outcry when this changed on Intel CPUs.  It may have been around the 80486. </div></div><div><br></div>-- <br>
brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br><br>
</div>