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

2016-08-29 Thread Pranith Kumar
Paolo Bonzini writes: > 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

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

2016-08-29 Thread Paolo Bonzini
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 _

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

2016-08-24 Thread Pranith Kumar
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. Signed-off-by: Pranith Kumar --- include/qemu/atomic.h | 16 +--- 1 file changed, 5 insertions(+),