Re: cmpxchg and x86 flags output

From: H. Peter Anvin
Date: Wed Jun 22 2016 - 13:49:55 EST


On 06/22/16 10:11, Linus Torvalds wrote:
>
> I thought Richard Henderson already had a patch for the condition code
> asm outputs, but maybe I misremember.
>

It is already in the released version of gcc 6.1; there is a patchset in
-tip already for using it for everything other than cmpxchg using the
CC_SET/CC_OUT macros I proposed a while ago. cmpxchg is special because
it requires API changes to take advantage of, which as far as I
understand happens to be exactly the API changes that David has already
implemented. Apparently some other architectures really can benefit
from intrinsics, so that is okay; we can use inline asm with flags
output on x86.

-hpa