<html>
    <head>
      <base href="https://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 --- - assembler doesn't understand rept with labels as values"
   href="https://llvm.org/bugs/show_bug.cgi?id=27369">27369</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>assembler doesn't understand rept with labels as values
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </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>royger@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hello,

While trying to compile the Xen kernel using clang and the integrated
assembler, I've found that the following assembly snippet doesn't work under
clang integrated as, but it works with gas:

# cat test.S
main:
    .rept 128-(.-main)
    .long 0
    .endr

# clang test.S -c
test.S:2:8: error: unexpected token in '.rept' directive
 .rept 128-(.-main)
       ^
test.S:4:7: error: unmatched '.endr' directive
 .endr
      ^

This is of course a simplification, the original code can be found at:

<a href="http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/x86_64/compat/entry.S">http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/x86_64/compat/entry.S</a>

Is there anyway to workaround this? (apart from using -no-integrated-as)

Thanks, Roger.</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>