@@ -6652,30 +6652,73 @@ without changing modes.
66526652 }];
66536653}
66546654
6655- def ArmSmeSharedZADocs : Documentation {
6655+ def ArmInDocs : Documentation {
66566656 let Category = DocCatArmSmeAttributes;
66576657 let Content = [{
6658- The ``__arm_shared_za `` keyword applies to prototyped function types and specifies
6659- that the function shares SME's matrix storage (ZA) with its caller. This
6660- means that:
6658+ The ``__arm_in `` keyword applies to prototyped function types and specifies
6659+ that the function shares a given state S with its caller. For ``__arm_in``, the
6660+ function takes the state S as input and returns with the state S unchanged.
66616661
6662- * the function requires that the processor implements the Scalable Matrix
6663- Extension (SME).
6662+ The attribute takes string arguments to instruct the compiler which state
6663+ is shared. The supported states for S are:
66646664
6665- * the function enters with ZA in an active state.
6665+ * ``"za"`` for Matrix Storage (requires SME)
66666666
6667- * the function returns with ZA in an active state.
6667+ The attributes ``__arm_in(S)``, ``__arm_out(S)``, ``__arm_inout(S)`` and
6668+ ``__arm_preserves(S)`` are all mutually exclusive for the same state S.
66686669 }];
66696670}
66706671
6671- def ArmSmePreservesZADocs : Documentation {
6672+ def ArmOutDocs : Documentation {
66726673 let Category = DocCatArmSmeAttributes;
66736674 let Content = [{
6674- The ``__arm_preserves_za`` keyword applies to prototyped function types and
6675- specifies that the function does not modify ZA state.
6675+ The ``__arm_out`` keyword applies to prototyped function types and specifies
6676+ that the function shares a given state S with its caller. For ``__arm_out``,
6677+ the function ignores the incoming state for S and returns new state for S.
6678+
6679+ The attribute takes string arguments to instruct the compiler which state
6680+ is shared. The supported states for S are:
6681+
6682+ * ``"za"`` for Matrix Storage (requires SME)
6683+
6684+ The attributes ``__arm_in(S)``, ``__arm_out(S)``, ``__arm_inout(S)`` and
6685+ ``__arm_preserves(S)`` are all mutually exclusive for the same state S.
66766686 }];
66776687}
66786688
6689+ def ArmInOutDocs : Documentation {
6690+ let Category = DocCatArmSmeAttributes;
6691+ let Content = [{
6692+ The ``__arm_inout`` keyword applies to prototyped function types and specifies
6693+ that the function shares a given state S with its caller. For ``__arm_inout``,
6694+ the function takes the state S as input and returns new state for S.
6695+
6696+ The attribute takes string arguments to instruct the compiler which state
6697+ is shared. The supported states for S are:
6698+
6699+ * ``"za"`` for Matrix Storage (requires SME)
6700+
6701+ The attributes ``__arm_in(S)``, ``__arm_out(S)``, ``__arm_inout(S)`` and
6702+ ``__arm_preserves(S)`` are all mutually exclusive for the same state S.
6703+ }];
6704+ }
6705+
6706+ def ArmPreservesDocs : Documentation {
6707+ let Category = DocCatArmSmeAttributes;
6708+ let Content = [{
6709+ The ``__arm_preserves`` keyword applies to prototyped function types and
6710+ specifies that the function does not read a given state S and returns
6711+ with state S unchanged.
6712+
6713+ The attribute takes string arguments to instruct the compiler which state
6714+ is shared. The supported states for S are:
6715+
6716+ * ``"za"`` for Matrix Storage (requires SME)
6717+
6718+ The attributes ``__arm_in(S)``, ``__arm_out(S)``, ``__arm_inout(S)`` and
6719+ ``__arm_preserves(S)`` are all mutually exclusive for the same state S.
6720+ }];
6721+ }
66796722
66806723def ArmSmeLocallyStreamingDocs : Documentation {
66816724 let Category = DocCatArmSmeAttributes;
@@ -6698,13 +6741,18 @@ at the end of the function.
66986741 }];
66996742}
67006743
6701- def ArmSmeNewZADocs : Documentation {
6744+ def ArmNewDocs : Documentation {
67026745 let Category = DocCatArmSmeAttributes;
67036746 let Content = [{
6704- The ``__arm_new_za`` keyword applies to function declarations and specifies
6705- that the function will be set up with a fresh ZA context.
6747+ The ``__arm_new`` keyword applies to function declarations and specifies
6748+ that the function will create a new scope for state S.
6749+
6750+ The attribute takes string arguments to instruct the compiler for which state
6751+ to create new scope. The supported states for S are:
6752+
6753+ * ``"za"`` for Matrix Storage (requires SME)
67066754
6707- This means that:
6755+ For state ``"za"``, this means that:
67086756
67096757* the function requires that the target processor implements the Scalable Matrix
67106758 Extension (SME).
@@ -6715,8 +6763,8 @@ This means that:
67156763
67166764* the function will disable PSTATE.ZA (by setting it to 0) before returning.
67176765
6718- For ``__arm_new_za `` functions Clang will set up the ZA context automatically
6719- on entry to the function, and disable it before returning. For example, if ZA is
6766+ For ``__arm_new("za") `` functions Clang will set up the ZA context automatically
6767+ on entry to the function and disable it before returning. For example, if ZA is
67206768in a dormant state Clang will generate the code to commit a lazy-save and set up
67216769a new ZA state before executing user code.
67226770 }];
0 commit comments