<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 --- - 65536 out of the range of constraint 'I'"
   href="https://llvm.org/bugs/show_bug.cgi?id=26874">26874</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>65536 out of the range of constraint 'I'
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>yaojun8558363@gmail.com
          </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>I try to compile Android kernel by using clang.
During compiling, clang report an error. The error is about the implementation
of spinlock.
It says:  65536 out of the range of constraint 'I'.
env:
 host: x86_64-linux-ubuntu
 target: arm64
 cross_toolchain: gcc-linaro-aarch64-4.9-2014.08
 kernel branch: android-msm-bullhead-3.10-marshmallow-mr1
 code produce error:
 path:{kernel Dir}/arch/arm64/include/asm/spinlock.h
 content:
                //TICKET_SHIFT=16
          65 static inline int arch_spin_trylock(arch_spinlock_t *lock)
          66 {
          67         unsigned int tmp;
          68         arch_spinlock_t lockval;
          69 
          70         asm volatile(
          71 "1:     ldaxr   %w0, %2\n"
          72 "       eor     %w1, %w0, %w0, ror #16\n"
          73 "       cbnz    %w1, 2f\n"
          74 "       add     %w0, %w0, %3\n"
          75 "       stxr    %w1, %w0, %2\n"
          76 "       cbnz    %w1, 1b\n"
          77 "2:"
          78         : "=&r" (lockval), "=&r" (tmp), "+Q" (*lock)
          79         : "I" (1 << TICKET_SHIFT) 
          80         : "memory");
          81 
          82         return !tmp;
          83 }</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>