summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/s_002f390-system-z-built-in-functions.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/gcc~13/s_002f390-system-z-built-in-functions.html')
-rw-r--r--devdocs/gcc~13/s_002f390-system-z-built-in-functions.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/devdocs/gcc~13/s_002f390-system-z-built-in-functions.html b/devdocs/gcc~13/s_002f390-system-z-built-in-functions.html
new file mode 100644
index 00000000..e8972c8b
--- /dev/null
+++ b/devdocs/gcc~13/s_002f390-system-z-built-in-functions.html
@@ -0,0 +1,55 @@
+<div class="subsection-level-extent" id="S_002f390-System-z-Built-in-Functions"> <div class="nav-panel"> <p> Next: <a href="sh-built-in-functions" accesskey="n" rel="next">SH Built-in Functions</a>, Previous: <a href="rx-built-in-functions" accesskey="p" rel="prev">RX Built-in Functions</a>, Up: <a href="target-builtins" accesskey="u" rel="up">Built-in Functions Specific to Particular Target Machines</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="subsection" id="S_002f390-System-z-Built-in-Functions-1"><span>6.60.31 S/390 System z Built-in Functions<a class="copiable-link" href="#S_002f390-System-z-Built-in-Functions-1"> ¶</a></span></h1> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftbegin">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_tbegin</strong> <code class="def-code-arguments">(void*)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftbegin"> ¶</a></span>
+</dt> <dd><p>Generates the <code class="code">tbegin</code> machine instruction starting a non-constrained hardware transaction. If the parameter is non-NULL the memory area is used to store the transaction diagnostic buffer and will be passed as first operand to <code class="code">tbegin</code>. This buffer can be defined using the <code class="code">struct __htm_tdb</code> C struct defined in <code class="code">htmintrin.h</code> and must reside on a double-word boundary. The second tbegin operand is set to <code class="code">0xff0c</code>. This enables save/restore of all GPRs and disables aborts for FPR and AR manipulations inside the transaction body. The condition code set by the tbegin instruction is returned as integer value. The tbegin instruction by definition overwrites the content of all FPRs. The compiler will generate code which saves and restores the FPRs. For soft-float code it is recommended to used the <code class="code">*_nofloat</code> variant. In order to prevent a TDB from being written it is required to pass a constant zero value as parameter. Passing a zero value through a variable is not sufficient. Although modifications of access registers inside the transaction will not trigger an transaction abort it is not supported to actually modify them. Access registers do not get saved when entering a transaction. They will have undefined state when reaching the abort code. </p></dd>
+</dl> <p>Macros for the possible return codes of tbegin are defined in the <code class="code">htmintrin.h</code> header file: </p> <dl class="first-deffn first-defmac-alias-first-deffn"> <dt class="deffn defmac-alias-deffn" id="index-_005fHTM_005fTBEGIN_005fSTARTED">
+<span class="category-def">Macro: </span><span><strong class="def-name">_HTM_TBEGIN_STARTED</strong><a class="copiable-link" href="#index-_005fHTM_005fTBEGIN_005fSTARTED"> ¶</a></span>
+</dt> <dd><p><code class="code">tbegin</code> has been executed as part of normal processing. The transaction body is supposed to be executed. </p></dd>
+</dl> <dl class="first-deffn first-defmac-alias-first-deffn"> <dt class="deffn defmac-alias-deffn" id="index-_005fHTM_005fTBEGIN_005fINDETERMINATE">
+<span class="category-def">Macro: </span><span><strong class="def-name">_HTM_TBEGIN_INDETERMINATE</strong><a class="copiable-link" href="#index-_005fHTM_005fTBEGIN_005fINDETERMINATE"> ¶</a></span>
+</dt> <dd><p>The transaction was aborted due to an indeterminate condition which might be persistent. </p></dd>
+</dl> <dl class="first-deffn first-defmac-alias-first-deffn"> <dt class="deffn defmac-alias-deffn" id="index-_005fHTM_005fTBEGIN_005fTRANSIENT">
+<span class="category-def">Macro: </span><span><strong class="def-name">_HTM_TBEGIN_TRANSIENT</strong><a class="copiable-link" href="#index-_005fHTM_005fTBEGIN_005fTRANSIENT"> ¶</a></span>
+</dt> <dd><p>The transaction aborted due to a transient failure. The transaction should be re-executed in that case. </p></dd>
+</dl> <dl class="first-deffn first-defmac-alias-first-deffn"> <dt class="deffn defmac-alias-deffn" id="index-_005fHTM_005fTBEGIN_005fPERSISTENT">
+<span class="category-def">Macro: </span><span><strong class="def-name">_HTM_TBEGIN_PERSISTENT</strong><a class="copiable-link" href="#index-_005fHTM_005fTBEGIN_005fPERSISTENT"> ¶</a></span>
+</dt> <dd><p>The transaction aborted due to a persistent failure. Re-execution under same circumstances will not be productive. </p></dd>
+</dl> <dl class="first-deffn first-defmac-alias-first-deffn"> <dt class="deffn defmac-alias-deffn" id="index-_005fHTM_005fFIRST_005fUSER_005fABORT_005fCODE">
+<span class="category-def">Macro: </span><span><strong class="def-name">_HTM_FIRST_USER_ABORT_CODE</strong><a class="copiable-link" href="#index-_005fHTM_005fFIRST_005fUSER_005fABORT_005fCODE"> ¶</a></span>
+</dt> <dd><p>The <code class="code">_HTM_FIRST_USER_ABORT_CODE</code> defined in <code class="code">htmintrin.h</code> specifies the first abort code which can be used for <code class="code">__builtin_tabort</code>. Values below this threshold are reserved for machine use. </p></dd>
+</dl> <dl class="first-deftp"> <dt class="deftp" id="index-struct-_005f_005fhtm_005ftdb">
+<span class="category-def">Data type: </span><span><strong class="def-name">struct __htm_tdb</strong><a class="copiable-link" href="#index-struct-_005f_005fhtm_005ftdb"> ¶</a></span>
+</dt> <dd><p>The <code class="code">struct __htm_tdb</code> defined in <code class="code">htmintrin.h</code> describes the structure of the transaction diagnostic block as specified in the Principles of Operation manual chapter 5-91. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftbegin_005fnofloat">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_tbegin_nofloat</strong> <code class="def-code-arguments">(void*)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftbegin_005fnofloat"> ¶</a></span>
+</dt> <dd><p>Same as <code class="code">__builtin_tbegin</code> but without FPR saves and restores. Using this variant in code making use of FPRs will leave the FPRs in undefined state when entering the transaction abort handler code. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftbegin_005fretry">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_tbegin_retry</strong> <code class="def-code-arguments">(void*, int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftbegin_005fretry"> ¶</a></span>
+</dt> <dd><p>In addition to <code class="code">__builtin_tbegin</code> a loop for transient failures is generated. If tbegin returns a condition code of 2 the transaction will be retried as often as specified in the second argument. The perform processor assist instruction is used to tell the CPU about the number of fails so far. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftbegin_005fretry_005fnofloat">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_tbegin_retry_nofloat</strong> <code class="def-code-arguments">(void*, int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftbegin_005fretry_005fnofloat"> ¶</a></span>
+</dt> <dd><p>Same as <code class="code">__builtin_tbegin_retry</code> but without FPR saves and restores. Using this variant in code making use of FPRs will leave the FPRs in undefined state when entering the transaction abort handler code. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftbeginc">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_tbeginc</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftbeginc"> ¶</a></span>
+</dt> <dd><p>Generates the <code class="code">tbeginc</code> machine instruction starting a constrained hardware transaction. The second operand is set to <code class="code">0xff08</code>. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftend">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_tend</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftend"> ¶</a></span>
+</dt> <dd><p>Generates the <code class="code">tend</code> machine instruction finishing a transaction and making the changes visible to other threads. The condition code generated by tend is returned as integer value. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftabort">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_tabort</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftabort"> ¶</a></span>
+</dt> <dd><p>Generates the <code class="code">tabort</code> machine instruction with the specified abort code. Abort codes from 0 through 255 are reserved and will result in an error message. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftx_005fassist">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_tx_assist</strong> <code class="def-code-arguments">(int)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftx_005fassist"> ¶</a></span>
+</dt> <dd><p>Generates the <code class="code">ppa rX,rY,1</code> machine instruction. Where the integer parameter is loaded into rX and a value of zero is loaded into rY. The integer parameter specifies the number of times the transaction repeatedly aborted. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005ftx_005fnesting_005fdepth">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">int</code> <strong class="def-name">__builtin_tx_nesting_depth</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005ftx_005fnesting_005fdepth"> ¶</a></span>
+</dt> <dd><p>Generates the <code class="code">etnd</code> machine instruction. The current nesting depth is returned as integer value. For a nesting depth of 0 the code is not executed as part of an transaction. </p></dd>
+</dl> <dl class="first-deftypefn"> <dt class="deftypefn" id="index-_005f_005fbuiltin_005fnon_005ftx_005fstore">
+<span class="category-def">Built-in Function: </span><span><code class="def-type">void</code> <strong class="def-name">__builtin_non_tx_store</strong> <code class="def-code-arguments">(uint64_t *, uint64_t)</code><a class="copiable-link" href="#index-_005f_005fbuiltin_005fnon_005ftx_005fstore"> ¶</a></span>
+</dt> <dd> <p>Generates the <code class="code">ntstg</code> machine instruction. The second argument is written to the first arguments location. The store operation will not be rolled-back in case of an transaction abort. </p>
+</dd>
+</dl> </div> <div class="nav-panel"> <p> Next: <a href="sh-built-in-functions">SH Built-in Functions</a>, Previous: <a href="rx-built-in-functions">RX Built-in Functions</a>, Up: <a href="target-builtins">Built-in Functions Specific to Particular Target Machines</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br>
+ <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/S_002f390-System-z-Built-in-Functions.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/S_002f390-System-z-Built-in-Functions.html</a>
+ </p>
+</div>