Displaying 3 results from an estimated 3 matches for "fcmpxchg".
Did you mean:
cmpxchg
2020 Aug 22
2
cmpxchg on floats
...etc).
> > > >
> > > > We don't really FP cmpxchg in hardware to implement it, do we? It can be
> > > > lowered as load, FP compare, if not equal cmpxchg load?
> > >
> > > Two points here:
> > >
> > > 1. Hardware with native fcmpxchg already exists.
> > > 2. It's incorrect even if I replace your "if not equal" by "if equal"
> > > (which I assume is what you meant).
> > >
> > > On the latter, assume your float in memory is initially -0.0, thread 1
> > > does cm...
2020 Aug 17
4
cmpxchg on floats
On Fri, Aug 14, 2020 at 10:42:02AM -0700, JF Bastien via llvm-dev wrote:
> We (C, C++, and LLVM) are generally moving towards supporting FP as a
> first-class thing with all atomic operations †, including cmpxchg. It’s
> indeed *usually* specified as a bitwise comparison, not a floating-point
> one, although IIRC AMD has an FP cmpxchg. Similarly, some of the
> operations are allowed
2020 Aug 22
2
cmpxchg on floats
...ception state, might
> > > have a different rounding mode, etc).
> >
> > We don't really FP cmpxchg in hardware to implement it, do we? It can be
> > lowered as load, FP compare, if not equal cmpxchg load?
>
> Two points here:
>
> 1. Hardware with native fcmpxchg already exists.
> 2. It's incorrect even if I replace your "if not equal" by "if equal"
> (which I assume is what you meant).
>
> On the latter, assume your float in memory is initially -0.0, thread 1
> does cmpxchg(-0.0, +0.0) and thread 2 does fcmpxchg(+0.0...