Atomic operations for the Delphi mobile targets are built on top of the AtomicXXX
family of intrinsic functions. The documentation says:
Because the Delphi mobile compilers do not support a built-in assembler, the System unit provides four atomic intrinsic functions that provide a way to atomically exchange, compare and exchange, increment, and decrement memory values.
These four functions are:
Other RTL functions that provide atomic operations, e.g. the static class methods of the TInterlocked
class, are built on top of these four intrinsics.
For the mobile compilers that target ARMv7, are there any alignment requirements for these four atomic intrinsics? If so, what are they?
The documentation does not list any such requirements. However, the documentation has been known to be inaccurate and I am not confident to take the absence of any stated requirements as definitive proof that no such requirements exist.
As a mild aside, the XE8 documentation for intrinsic functions states that these atomic intrinsics are not supported by the desktop compilers. That is not correct – these intrinsics are supported by the desktop compilers.