title: Inconsistent behaviour of ROL and OF
body: <p>The manual states</p>
  
  <blockquote>
    <p>The OF flag is defined only for the 1-bit rotates; it is undefined in all other cases (except RCL and RCR instructions
    only: a zero-bit rotate does nothing, that is affects no flags)</p>
  </blockquote>
  
  <p>This is also shown in the pseudocode beneath</p>
  
  <pre><code>IF (COUNT &amp; COUNTMASK) = 1
  THEN OF ← MSB(DEST) XOR CF;
  ELSE OF is undefined;
  FI;
  </code></pre>
  
  <p>However, this is different when tried in practice.
  Here is the code in question</p>
  
  <pre><code>mov rax, 0x4444444433332211
  mov    cl, 0x44
  rol    rax, cl
  </code></pre>
  
  <p>However the overflow flag seems to be set regardless,</p>
  
  <p><a href="http://prntscr.com/p0d0kw" rel="nofollow noreferrer">Before</a></p>
  
  <p><a href="http://prntscr.com/p0d1q4" rel="nofollow noreferrer">After</a></p>
  
  <p>This behaviour isn't specific to 0x44 nor cl being the source, it will happen with any non-zero(provided there would be cause to set OF in the first place).</p>