<?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-2025 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="STTNP_fpsimd" title="STTNP (SIMD&amp;FP) -- A64" type="instruction">
  <docvars>
    <docvar key="address-form" value="signed-scaled-offset"/>
    <docvar key="address-form-reg-type" value="signed-scaled-offset-pair-quadwords"/>
    <docvar key="atomic-ops" value="STTNP-pair-quadwords"/>
    <docvar key="instr-class" value="fpsimd"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="STTNP"/>
    <docvar key="offset-type" value="off7s_s"/>
    <docvar key="reg-type" value="pair-quadwords"/>
  </docvars>
  <heading>STTNP (SIMD&amp;FP)</heading>
  <desc>
    <brief>
      <para>Store unprivileged pair of SIMD&amp;FP registers, with non-temporal hint</para>
    </brief>
    <authored>
      <para>This instruction stores a pair of SIMD&amp;FP registers to memory, issuing a hint to the
memory system that the access is non-temporal. The address used for the store is
calculated from an address from a base register value and an immediate offset.
For information about non-temporal pair instructions, see
<xref linkend="ARMARM_BABJADHH">Load/Store SIMD and Floating-point non-temporal pair</xref>.</para>
      <para>Depending on the settings in the <register_link id="AArch64-cpacr_el1.xml" state="AArch64">CPACR_EL1</register_link>,
  <register_link id="AArch64-cptr_el2.xml" state="AArch64">CPTR_EL2</register_link>, and <register_link id="AArch64-cptr_el3.xml" state="AArch64">CPTR_EL3</register_link> registers,
  and the current Security state and Exception level,
  an attempt to execute the instruction might be trapped.</para>
      <para>Explicit Memory  effects produced by the instruction behave as if the instruction was
  executed at EL0 if the <xref linkend="ARMARM_Effective_value">Effective value</xref> of
  PSTATE.UAO is 0 and either:</para>
      <list type="unordered">
        <listitem>
          <content>The instruction is executed at EL1.</content>
        </listitem>
        <listitem>
          <content>The instruction is executed at EL2 when the <xref linkend="ARMARM_Effective_value">Effective value</xref>
  of <register_link id="AArch64-hcr_el2.xml" state="AArch64">HCR_EL2()</register_link>.{E2H, TGE} is '11'.</content>
        </listitem>
      </list>
      <para>Otherwise, the Explicit Memory  effects operate with the restrictions determined by
  the Exception level at which the instruction is executed.</para>
    </authored>
  </desc>
  <operationalnotes>
    <operationalnote>
      <operationalnote_content>
        <para>This instruction is a data-independent-time instruction as described in <xref linkend="ARMARM_BEICCDDAB3">About PSTATE.DIT</xref>.</para>
      </operationalnote_content>
    </operationalnote>
  </operationalnotes>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="Signed offset" oneof="1" id="iclass_signed_offset" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="address-form" value="signed-scaled-offset"/>
        <docvar key="address-form-reg-type" value="signed-scaled-offset-pair-quadwords"/>
        <docvar key="atomic-ops" value="STTNP-pair-quadwords"/>
        <docvar key="instr-class" value="fpsimd"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="STTNP"/>
        <docvar key="offset-type" value="off7s_s"/>
        <docvar key="reg-type" value="pair-quadwords"/>
      </docvars>
      <iclassintro count="1"/>
      <arch_variants>
        <arch_variant feature="FEAT_FP &amp;&amp; FEAT_LSUI" name="v8Ap0 &amp;&amp; v9Ap6"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.ldst.ldstnapair_offs.STTNP_Q_ldstnapair_offs" tworows="1">
        <box hibit="31" width="2" name="opc" usename="1" settings="2" psbits="xx">
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="29" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="27" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="26" name="VR" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="25" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="24" width="2" settings="2">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="22" name="L" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="21" width="7" name="imm7" usename="1">
          <c colspan="7"/>
        </box>
        <box hibit="14" width="5" name="Rt2" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="9" width="5" name="Rn" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="4" width="5" name="Rt" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="STTNP_Q_ldstnapair_offs" oneofinclass="1" oneof="1" label="">
        <docvars>
          <docvar key="address-form" value="signed-scaled-offset"/>
          <docvar key="address-form-reg-type" value="signed-scaled-offset-pair-quadwords"/>
          <docvar key="atomic-ops" value="STTNP-pair-quadwords"/>
          <docvar key="instr-class" value="fpsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="offset-type" value="off7s_s"/>
          <docvar key="reg-type" value="pair-quadwords"/>
          <docvar key="mnemonic" value="STTNP"/>
        </docvars>
        <asmtemplate><text>STTNP  </text><a hover="Is the 128-bit name of the first SIMD&amp;FP register to be transferred, encoded in the &quot;Rt&quot; field." link="Qt1">&lt;Qt1&gt;</a><text>, </text><a hover="Is the 128-bit name of the second SIMD&amp;FP register to be transferred, encoded in the &quot;Rt2&quot; field." link="Qt2">&lt;Qt2&gt;</a><text>, [</text><a hover="Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the &quot;Rn&quot; field." link="XnSP_option">&lt;Xn|SP&gt;</a><text>{, #</text><a hover="For the &quot;128-bit&quot; variant: is the optional signed immediate byte offset, a multiple of 16 in the range -1024 to 1008, defaulting to 0 and encoded in the &quot;imm7&quot; field as &lt;imm&gt;/16." link="imm__6">&lt;imm&gt;</a><text>}]</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.ldst.ldstnapair_offs.STTNP_Q_ldstnapair_offs" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_FP) || !IsFeatureImplemented(FEAT_LSUI) then
    EndOfDecode(Decode_UNDEF);
end;
let t : integer{} = UInt(Rt);
let t2 : integer{} = UInt(Rt2);
let n : integer{} = UInt(Rn);
let nontemporal : boolean = TRUE;
let datasize : integer{} = 128;
let offset : bits(64) = LSL(SignExtend{64}(imm7), 4);
let tagchecked : boolean = n != 31;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="STTNP_Q_ldstnapair_offs" symboldefcount="1">
      <symbol link="Qt1">&lt;Qt1&gt;</symbol>
      <account encodedin="Rt">
        <intro>
          <para>Is the 128-bit name of the first SIMD&amp;FP register to be transferred, encoded in the "Rt" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="STTNP_Q_ldstnapair_offs" symboldefcount="1">
      <symbol link="Qt2">&lt;Qt2&gt;</symbol>
      <account encodedin="Rt2">
        <intro>
          <para>Is the 128-bit name of the second SIMD&amp;FP register to be transferred, encoded in the "Rt2" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="STTNP_Q_ldstnapair_offs" symboldefcount="1">
      <symbol link="XnSP_option">&lt;Xn|SP&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="STTNP_Q_ldstnapair_offs" symboldefcount="1">
      <symbol link="imm__6">&lt;imm&gt;</symbol>
      <account encodedin="imm7">
        <intro>
          <para>Is the optional signed immediate byte offset, a multiple of 16 in the range -1024 to 1008, defaulting to 0 and encoded in the "imm7" field as &lt;imm&gt;/16.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.ldst.ldstnapair_offs.STTNP_Q_ldstnapair_offs" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">AArch64_CheckFPEnabled();
var address : bits(64);
let dbytes : integer{} = datasize DIV 8;

let privileged : boolean = AArch64_IsUnprivAccessPriv();
let ispair : boolean = TRUE;
let accdesc : AccessDescriptor = CreateAccDescASIMD(MemOp_STORE, nontemporal, tagchecked,
                                                    privileged, ispair);

if n == 31 then
    CheckSPAlignment();
    address = SP{64}();
else
    address = X{64}(n);
end;

address = AddressAdd(address, offset, accdesc);

var data : bits(2*datasize);
if BigEndian(accdesc.acctype) then
    data = V{datasize}(t) :: V{datasize}(t2);
else
    data = V{datasize}(t2) :: V{datasize}(t);
end;
Mem{2*datasize}(address, accdesc) = data;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
