title: Assembler error (operand type mismatch for `setz') after upgrading gcc 4.8 / devtoolset-2
body: <p>After upgrading to gcc 4.8 via devtoolset-2, I can no longer compile one third party file within our legacy app, it complains of <code>Error: operand type mismatch for setz</code>
  We didn't write the code and it has been compiling for 10+ years on a variety of gcc versions.</p>
  
  <p>I've upgraded binutils as well.</p>
  
  <p>I don't know assembler. There are only two <code>setz</code> commands in the code.  What's wrong with the syntax and how can I fix it? Thanks for your help.</p>
  
  <pre><code>    setz %%bl;\
      cmpb $0,%%al;\
      setz %0;\
      xorb %%bl,2(%%edi);\
  </code></pre>
  
  <p>32-bit Centos 6. Core 2 Duo. Compile Line:</p>
  
  <pre><code>cc -W -Wall -O3 -DHAS_STDINT -Wall -mmmx -fasm -c -o h264/decoder/biaridecod.o h264/decoder/biaridecod.c
  h264/decoder/biaridecod.c: Assembler messages:
  h264/decoder/biaridecod.c:319: Error: operand type mismatch for `setz'
  </code></pre>
  
  <p>Tool Info</p>
  
  <pre><code>$ which as cc
  /opt/rh/devtoolset-2/root/usr/bin/as
  /opt/rh/devtoolset-2/root/usr/bin/cc
  $ as --version
  GNU assembler version 2.23.52.0.1-10.el6 20130226
  $ cc --version
  cc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
  </code></pre>
  
  <p>Code Fragment</p>
  
  <pre><code>inline unsigned int biari_decode_symbol(DecodingEnvironmentPtr dep, BiContextTypePtr bi_ct )
  {
      unsigned int bit;
  
      asm volatile("\
      movl $0,%0;\
      movl %1,%%esi;\
      movl %2,%%edi;\
      movl 4(%%esi),%%eax;\
      movzwl (%%edi),%%ebx;\
      movl 8(%%esi),%%ecx;\
      movl %%eax,%%edx;\
      shrl $6,%%eax;\
      andl $3,%%eax;\
      movzbl rLPS_table_64x4(%%eax,%%ebx,4),%%ebx;\
      subl %%ebx,%%edx;\
      movzbl 2(%%edi),%%eax;\
      cmpl %%edx,%%ecx;\
      jge DL_BIGA;\
      movl %%eax,%0;\
      cmpw $62,(%%edi);\
      jge DL_ENDA;\
      incw (%%edi);\
      jmp DL_ENDA;\
  DL_BIGA:\
      subl %%edx,%%ecx;\
      movl %%ebx,%%edx;\
      movl %%ecx,8(%%esi);\
      cmpw $0,(%%edi);\
      setz %%bl;\
      cmpb $0,%%al;\
      setz %0;\
      xorb %%bl,2(%%edi);\
      movzwl (%%edi),%%eax;\
      movzwl AC_next_state_LPS_64(,%%eax,2),%%ebx;\
      movw %%bx,(%%edi);\
  DL_ENDA:\
      bsr %%edx,%%ebx;\
      movl $8,%%ecx;\
      subl %%ebx,%%ecx;\
      xorl %%eax,%%eax;\
      cmpl $0,%%ecx;\
      cmovle %%eax,%%ecx;\
      movl %%ecx,%%ebx;\
      shll %%cl,%%edx;\
      movl %%edx,4(%%esi);\
      cmpl $0,%%ebx;\
      jle DL_WHILE_END;\
  DL_WHILEA:\
      cmp $0,16(%%esi);\
      jg DL_IFA;\
      movl 20(%%esi),%%eax;\
      movl 24(%%esi),%%edi;\
      movl (%%eax),%%edx;\
      incl (%%eax);\
      movzbl (%%edi,%%edx),%%ecx;\
      movl $8,16(%%esi);\
      movl %%ecx,12(%%esi);\
      DL_IFA:\
      movl 12(%%esi),%%edx;\
      movl 16(%%esi),%%ecx;\
      movl $1,%%eax;\
      cmpl %%ecx,%%ebx;\
      cmovl %%ebx,%%ecx;\
      shll %%cl,8(%%esi);\
      subl %%ecx,16(%%esi);\
      shll %%cl,%%eax;\
      subl %%ecx,%%ebx;\
      decl %%eax;\
      movl 16(%%esi),%%ecx;\
      shrl %%cl,%%edx;\
      andl %%eax,%%edx;\
      orl %%edx,8(%%esi);\
      cmpl $0,%%ebx;\
      jg DL_WHILEA;\
  DL_WHILE_END:"
      :"=g"(bit)
      :"g"(dep),"g"(bi_ct)
      :"eax","ebx","ecx","edx","esi","edi","mm0","mm1","mm2","mm3","mm4","mm5","mm6","mm7");
  
      return(bit);
  </code></pre>