@@ -379,6 +379,15 @@ Suggestions and improvements to this specification may be submitted to the:
379379`issue tracker page on GitHub <https://github.com/ARM-software/abi-aa/issues >`_.
380380
381381
382+ Atomic types
383+ ============
384+
385+ ``_Atomic `` struct types types with size less than 16 bytes must be padded to the nearest power
386+ of 2. Their alignment must be the same as their size so that they can be used by atomic instructions.
387+
388+ ``atomic_is_lock_free `` must return ``true `` for all ``_Atomic `` objects with size less than or equal
389+ to 16 bytes, and ``false `` otherwise.
390+
382391
383392AArch64 atomic mappings
384393=======================
@@ -399,10 +408,20 @@ Synchronization Fences
399408 +-----------------------------------------------------+--------------------------------------+
400409 | ``atomic_thread_fence(release) `` | .. code-block:: none |
401410 | | |
402- | ``atomic_thread_fence(acq_rel) `` | DMB ISH |
411+ | | DMB ISHLD |
412+ | | DMB ISHST |
413+ | +--------------------------------------+
414+ | | .. code-block:: none |
403415 | | |
404- | ``atomic_thread_fence(seq_cst) `` | |
405- +-------------------------------------+---------------+--------------------------------------+
416+ | | DMB ISH |
417+ +-----------------------------------------------------+--------------------------------------+
418+ | ``atomic_thread_fence(acq_rel) `` | .. code-block:: none |
419+ | | |
420+ | ``atomic_thread_fence(seq_cst) `` | DMB ISH |
421+ +-----------------------------------------------------+--------------------------------------+
422+
423+ The release fence has two alternative implementations. Using ``DMB ISHLD `` and ``DMB ISHST ``
424+ allows for more reordering since the combination is not a store-load barrier.
406425
40742632-bit types
408427------------
@@ -482,7 +501,7 @@ returned in ``W0``.
482501 | +---------------+--------------------------------------+
483502 | | ``FEAT_LSE `` | .. code-block:: none |
484503 | | | |
485- | | | SWAL W2, W0, [X1] * |
504+ | | | SWPAL W2, W0, [X1] * |
486505 +-------------------------------------+---------------+--------------------------------------+
487506 | ``fetch_add(loc,val,relaxed) `` | ``Armv8-A `` | .. code-block:: none |
488507 | | | |
@@ -494,7 +513,7 @@ returned in ``W0``.
494513 | +---------------+--------------------------------------+
495514 | | ``FEAT_LSE `` | .. code-block:: none |
496515 | | | |
497- | | | LDADD W0, W2, [X1] * |
516+ | | | LDADD W2, W0, [X1] * |
498517 +-------------------------------------+---------------+--------------------------------------+
499518 | ``fetch_add(loc,val,acquire) `` | ``Armv8-A `` | .. code-block:: none |
500519 | | | |
@@ -506,7 +525,7 @@ returned in ``W0``.
506525 | +---------------+--------------------------------------+
507526 | | ``FEAT_LSE `` | .. code-block:: none |
508527 | | | |
509- | | | LDADDA W0, W2, [X1] * |
528+ | | | LDADDA W2, W0, [X1] * |
510529 +-------------------------------------+---------------+--------------------------------------+
511530 | ``fetch_add(loc,val,release) `` | ``Armv8-A `` | .. code-block:: none |
512531 | | | |
@@ -518,7 +537,7 @@ returned in ``W0``.
518537 | +---------------+--------------------------------------+
519538 | | ``FEAT_LSE `` | .. code-block:: none |
520539 | | | |
521- | | | LDADDL W0, W2, [X1] * |
540+ | | | LDADDL W2, W0, [X1] * |
522541 +-------------------------------------+---------------+--------------------------------------+
523542 | ``fetch_add(loc,val,acq_rel) `` | ``Armv8-A `` | .. code-block:: none |
524543 | ``fetch_add(loc,val,seq_cst) `` | | |
@@ -530,7 +549,7 @@ returned in ``W0``.
530549 | +---------------+--------------------------------------+
531550 | | ``FEAT_LSE `` | .. code-block:: none |
532551 | | | |
533- | | | LDADDAL W0, W2 , [X1] * |
552+ | | | LDADDAL W2, W0 , [X1] * |
534553 +-------------------------------------+---------------+--------------------------------------+
535554 | ``compare_exchange_strong( `` | ``Armv8-A `` | .. code-block:: none |
536555 | ``loc,exp,val,relaxed,relaxed) `` | | |
@@ -704,7 +723,7 @@ compare-exchange. The result is returned in ``X0`` and ``X1``.
704723 | +---------------+--------------------------------------+
705724 | |``FEAT_LRCPC3`` | .. code-block:: none |
706725 | | | |
707- | | | STILP x2 , X3, [X4] |
726+ | | | STILP X2 , X3, [X4] |
708727 +-------------------------------------+---------------+--------------------------------------+
709728 | ``load(loc,relaxed) `` | ``Armv8-A `` | .. code-block:: none |
710729 | | | |
0 commit comments