<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hello Chris,<br>
      <br>
      I've asked an engineer from Oracle to answer: <br>
<a class="moz-txt-link-freetext" href="http://clang-developers.42468.n3.nabble.com/atomic-XXX-operations-in-libcxx-for-Sparc-td4049158.html">http://clang-developers.42468.n3.nabble.com/atomic-XXX-operations-in-libcxx-for-Sparc-td4049158.html</a><br>
      but reply is not propagated back to this list, so here you are:<br>
      ==========<br>
    </tt><br>
    Hi,
    <br>
    <br>
    I'm assuming you are talking about porting LLVM to Solaris SPARC.
    <br>
    <br>
    The library support for C++11 atomics feature is already available
    on Solaris 11. It is in a separate library called libatomic.so in
    /usr/lib though. You could try if this solves your immediate
    problem. <br>
    <br>
    This library is not a Solaris system library, it comes from GCC 4.8.
    So you may need to install some GCC runtime library packages. If
    LLVM depends on this library, it is vulnerable to an ABI change, is
    it why you think there could be resistance? There is some effort
    going to to standardize the ABI of this library, not sure if you are
    interested?
    <br>
    <br>
    The sized version (with a _n suffix) can also be implemented by
    back-end generating inlined code because all of them can be
    implemented with lock-free instructions, so it does not need locks
    or other meta data supported by a runtime library.
    <br>
    <br>
    Thanks,
    <br>
    - Bin <br>
    <br>
    =========<br>
    <br>
    Hope it helps,<br>
    Vladimir.<br>
    <br>
    <div class="moz-cite-prefix">On 12/17/15 03:28 PM, Chris.Dewhurst
      via cfe-dev wrote:<br>
    </div>
    <blockquote
      cite="mid:2B27027E253F7F41BE3AB82FF9E1F957016FD988@ExMbx1.ul.campus"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css" id="owaParaStyle"></style>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;">Hi,
        <div><br>
        </div>
        <div>I am further developing the compiler back-end for Sparc for
          LLVM and I have some tests which the requirements of my
          project need to pass. They are using __atomic__XXX operations
          in li<font size="2">bcxx,
            e.g. __atomic_compare_exchange_1, __atomic_fetch_xor_2
            (among others).</font></div>
        <div><font size="2"><br>
          </font></div>
        <div><font size="2">These are not implemented currently for
            Sparc and if I understand <a class="moz-txt-link-freetext" href="http://libcxx.llvm.org/docs/">http://libcxx.llvm.org/docs/</a></font><a
            moz-do-not-send="true" href="http://libcxx.llvm.org/docs/"
            target="_blank" style="font-size: 10pt;">http://libcxx.llvm.org/docs/</a> correctly,
          the relevant library containing these inbuilt functions are
          only implemented for i386 and x86_64.</div>
        <div><br>
        </div>
        <div>However, I still need to get these working. There could be
          some resistance if I suggest using the GCC libraries to solve
          this problem, but I assume that it's a very non-trivial task
          to port this library to Sparc.</div>
        <div><br>
        </div>
        <div>Would my assumption be correct here? Could anyone give me
          an estimate for the amount of time it might take to port this?
          Even a scientific wild-ass guess (SWAG) would be better than
          what I could currently make.</div>
        <div><br>
        </div>
        <div>What options do I have?</div>
        <div><br>
        </div>
        <div>If I'm reading this situation incorrectly and it's
          potentially trivial to implement these for Sparc, how might I
          go about this easily? If not, is it possible to use the GCC
          libraries to support this behaviour? Are there any other
          options?</div>
        <div><br>
        </div>
        <div>Best Regards,</div>
        <div>Chris Dewhurst,</div>
        <div>University of Limerick.</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>