Files
archived-ballistic/spec/arm64_xml/stnt1h_z_p_ar.xml
Ronald Caesar 26a677f8b4 decoder: Add ARM specification docs
Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-12-12 18:11:36 -04:00

230 lines
14 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" encoding="UTF-8" href="iform.xsl" version="1.0"?>
<!DOCTYPE instructionsection PUBLIC "-//ARM//DTD instructionsection //EN" "iform-p.dtd">
<!-- Copyright (c) 2010-2022 Arm Limited or its affiliates. All rights reserved. -->
<!-- This document is Non-Confidential. This document may only be used and distributed in accordance with the terms of the agreement entered into by Arm and the party that Arm delivered this document to. -->
<instructionsection id="stnt1h_z_p_ar" title="STNT1H (vector plus scalar)" type="instruction">
<docvars>
<docvar key="instr-class" value="sve2" />
<docvar key="isa" value="A64" />
<docvar key="mnemonic" value="STNT1H" />
</docvars>
<heading>STNT1H (vector plus scalar)</heading>
<desc>
<brief>Scatter store non-temporal halfwords</brief>
<description>
<para>Scatter store non-temporal of halfwords from the active elements of a vector register to the memory addresses generated by a vector base plus a 64-bit unscaled scalar register offset. Inactive elements are not written to memory.</para>
<para>A non-temporal store is a hint to the system that this data is unlikely to be referenced again soon.</para>
<para>This instruction is illegal when executed in Streaming SVE mode, unless FEAT_SME_FA64 is implemented and enabled.</para>
</description>
<status>Green</status>
<predicated>True</predicated>
<sm_policy>SM_0_only</sm_policy>
</desc>
<alias_list howmany="0"></alias_list>
<classes>
<classesintro count="2">
<txt>It has encodings from 2 classes:</txt>
<a href="#iclass_off_s_x32_unscaled">32-bit unscaled offset</a>
<txt> and </txt>
<a href="#iclass_off_d_64_unscaled">64-bit unscaled offset</a>
</classesintro>
<iclass name="32-bit unscaled offset" oneof="2" id="iclass_off_s_x32_unscaled" no_encodings="1" isa="A64">
<docvars>
<docvar key="instr-class" value="sve2" />
<docvar key="isa" value="A64" />
<docvar key="mnemonic" value="STNT1H" />
<docvar key="sve-offset-type" value="off_s_x32_unscaled" />
</docvars>
<iclassintro count="1"></iclassintro>
<regdiagram form="32" psname="STNT1H-Z.P.AR-S.x32.unscaled" tworows="1">
<box hibit="31" width="7" settings="7">
<c>1</c>
<c>1</c>
<c>1</c>
<c>0</c>
<c>0</c>
<c>1</c>
<c>0</c>
</box>
<box hibit="24" name="msz&lt;1&gt;" usename="1" settings="1">
<c>0</c>
</box>
<box hibit="23" name="msz&lt;0&gt;" usename="1" settings="1">
<c>1</c>
</box>
<box hibit="22" width="2" settings="2">
<c>1</c>
<c>0</c>
</box>
<box hibit="20" width="5" name="Rm" usename="1">
<c colspan="5"></c>
</box>
<box hibit="15" width="3" settings="3">
<c>0</c>
<c>0</c>
<c>1</c>
</box>
<box hibit="12" width="3" name="Pg" usename="1">
<c colspan="3"></c>
</box>
<box hibit="9" width="5" name="Zn" usename="1">
<c colspan="5"></c>
</box>
<box hibit="4" width="5" name="Zt" usename="1">
<c colspan="5"></c>
</box>
</regdiagram>
<encoding name="stnt1h_z_p_ar_s_x32_unscaled" oneofinclass="1" oneof="2" label="">
<docvars>
<docvar key="instr-class" value="sve2" />
<docvar key="isa" value="A64" />
<docvar key="mnemonic" value="STNT1H" />
<docvar key="sve-offset-type" value="off_s_x32_unscaled" />
</docvars>
<asmtemplate><text>STNT1H </text><text>{</text><text> </text><a link="sa_zt" hover="Scalable vector register to be transferred (field &quot;Zt&quot;)">&lt;Zt&gt;</a><text>.S </text><text>}</text><text>, </text><a link="sa_pg" hover="Governing scalable predicate register P0-P7 (field &quot;Pg&quot;)">&lt;Pg&gt;</a><text>, [</text><a link="sa_zn" hover="Base scalable vector register (field &quot;Zn&quot;)">&lt;Zn&gt;</a><text>.S</text><text>{</text><text>, </text><a link="sa_xm" hover="Optional 64-bit general-purpose offset register, default XZR (field &quot;Rm&quot;)">&lt;Xm&gt;</a><text>}</text><text>]</text></asmtemplate>
</encoding>
<ps_section howmany="1">
<ps name="STNT1H-Z.P.AR-S.x32.unscaled" mylink="STNT1H-Z.P.AR-S.x32.unscaled" enclabels="" sections="1" secttype="noheading">
<pstext mayhavelinks="1" section="Decode" rep_section="decode">if !<a link="impl-aarch64.HaveSVE2.0" file="shared_pseudocode.xml" hover="function: boolean HaveSVE2()">HaveSVE2</a>() then UNDEFINED;
integer t = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zt);
integer n = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zn);
integer m = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Rm);
integer g = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Pg);
constant integer esize = 32;
constant integer msize = 16;</pstext>
</ps>
</ps_section>
</iclass>
<iclass name="64-bit unscaled offset" oneof="2" id="iclass_off_d_64_unscaled" no_encodings="1" isa="A64">
<docvars>
<docvar key="instr-class" value="sve2" />
<docvar key="isa" value="A64" />
<docvar key="mnemonic" value="STNT1H" />
<docvar key="sve-offset-type" value="off_d_64_unscaled" />
</docvars>
<iclassintro count="1"></iclassintro>
<regdiagram form="32" psname="STNT1H-Z.P.AR-D.64.unscaled" tworows="1">
<box hibit="31" width="7" settings="7">
<c>1</c>
<c>1</c>
<c>1</c>
<c>0</c>
<c>0</c>
<c>1</c>
<c>0</c>
</box>
<box hibit="24" name="msz&lt;1&gt;" usename="1" settings="1">
<c>0</c>
</box>
<box hibit="23" name="msz&lt;0&gt;" usename="1" settings="1">
<c>1</c>
</box>
<box hibit="22" width="2" settings="2">
<c>0</c>
<c>0</c>
</box>
<box hibit="20" width="5" name="Rm" usename="1">
<c colspan="5"></c>
</box>
<box hibit="15" width="3" settings="3">
<c>0</c>
<c>0</c>
<c>1</c>
</box>
<box hibit="12" width="3" name="Pg" usename="1">
<c colspan="3"></c>
</box>
<box hibit="9" width="5" name="Zn" usename="1">
<c colspan="5"></c>
</box>
<box hibit="4" width="5" name="Zt" usename="1">
<c colspan="5"></c>
</box>
</regdiagram>
<encoding name="stnt1h_z_p_ar_d_64_unscaled" oneofinclass="1" oneof="2" label="">
<docvars>
<docvar key="instr-class" value="sve2" />
<docvar key="isa" value="A64" />
<docvar key="mnemonic" value="STNT1H" />
<docvar key="sve-offset-type" value="off_d_64_unscaled" />
</docvars>
<asmtemplate><text>STNT1H </text><text>{</text><text> </text><a link="sa_zt" hover="Scalable vector register to be transferred (field &quot;Zt&quot;)">&lt;Zt&gt;</a><text>.D </text><text>}</text><text>, </text><a link="sa_pg" hover="Governing scalable predicate register P0-P7 (field &quot;Pg&quot;)">&lt;Pg&gt;</a><text>, [</text><a link="sa_zn" hover="Base scalable vector register (field &quot;Zn&quot;)">&lt;Zn&gt;</a><text>.D</text><text>{</text><text>, </text><a link="sa_xm" hover="Optional 64-bit general-purpose offset register, default XZR (field &quot;Rm&quot;)">&lt;Xm&gt;</a><text>}</text><text>]</text></asmtemplate>
</encoding>
<ps_section howmany="1">
<ps name="STNT1H-Z.P.AR-D.64.unscaled" mylink="STNT1H-Z.P.AR-D.64.unscaled" enclabels="" sections="1" secttype="noheading">
<pstext mayhavelinks="1" section="Decode" rep_section="decode">if !<a link="impl-aarch64.HaveSVE2.0" file="shared_pseudocode.xml" hover="function: boolean HaveSVE2()">HaveSVE2</a>() then UNDEFINED;
integer t = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zt);
integer n = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zn);
integer m = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Rm);
integer g = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Pg);
constant integer esize = 64;
constant integer msize = 16;</pstext>
</ps>
</ps_section>
</iclass>
</classes>
<explanations scope="all">
<explanation enclist="stnt1h_z_p_ar_d_64_unscaled, stnt1h_z_p_ar_s_x32_unscaled" symboldefcount="1">
<symbol link="sa_zt">&lt;Zt&gt;</symbol>
<account encodedin="Zt">
<intro>
<para>Is the name of the scalable vector register to be transferred, encoded in the "Zt" field.</para>
</intro>
</account>
</explanation>
<explanation enclist="stnt1h_z_p_ar_d_64_unscaled, stnt1h_z_p_ar_s_x32_unscaled" symboldefcount="1">
<symbol link="sa_pg">&lt;Pg&gt;</symbol>
<account encodedin="Pg">
<intro>
<para>Is the name of the governing scalable predicate register P0-P7, encoded in the "Pg" field.</para>
</intro>
</account>
</explanation>
<explanation enclist="stnt1h_z_p_ar_d_64_unscaled, stnt1h_z_p_ar_s_x32_unscaled" symboldefcount="1">
<symbol link="sa_zn">&lt;Zn&gt;</symbol>
<account encodedin="Zn">
<intro>
<para>Is the name of the base scalable vector register, encoded in the "Zn" field.</para>
</intro>
</account>
</explanation>
<explanation enclist="stnt1h_z_p_ar_d_64_unscaled, stnt1h_z_p_ar_s_x32_unscaled" symboldefcount="1">
<symbol link="sa_xm">&lt;Xm&gt;</symbol>
<account encodedin="Rm">
<intro>
<para>Is the optional 64-bit name of the general-purpose offset register, defaulting to XZR, encoded in the "Rm" field.</para>
</intro>
</account>
</explanation>
</explanations>
<ps_section howmany="1">
<ps name="STNT1H-Z.P.AR-S.x32.unscaled" mylink="execute" enclabels="" sections="1" secttype="Operation">
<pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="impl-aarch64.CheckNonStreamingSVEEnabled.0" file="shared_pseudocode.xml" hover="function: CheckNonStreamingSVEEnabled()">CheckNonStreamingSVEEnabled</a>();
constant integer VL = <a link="impl-aarch64.CurrentVL.read.none" file="shared_pseudocode.xml" hover="accessor: integer CurrentVL">CurrentVL</a>;
constant integer PL = VL DIV 8;
constant integer elements = VL DIV esize;
bits(PL) mask = <a link="impl-aarch64.P.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) P[integer n, integer width]">P</a>[g, PL];
bits(VL) base;
bits(64) offset;
bits(VL) src;
constant integer mbytes = msize DIV 8;
boolean contiguous = FALSE;
boolean nontemporal = TRUE;
boolean tagchecked = TRUE;
<a link="AccessDescriptor" file="shared_pseudocode.xml" hover="type AccessDescriptor is ( AccessType acctype, bits(2) el, SecurityState ss, boolean acqsc, boolean acqpc, boolean relsc, boolean limitedordered, boolean exclusive, boolean atomicop, MemAtomicOp modop, boolean nontemporal, boolean read, boolean write, CacheOp cacheop, CacheOpScope opscope, CacheType cachetype, boolean pan, boolean transactional, boolean nonfault, boolean firstfault, boolean first, boolean contiguous, boolean streamingsve, boolean ls64, boolean mops, boolean rcw, boolean rcws, boolean toplevel, VARange varange, boolean a32lsmd, boolean tagchecked, boolean tagaccess, MPAMinfo mpam )">AccessDescriptor</a> accdesc = <a link="impl-shared.CreateAccDescSVE.4" file="shared_pseudocode.xml" hover="function: AccessDescriptor CreateAccDescSVE(MemOp memop, boolean nontemporal, boolean contiguous, boolean tagchecked)">CreateAccDescSVE</a>(<a link="MemOp_STORE" file="shared_pseudocode.xml" hover="enumeration MemOp {MemOp_LOAD, MemOp_STORE, MemOp_PREFETCH}">MemOp_STORE</a>, nontemporal, contiguous, tagchecked);
if <a link="impl-aarch64.AnyActiveElement.2" file="shared_pseudocode.xml" hover="function: boolean AnyActiveElement(bits(N) mask, integer esize)">AnyActiveElement</a>(mask, esize) then
base = <a link="impl-aarch64.Z.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) Z[integer n, integer width]">Z</a>[n, VL];
offset = <a link="impl-aarch64.X.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) X[integer n, integer width]">X</a>[m, 64];
src = <a link="impl-aarch64.Z.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) Z[integer n, integer width]">Z</a>[t, VL];
for e = 0 to elements-1
if <a link="impl-aarch64.ActivePredicateElement.3" file="shared_pseudocode.xml" hover="function: boolean ActivePredicateElement(bits(N) pred, integer e, integer esize)">ActivePredicateElement</a>(mask, e, esize) then
bits(64) addr = <a link="impl-shared.ZeroExtend.2" file="shared_pseudocode.xml" hover="function: bits(N) ZeroExtend(bits(M) x, integer N)">ZeroExtend</a>(<a link="impl-shared.Elem.read.3" file="shared_pseudocode.xml" hover="accessor: bits(size) Elem[bits(N) vector, integer e, integer size]">Elem</a>[base, e, esize], 64) + offset;
Mem[addr, mbytes, accdesc] = <a link="impl-shared.Elem.read.3" file="shared_pseudocode.xml" hover="accessor: bits(size) Elem[bits(N) vector, integer e, integer size]">Elem</a>[src, e, esize]&lt;msize-1:0&gt;;</pstext>
</ps>
</ps_section>
</instructionsection>