RE: Some questions about the gcc __sync intrinsics

2016-03-09 Thread Pinski, Andrew
> Also, is it worthwhile putting a prfm before the ldaxr. EG There is already a thread upstream about this: https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00508.html I reject adding this to -mcpu=generic as it will hurt ThunderX more than it will help. Prfm is single issue for ThunderX so it

Re: Some questions about the gcc __sync intrinsics

2016-03-09 Thread Yvan Roux
Hi Ed, On 9 March 2016 at 14:02, Edward Nevill wrote: > Hi, > > I have been comparing the stock gcc 5.2 and the Linaro 5.2 (Linaro GCC > 5.2-2015.11-1) and have noticed a difference with the __sync > intrinsics. > > Here is the simple test case > > --- cut here --- >

Some questions about the gcc __sync intrinsics

2016-03-09 Thread Edward Nevill
Hi, I have been comparing the stock gcc 5.2 and the Linaro 5.2 (Linaro GCC 5.2-2015.11-1) and have noticed a difference with the __sync intrinsics. Here is the simple test case --- cut here --- int add_int(int add_value, int *dest) { return __sync_add_and_fetch(dest, add_value); } --- cut