<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 - LLVM should model TLSDESC accessor as clobbering NZCV"
   href="https://bugs.llvm.org/show_bug.cgi?id=40504">40504</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM should model TLSDESC accessor as clobbering NZCV
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>peter@pcc.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>arnaud.degrandmaison@arm.com, llvm-bugs@lists.llvm.org, peter.smith@linaro.org, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While reviewing Android's proposed implementation of TLSDESC:
<a href="https://android-review.googlesource.com/c/platform/bionic/+/886118">https://android-review.googlesource.com/c/platform/bionic/+/886118</a>

I noticed that it does not attempt to preserve NZCV. LLVM's model of TLSDESC,
on the other hand, assumes that NZCV is preserved:
<a href="http://llvm-cs.pcc.me.uk/lib/Target/AArch64/AArch64InstrInfo.td#1639">http://llvm-cs.pcc.me.uk/lib/Target/AArch64/AArch64InstrInfo.td#1639</a>

glibc's implementation of TLSDESC doesn't look like it attempts to preserve
NZCV either:
<a href="https://github.com/bminor/glibc/blob/e1e47c912a8e557508362715f7468091def3ec4f/sysdeps/aarch64/dl-tlsdesc.S">https://github.com/bminor/glibc/blob/e1e47c912a8e557508362715f7468091def3ec4f/sysdeps/aarch64/dl-tlsdesc.S</a>

I think that what this means is that we should add NZCV to the list of clobbers
for the TLSDESC accessor.</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>