<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 - prefetch instruction is not accepted in inline asm, sparc"
   href="https://bugs.llvm.org/show_bug.cgi?id=34226">34226</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>prefetch instruction is not accepted in inline asm, sparc
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Sun
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Solaris
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alexander.kirov@oracle.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider the code sample:

] cat prefetch.cpp 
void _Prefetch_read (void *loc, int interval) {
    __asm__ volatile
      ("prefetch [%0+%1], 0" : : "r" (loc), "r" (interval) : "memory" );
  }

int main() {
        int * i = new int[10];
        _Prefetch_read(i, 5);
        return 0;
}

] clang++ prefetch.cpp             
prefetch.cpp:3:8: error: invalid instruction mnemonic
      ("prefetch [%0+%1], 0" : : "r" (loc), "r" (interval) : "memory" );
       ^
<inline asm>:1:2: note: instantiated into assembly here
        prefetch [%i0+%i1], 0
        ^
1 error generated.

] g++ prefetch.cpp 
] a.out 

] CC prefetch.cpp
] a.out</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>