Re: cmpxchg and x86 flags output

From: David Howells
Date: Wed Jun 22 2016 - 12:14:30 EST


H. Peter Anvin <hpa@xxxxxxxxx> wrote:

> So how do we make this move forward?

Getting my API additions in is relatively straightforward, I think. The
whether-or-notness of the cmpxchg operation succeeding can be calculated by
comparing the original value read from memory with the value-to-be-replaced
inside the API function.

This can later be replaced with the boolean output from the CMPXCHG
instruction, the branch target from the LL/SC skipping or the result of the
intrinsics.

David