<?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="MOV_UMOV_advsimd" title="MOV (to general) -- A64" type="alias">
  <docvars>
    <docvar key="alias_mnemonic" value="MOV" />
    <docvar key="instr-class" value="advsimd" />
    <docvar key="isa" value="A64" />
    <docvar key="mnemonic" value="UMOV" />
    <docvar key="vector-xfer-type" value="general-from-element" />
  </docvars>
  <heading>MOV (to general)</heading>
  <desc>
    <brief>
      <para>Move vector element to general-purpose register</para>
    </brief>
    <authored>
      <para>Move vector element to general-purpose register. This instruction reads the unsigned integer from the source SIMD&amp;FP register, zero-extends it to form a 32-bit or 64-bit value, and writes the result to the destination general-purpose register.</para>
      <para>Depending on the settings in the <xref linkend="AArch64.cpacr_el1">CPACR_EL1</xref>, <xref linkend="AArch64.cptr_el2">CPTR_EL2</xref>, and <xref linkend="AArch64.cptr_el3">CPTR_EL3</xref> registers, and the current Security state and Exception level, an attempt to execute the instruction might be trapped.</para>
    </authored>
  </desc>
  <operationalnotes>
    <para>If PSTATE.DIT is 1:</para>
    <list type="unordered">
      <listitem><content>The execution time of this instruction is independent of:<list type="unordered"><listitem><content>The values of the data supplied in any of its registers.</content></listitem><listitem><content>The values of the NZCV flags.</content></listitem></list></content></listitem>
      <listitem><content>The response of this instruction to asynchronous exceptions does not vary based on:<list type="unordered"><listitem><content>The values of the data supplied in any of its registers.</content></listitem><listitem><content>The values of the NZCV flags.</content></listitem></list></content></listitem>
    </list>
  </operationalnotes>
  <aliasto refiform="umov_advsimd.xml" iformid="UMOV_advsimd">UMOV</aliasto>
  <classes>
    <iclass name="Advanced SIMD" oneof="1" id="iclass_advsimd" no_encodings="2" isa="A64">
      <docvars>
        <docvar key="instr-class" value="advsimd" />
        <docvar key="isa" value="A64" />
        <docvar key="mnemonic" value="UMOV" />
        <docvar key="vector-xfer-type" value="general-from-element" />
      </docvars>
      <iclassintro count="2"></iclassintro>
      <regdiagram form="32" psname="aarch64/instrs/vector/transfer/integer/move/unsigned" tworows="1">
        <box hibit="31" settings="1">
          <c>0</c>
        </box>
        <box hibit="30" name="Q" usename="1">
          <c></c>
        </box>
        <box hibit="29" name="op" settings="1">
          <c>0</c>
        </box>
        <box hibit="28" width="8" settings="8">
          <c>0</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="20" width="5" name="imm5" usename="1" settings="2" psbits="xxxxx">
          <c>x</c>
          <c>x</c>
          <c>x</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="15" settings="1">
          <c>0</c>
        </box>
        <box hibit="14" width="2" name="imm4[3:2]" settings="2">
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="12" name="imm4[1]" settings="1">
          <c>1</c>
        </box>
        <box hibit="11" name="imm4[0]" settings="1">
          <c>1</c>
        </box>
        <box hibit="10" settings="1">
          <c>1</c>
        </box>
        <box hibit="9" width="5" name="Rn" usename="1">
          <c colspan="5"></c>
        </box>
        <box hibit="4" width="5" name="Rd" usename="1">
          <c colspan="5"></c>
        </box>
      </regdiagram>
      <encoding name="MOV_UMOV_asimdins_W_w" oneofinclass="2" oneof="2" label="32-bit" bitdiffs="Q == 0 &amp;&amp; imm5 == xx100">
        <docvars>
          <docvar key="alias_mnemonic" value="MOV" />
          <docvar key="datatype" value="32" />
          <docvar key="instr-class" value="advsimd" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="UMOV" />
          <docvar key="vector-xfer-type" value="general-from-element" />
        </docvars>
        <box hibit="30" width="1" name="Q">
          <c>0</c>
        </box>
        <box hibit="20" width="5" name="imm5">
          <c></c>
          <c></c>
          <c>1</c>
          <c></c>
          <c></c>
        </box>
        <asmtemplate><text>MOV  </text><a link="sa_wd" hover="32-bit general-purpose destination register (field &quot;Rd&quot;)">&lt;Wd&gt;</a><text>, </text><a link="sa_vn" hover="SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Vn&gt;</a><text>.S[</text><a link="sa_index_2" hover="Element index (field &quot;imm5&lt;4:3&gt;&quot;)">&lt;index&gt;</a><text>]</text></asmtemplate>
        <equivalent_to>
          <asmtemplate><a href="umov_advsimd.xml#UMOV_asimdins_W_w">UMOV</a><text> </text><a link="sa_wd" hover="32-bit general-purpose destination register (field &quot;Rd&quot;)">&lt;Wd&gt;</a><text>, </text><a link="sa_vn" hover="SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Vn&gt;</a><text>.S[</text><a link="sa_index_2" hover="Element index (field &quot;imm5&lt;4:3&gt;&quot;)">&lt;index&gt;</a><text>]</text></asmtemplate>
          <aliascond>Unconditionally</aliascond>
        </equivalent_to>
      </encoding>
      <encoding name="MOV_UMOV_asimdins_X_x" oneofinclass="2" oneof="2" label="64-bit" bitdiffs="Q == 1 &amp;&amp; imm5 == x1000">
        <docvars>
          <docvar key="alias_mnemonic" value="MOV" />
          <docvar key="atomic-ops" value="UMOV-64-reg" />
          <docvar key="instr-class" value="advsimd" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="UMOV" />
          <docvar key="reg-type" value="64-reg" />
          <docvar key="vector-xfer-type" value="general-from-element" />
        </docvars>
        <box hibit="30" width="1" name="Q">
          <c>1</c>
        </box>
        <box hibit="20" width="5" name="imm5">
          <c></c>
          <c>1</c>
          <c>0</c>
          <c></c>
          <c></c>
        </box>
        <asmtemplate><text>MOV  </text><a link="sa_xd" hover="64-bit general-purpose destination register (field &quot;Rd&quot;)">&lt;Xd&gt;</a><text>, </text><a link="sa_vn" hover="SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Vn&gt;</a><text>.D[</text><a link="sa_index_1" hover="Element index (field &quot;imm5&lt;4&gt;&quot;)">&lt;index&gt;</a><text>]</text></asmtemplate>
        <equivalent_to>
          <asmtemplate><a href="umov_advsimd.xml#UMOV_asimdins_X_x">UMOV</a><text> </text><a link="sa_xd" hover="64-bit general-purpose destination register (field &quot;Rd&quot;)">&lt;Xd&gt;</a><text>, </text><a link="sa_vn" hover="SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Vn&gt;</a><text>.D[</text><a link="sa_index_1" hover="Element index (field &quot;imm5&lt;4&gt;&quot;)">&lt;index&gt;</a><text>]</text></asmtemplate>
          <aliascond>Unconditionally</aliascond>
        </equivalent_to>
      </encoding>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="MOV_UMOV_asimdins_W_w" symboldefcount="1">
      <symbol link="sa_wd">&lt;Wd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the 32-bit name of the general-purpose destination register, encoded in the "Rd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOV_UMOV_asimdins_X_x" symboldefcount="1">
      <symbol link="sa_xd">&lt;Xd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the 64-bit name of the general-purpose destination register, encoded in the "Rd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOV_UMOV_asimdins_W_w, MOV_UMOV_asimdins_X_x" symboldefcount="1">
      <symbol link="sa_vn">&lt;Vn&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the name of the SIMD&amp;FP source register, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOV_UMOV_asimdins_W_w" symboldefcount="1">
      <symbol link="sa_index_2">&lt;index&gt;</symbol>
      <account encodedin="imm5">
        <docvars>
          <docvar key="datatype" value="32" />
        </docvars>
        <intro>
          <para>For the 32-bit variant: is the element index encoded in "imm5&lt;4:3&gt;".</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOV_UMOV_asimdins_X_x" symboldefcount="2">
      <symbol link="sa_index_1">&lt;index&gt;</symbol>
      <account encodedin="imm5">
        <docvars>
          <docvar key="reg-type" value="64-reg" />
        </docvars>
        <intro>
          <para>For the 64-bit variant: is the element index encoded in "imm5&lt;4&gt;".</para>
        </intro>
      </account>
    </explanation>
  </explanations>
</instructionsection>
