[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] atomics: Use __atomic_*_n() variant primiti

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/3] atomics: Use __atomic_*_n() variant primitives
Date: Mon, 29 Aug 2016 12:25:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 24/08/2016 22:44, Pranith Kumar wrote:
> Use the __atomic_*_n() primitives which take the value as argument. It
> is not necessary to store the value locally before calling the
> primitive, hence saving us a stack store and load.

If you do this, you might as well do it for __atomic_load and
__atomic_compare_exchange.  However, you'd still need typeof_strip_qual
for __atomic_compare_exchange's "_old" local variable.

The question is, does this actually cause a change in generated code?  I
would be very surprised if it did, but then it's perfectly possible to
have a bug in GCC.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]