Hi,

We've been thinking about adding support for the built-in functions for 64bit 
atomic memory access and I'd like to know if this is of any interest. 
Currently the main use of these functions seems to be to implement (SMP safe) 
locking mechanisms where the existent 32bit memory ops are sufficient. 
However, there might be code out there that implements a parallel algorithm 
using 64bit atomic memory operations.

Currently the GCC ARM backend doesn't provide a pattern to inline 64bit 
__sync_* functions but the compiler emits __sync_*_8 function calls [1]. The 
libgcc does not provide these symbols via the usual thin wrapper around the 
kernel helper [2] because the ARM Linux __kernel_cmpxchg supports 32bit only. 
My understanding is that for ARMv7 the GCC backend could be enhanced to inline 
the __sync_* functions by using the LDREXD and STREXD instructions. But for 
ARMv5 we would still rely on a new kernel helper.

Any ideas/thoughts are appreciated.

[1] https://wiki.linaro.org/WorkingGroups/ToolChain/AtomicMemoryOperations#GCC
[2] 
https://wiki.linaro.org/WorkingGroups/ToolChain/AtomicMemoryOperations#implementation_details

Regards
Ken

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to