<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - inline asm doesn't support %z0"
   href="http://llvm.org/bugs/show_bug.cgi?id=21105">21105</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>inline asm doesn't support %z0
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvmbugzilla@limegreensocks.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Using:
clang version 3.5.0 (217039)
Target: i686-pc-windows-gnu
Thread model: posix

Compiling this code with "clang z2.cpp":

int main(int argc, char *argv[])
{
  int a = 3;

   asm volatile ("add%z0 $4, %0": "=m" (a));
}

Gives these errors:
z2.cpp:5:18: error: invalid operand in inline asm: 'add${0:z} $$4, $0'
   asm volatile ("add%z0 $4, %0": "=m" (a));
                 ^
z2.cpp:5:18: error: ambiguous instructions require an explicit suffix (could be
'addb', 'addw', 'addl', or 'addq')
<inline asm>:1:2: note: instantiated into assembly here
        add $4, -12(%ebp)
        ^
2 errors generated.

Note that this code compiles correctly with gcc.  See also the gcc docs at
<a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#i386Operandmodifiers">https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#i386Operandmodifiers</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>