On Sun, Jul 04, 2021 at 06:55:47AM +0000, Nick Hudson wrote:
> Module Name:  src
> Committed By: skrll
> Date:         Sun Jul  4 06:55:47 UTC 2021
> 
> Modified Files:
>       src/common/lib/libc/arch/aarch64/atomic: atomic_nand_16.S
>           atomic_nand_32.S atomic_nand_64.S atomic_nand_8.S
> 
> Log Message:
> Fix the logic operation for atomic_nand_{8,16,32,64}
> 
> From the gcc docs the operations are as follows
> 
>  { tmp = *ptr; *ptr = ~(tmp & value); return tmp; }   // nand
>  { tmp = ~(*ptr & value); *ptr = tmp; return *ptr; }   // nand
> 
> yes, this is really rather strange.

This depends on which GCC version you are looking at. They changed it
sometime in the early GCC 4 days.

Joerg

Reply via email to