title: Why is movl preferred to movb when translating a C downcast from unsigned int to unsigned char?
body: <p>Considering a pared-down example of down-casting <code>unsigned</code> to <code>unsigned char</code>,</p>
  <pre class="lang-c prettyprint-override"><code>void unsigned_to_unsigned_char(unsigned *sp, unsigned char *dp)
  {
    *dp = (unsigned char)*sp;
  }
  </code></pre>
  <p>The above C code is translated to assembly code with <code>gcc -Og -S</code> as</p>
  <pre><code>movl    (%rdi), %eax
  movb    %al, (%rsi)
  </code></pre>
  <p>For what reason is the C-to-assembly translation not as below?</p>
  <pre><code>movb    (%rdi), %al
  movb    %al, (%rsi)
  </code></pre>
  <p>Is it because this is incorrect, or because <code>movl</code> is more conventional, or shorter in encoding, than is <code>movb</code>?</p>