<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    This has been brought up a couple times now.  I don't believe anyone
    has voiced strong objection to having a variant which directly takes
    pointers, but no one has proposed a patch either.  <br>
    <br>
    p.s. I'm solidly in the "it would be nice to see" camp.  For much
    the same reasons as David.  <br>
    <br>
    Philip<br>
    <br>
    <div class="moz-cite-prefix">On 09/06/2014 02:31 PM, Chuan Qiu
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAARSEj=SSY4q-g0NLo_a1CAo8K6MX2NC_=pMkXPijL4osp_==w@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span
          style="font-family:arial,sans-serif;font-size:11px">cmpxchg
          only support exchange on int operands, but pointer values can
          be very useful here, e.g. stack<T> in a linked-list, the
          top can be atomic<Node<T>*>. </span>
        <div style="font-family:arial,sans-serif;font-size:11px">in
          clang++, cmpxchg operations on atomic<T*>  are bitcasted
          i64 and do the operation, which is ugly.</div>
        <div style="font-family:arial,sans-serif;font-size:11px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:11px">Any
          reason or concern why cmpxchg doesn't support pointer
          operands?</div>
        <div style="font-family:arial,sans-serif;font-size:11px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:11px">Thanks</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>