Hi, This is V3 of a series of 5 patches relating to ARM atomic operations; they incorporate most of the feedback from V2. Note the patch numbering/ ordering is different from v2; the two simple patches are now first.
1) Correct the definition of TARGET_HAVE_DMB_MCR so that it doesn't produce the mcr instruction in Thumb1 (and enable on ARMv6 not just 6k as per the docs). 2) Fix pr48126 which is a misplaced barrier in the atomic generation 3) Provide 64 bit atomic operations using the new ldrexd/strexd in ARMv6k and above. 4) Provide fallbacks so that when compiled for earlier CPUs a Linux kernel asssist is called (as per 32bit and smaller ops) 5) Add test cases and support for those test cases, for the operations added in (3) and (4). This code has been tested built on x86-64 cross to ARM run in ARM and Thumb (C, C++, Fortran). It is against git rev 68a79dfc. Relative to v2: Test cases split out Code sharing between the test cases More coding style cleanup A handful of NULL->NULL_RTX changes Relative to v1: Split the DMB_MCR patch out Provide complete changelogs Don't emit IT instruction except in Thumb2 mode Move iterators to iterators.md (didn't move the table since it was specific to sync.md) Remove sync_atleastsi Use sync_predtab in as many places as possible Avoid headers in libgcc Made various libgcc routines I added static used __write instead of write Comment the barrier move to explain it more Note that the kernel interface has remained the same for the helper, and as such I've not changed the way the helper calling in patch 2 is structured. This work is part of Linaro blueprint: https://blueprints.launchpad.net/linaro-toolchain-misc/+spec/64-bit-sync-primitives Dave