<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - x86 integrated assembler: replace .irp 'symbol' under .altmacro mode"
   href="https://bugs.llvm.org/show_bug.cgi?id=38999">38999</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>x86 integrated assembler: replace .irp 'symbol' under .altmacro mode
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>emaste@freebsd.org
          </td>
        </tr>

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

        <tr>
          <th>Blocks</th>
          <td>33405
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Found while trying to build the FreeBSD base system entirely with the
integrated assembler. 

One of .altmacro's effects is:

Expression results as strings
    You can write `%expr' to evaluate the expression expr and use the result as
a string. 

Consider the following snippet:

------------------------
.altmacro

.macro m dst,src
  addq %\src,%\dst
.endm

.irp r,r15
  m r,r8
.endr
------------------------

GNU as and gcc assemble this, while Clang (6.0) IAS produces:

<instantiation>:1:10: error: invalid register name
addq %r8,%r
         ^~
<instantiation>:1:1: note: while in macro instantiation
m r,r8
^
macro.s:7:1: note: while in macro instantiation
.irp r,r15
^</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta] Using the integrated assembler to build the FreeBSD base system (kernel + world)"
   href="https://bugs.llvm.org/show_bug.cgi?id=33405">Bug 33405</a>] [meta] Using the integrated assembler to build the FreeBSD base system (kernel + world)
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>