[llvm-dev] cmpxchg on floats
Joerg Sonnenberger via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 17 16:27:09 PDT 2020
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 to have separate FP state (say, atomic add won’t
> necessarily affect the scalar FP execution’s exception 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?
More information about the llvm-dev