Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sdesmalen-arm committed Dec 2, 2024
1 parent 20cf743 commit 7568774
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions aapcs64/aapcs64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,8 @@ active
would benefit from the lazy saving scheme.

dormant
.. _`ZA dormant state`:

All of the following are true:

* PSTATE.ZA is 1
Expand Down Expand Up @@ -2361,9 +2363,8 @@ that is large enough to represent all state enabled by PSTATE.ZA.

* The subroutine behaves as follows:

* If the current thread has access to FEAT_SME and PSTATE.ZA is 1,
X0 contains the total size required to save and restore all SME state
enabled by PSTATE.ZA.
* If ZA state is `active <ZA active state>`_, X0 contains the total size
required to save and restore all SME state enabled by PSTATE.ZA.

* Otherwise, X0 contains a size large enough to represent internal state
required for `__arm_sme_save`_ and `__arm_sme_restore`_.
Expand Down Expand Up @@ -2397,15 +2398,19 @@ by PSTATE.ZA.

* The subroutine behaves as follows:

* If ``PTR`` does not point to a valid buffer with the required size, the
behavior of calling this subroutine is undefined.
* If ``PTR`` is not 16-byte aligned, the program aborts in some platform-
specific manner.

* Otherwise if ``PTR`` does not point to a valid buffer with the required
size, the behavior of calling this subroutine is undefined.

* If ZA state is 'active' on entry, then it is 'dormant' on normal return.
Otherwise the ZA state is unchanged.
* If ZA state is `active <ZA active state>`_ on entry, then it is
`dormant <ZA dormant state>`_ on normal return. Otherwise the ZA state
is unchanged.

* For the address ``PTR->VALID`` at an unspecified offset in the buffer,
the value 0 is written to ``PTR->VALID`` and the subroutine returns, if
either of the following conditions is true:
one of the following conditions is true:

* The current thread does not have access to SME.

Expand Down Expand Up @@ -2455,12 +2460,11 @@ enabled by PSTATE.ZA.

* The subroutine behaves as follows:

* If ``PTR`` does not point to a valid buffer with the required size, the
behavior of calling this routine is undefined.
* If ``PTR`` is not 16-byte aligned, the program aborts in some platform-
specific manner.

* The ZA state on normal return is the same as the ZA state on entry to the
call to `__arm_sme_save`_ that was used to initialize the buffer
pointed to by ``PTR``.
* Otherwise if ``PTR`` does not point to a valid buffer with the required
size, the behavior of calling this subroutine is undefined.

* For the address ``PTR->VALID`` at an unspecified offset in the buffer,
if the value stored at address ``PTR->VALID`` is 0, then the subroutine
Expand All @@ -2471,7 +2475,7 @@ enabled by PSTATE.ZA.

* The current thread does not have access to SME.

* ZA state is 'active' on entry.
* ZA state is `active <ZA active state>`_ on entry.

* If PSTATE.ZA is 0, the subroutine enables PSTATE.ZA.

Expand Down

0 comments on commit 7568774

Please sign in to comment.