<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 --- - NR_PAGEFLAGS macro with inline assembly in ARM"
   href="http://llvm.org/bugs/show_bug.cgi?id=18891">18891</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>NR_PAGEFLAGS macro with inline assembly in ARM
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Backend: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>renato.golin@linaro.org
          </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>As described in <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED --- - List of ARM assembly directives that the Clang integrated-as cannot handle."
   href="show_bug.cgi?id=18199">Bug #18199</a>:


First: asm volatile will emit crap as instructed, expanding the parameters as
necessary. 
Second: gcc will not perform assembly validation and accept GARBAGE!

The garbage portion of the second point is IMPORTANT.

By doing this, they can rely on the frontend translating constant expressions
into values that will be emitted as raw output.  This output is then saved off
and post-processed by a sed script to generate future input for the compiler.

As an example:

#define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val))

DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS)

->NR_PAGEFLAGS #22 __NR_PAGEFLAGS</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>