r191590 - Implements some of the more commonly used intrinsics in Intrin.h

Warren Hunt whunt at google.com
Mon Sep 30 14:05:09 PDT 2013


I've tested them under a variety cases.  Are you concerned about the (-
_Value) clause?

-Warren


On Mon, Sep 30, 2013 at 3:58 AM, Timur Iskhodzhanov <timurrrr at google.com>wrote:

> 2013/9/28 Warren Hunt <whunt at google.com>:
> > +static __inline__
> >  long __cdecl _InterlockedExchangeAdd(long volatile *_Addend, long
> _Value);
> > ...
> > +static __inline__ short __attribute__((__always_inline__, __nodebug__))
> > +_InterlockedExchangeAdd16(short volatile *_Addend, short _Value) {
> > +  return __atomic_add_fetch(_Addend, _Value, 0) - _Value;
> > +}
> > +static __inline__ long __attribute__((__always_inline__, __nodebug__))
> > +_InterlockedExchangeAdd(long volatile *_Addend, long _Value) {
> > +  return __atomic_add_fetch(_Addend, _Value, 0) - _Value;
> > +}
>
> Are you sure this is a correct/complete implementation?
> http://llvm.org/bugs/show_bug.cgi?id=13283#c5
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130930/48fa1d5b/attachment.html>


More information about the cfe-commits mailing list