Re: [PATCH 13/15] x86: add cmpxchg_flag() variant

From: Christoph Lameter
Date: Tue Aug 23 2011 - 15:52:39 EST


On Tue, 23 Aug 2011, H. Peter Anvin wrote:

> I keep meaning to write up a proposal for the gcc people to output
> arithmetic flag status.

Should be relatively straightforward if you make the processor flag a
builtin variable.

i.e. __processor_flag_zero, __processor_flag__gt etc.

Then the inline cmpxchg functions could simply do a

return __processor_flag_zero;

The code generator then needs to realize from the expression that we are
referring to the zero flag and insert the correct jxx instruction.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/