<?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="FMOV_float_gen" title="FMOV (general) -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="float" />
    <docvar key="isa" value="A64" />
    <docvar key="mnemonic" value="FMOV" />
  </docvars>
  <heading>FMOV (general)</heading>
  <desc>
    <brief>
      <para>Floating-point Move to or from general-purpose register without conversion</para>
    </brief>
    <authored>
      <para>Floating-point Move to or from general-purpose register without conversion. This instruction transfers the contents of a SIMD&amp;FP register to a general-purpose register, or the contents of a general-purpose register to a SIMD&amp;FP 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>
    <affected_by_sme output="general-purpose register" />
  </desc>
  <alias_list howmany="0"></alias_list>
  <classes>
    <iclass name="Floating-point" oneof="1" id="iclass_float" no_encodings="10" isa="A64">
      <docvars>
        <docvar key="instr-class" value="float" />
        <docvar key="isa" value="A64" />
        <docvar key="mnemonic" value="FMOV" />
      </docvars>
      <iclassintro count="10"></iclassintro>
      <regdiagram form="32" psname="aarch64/instrs/float/convert/int" tworows="1">
        <box hibit="31" name="sf" usename="1">
          <c></c>
        </box>
        <box hibit="30" settings="1">
          <c>0</c>
        </box>
        <box hibit="29" name="S" settings="1">
          <c>0</c>
        </box>
        <box hibit="28" width="5" settings="5">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="23" width="2" name="ftype" usename="1">
          <c colspan="2"></c>
        </box>
        <box hibit="21" settings="1">
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode" usename="1" settings="1" psbits="xx">
          <c>0</c>
          <c>x</c>
        </box>
        <box hibit="18" width="3" name="opcode" usename="1" settings="2" psbits="xxx">
          <c>1</c>
          <c>1</c>
          <c>x</c>
        </box>
        <box hibit="15" width="6" settings="6">
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</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="FMOV_32H_float2int" oneofinclass="10" oneof="10" label="Half-precision to 32-bit" bitdiffs="sf == 0 &amp;&amp; ftype == 11 &amp;&amp; rmode == 00 &amp;&amp; opcode == 110">
        <docvars>
          <docvar key="convert-type" value="half-to-32" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <arch_variants>
          <arch_variant name="ARMv8.2" feature="FEAT_FP16" />
        </arch_variants>
        <box hibit="31" width="1" name="sf">
          <c>0</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>0</c>
        </box>
        <asmtemplate><text>FMOV  </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_hn" hover="16-bit SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Hn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_64H_float2int" oneofinclass="10" oneof="10" label="Half-precision to 64-bit" bitdiffs="sf == 1 &amp;&amp; ftype == 11 &amp;&amp; rmode == 00 &amp;&amp; opcode == 110">
        <docvars>
          <docvar key="convert-type" value="half-to-64" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <arch_variants>
          <arch_variant name="ARMv8.2" feature="FEAT_FP16" />
        </arch_variants>
        <box hibit="31" width="1" name="sf">
          <c>1</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>0</c>
        </box>
        <asmtemplate><text>FMOV  </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_hn" hover="16-bit SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Hn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_H32_float2int" oneofinclass="10" oneof="10" label="32-bit to half-precision" bitdiffs="sf == 0 &amp;&amp; ftype == 11 &amp;&amp; rmode == 00 &amp;&amp; opcode == 111">
        <docvars>
          <docvar key="convert-type" value="32-to-half" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <arch_variants>
          <arch_variant name="ARMv8.2" feature="FEAT_FP16" />
        </arch_variants>
        <box hibit="31" width="1" name="sf">
          <c>0</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>1</c>
        </box>
        <asmtemplate><text>FMOV  </text><a link="sa_hd" hover="16-bit SIMD&amp;FP destination register (field &quot;Rd&quot;)">&lt;Hd&gt;</a><text>, </text><a link="sa_wn" hover="32-bit general-purpose source register (field &quot;Rn&quot;)">&lt;Wn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_S32_float2int" oneofinclass="10" oneof="10" label="32-bit to single-precision" bitdiffs="sf == 0 &amp;&amp; ftype == 00 &amp;&amp; rmode == 00 &amp;&amp; opcode == 111">
        <docvars>
          <docvar key="convert-type" value="32-to-single" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <box hibit="31" width="1" name="sf">
          <c>0</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>1</c>
        </box>
        <asmtemplate><text>FMOV  </text><a link="sa_sd" hover="32-bit SIMD&amp;FP destination register (field &quot;Rd&quot;)">&lt;Sd&gt;</a><text>, </text><a link="sa_wn" hover="32-bit general-purpose source register (field &quot;Rn&quot;)">&lt;Wn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_32S_float2int" oneofinclass="10" oneof="10" label="Single-precision to 32-bit" bitdiffs="sf == 0 &amp;&amp; ftype == 00 &amp;&amp; rmode == 00 &amp;&amp; opcode == 110">
        <docvars>
          <docvar key="convert-type" value="single-to-32" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <box hibit="31" width="1" name="sf">
          <c>0</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>0</c>
        </box>
        <asmtemplate><text>FMOV  </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_sn" hover="32-bit SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Sn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_H64_float2int" oneofinclass="10" oneof="10" label="64-bit to half-precision" bitdiffs="sf == 1 &amp;&amp; ftype == 11 &amp;&amp; rmode == 00 &amp;&amp; opcode == 111">
        <docvars>
          <docvar key="convert-type" value="64-to-half" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <arch_variants>
          <arch_variant name="ARMv8.2" feature="FEAT_FP16" />
        </arch_variants>
        <box hibit="31" width="1" name="sf">
          <c>1</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>1</c>
        </box>
        <asmtemplate><text>FMOV  </text><a link="sa_hd" hover="16-bit SIMD&amp;FP destination register (field &quot;Rd&quot;)">&lt;Hd&gt;</a><text>, </text><a link="sa_xn" hover="64-bit general-purpose source register (field &quot;Rn&quot;)">&lt;Xn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_D64_float2int" oneofinclass="10" oneof="10" label="64-bit to double-precision" bitdiffs="sf == 1 &amp;&amp; ftype == 01 &amp;&amp; rmode == 00 &amp;&amp; opcode == 111">
        <docvars>
          <docvar key="convert-type" value="64-to-double" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <box hibit="31" width="1" name="sf">
          <c>1</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>1</c>
        </box>
        <asmtemplate><text>FMOV  </text><a link="sa_dd" hover="64-bit SIMD&amp;FP destination register (field &quot;Rd&quot;)">&lt;Dd&gt;</a><text>, </text><a link="sa_xn" hover="64-bit general-purpose source register (field &quot;Rn&quot;)">&lt;Xn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_V64I_float2int" oneofinclass="10" oneof="10" label="64-bit to top half of 128-bit" bitdiffs="sf == 1 &amp;&amp; ftype == 10 &amp;&amp; rmode == 01 &amp;&amp; opcode == 111">
        <docvars>
          <docvar key="convert-type" value="64-to-quadhi" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <box hibit="31" width="1" name="sf">
          <c>1</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>1</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>1</c>
        </box>
        <asmtemplate><text>FMOV  </text><a link="sa_vd" hover="SIMD&amp;FP destination register (field &quot;Rd&quot;)">&lt;Vd&gt;</a><text>.D[1], </text><a link="sa_xn" hover="64-bit general-purpose source register (field &quot;Rn&quot;)">&lt;Xn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_64D_float2int" oneofinclass="10" oneof="10" label="Double-precision to 64-bit" bitdiffs="sf == 1 &amp;&amp; ftype == 01 &amp;&amp; rmode == 00 &amp;&amp; opcode == 110">
        <docvars>
          <docvar key="convert-type" value="double-to-64" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <box hibit="31" width="1" name="sf">
          <c>1</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>0</c>
        </box>
        <asmtemplate><text>FMOV  </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_dn" hover="64-bit SIMD&amp;FP source register (field &quot;Rn&quot;)">&lt;Dn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_64VX_float2int" oneofinclass="10" oneof="10" label="Top half of 128-bit to 64-bit" bitdiffs="sf == 1 &amp;&amp; ftype == 10 &amp;&amp; rmode == 01 &amp;&amp; opcode == 110">
        <docvars>
          <docvar key="convert-type" value="quadhi-to-64" />
          <docvar key="instr-class" value="float" />
          <docvar key="isa" value="A64" />
          <docvar key="mnemonic" value="FMOV" />
        </docvars>
        <box hibit="31" width="1" name="sf">
          <c>1</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="20" width="2" name="rmode">
          <c></c>
          <c>1</c>
        </box>
        <box hibit="18" width="3" name="opcode">
          <c></c>
          <c></c>
          <c>0</c>
        </box>
        <asmtemplate><text>FMOV  </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[1]</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="aarch64/instrs/float/convert/int" mylink="aarch64.instrs.float.convert.int" enclabels="" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">integer d = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Rd);
integer n = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Rn);

integer intsize = if sf == '1' then 64 else 32;
integer fltsize;
<a link="FPConvOp" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp</a> op;
<a link="FPRounding" file="shared_pseudocode.xml" hover="enumeration FPRounding  {FPRounding_TIEEVEN, FPRounding_POSINF, FPRounding_NEGINF,  FPRounding_ZERO, FPRounding_TIEAWAY, FPRounding_ODD}">FPRounding</a> rounding;
boolean unsigned;
integer part;

case ftype of
    when '00'
        fltsize = 32;
    when '01'
        fltsize = 64;
    when '10'
        if opcode&lt;2:1&gt;:rmode != '11 01' then UNDEFINED;
        fltsize = 128;
    when '11'
        if <a link="impl-shared.HaveFP16Ext.0" file="shared_pseudocode.xml" hover="function: boolean HaveFP16Ext()">HaveFP16Ext</a>() then
            fltsize = 16;
        else
            UNDEFINED;

case opcode&lt;2:1&gt;:rmode of
    when '00 xx'        // FCVT[NPMZ][US]
        rounding = <a link="impl-shared.FPDecodeRounding.1" file="shared_pseudocode.xml" hover="function: FPRounding FPDecodeRounding(bits(2) rmode)">FPDecodeRounding</a>(rmode);
        unsigned = (opcode&lt;0&gt; == '1');
        op = <a link="FPConvOp_CVT_FtoI" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_FtoI</a>;
    when '01 00'        // [US]CVTF
        rounding = <a link="impl-shared.FPRoundingMode.1" file="shared_pseudocode.xml" hover="function: FPRounding FPRoundingMode(FPCRType fpcr)">FPRoundingMode</a>(FPCR[]);
        unsigned = (opcode&lt;0&gt; == '1');
        op = <a link="FPConvOp_CVT_ItoF" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_ItoF</a>;
    when '10 00'        // FCVTA[US]
        rounding = <a link="FPRounding_TIEAWAY" file="shared_pseudocode.xml" hover="enumeration FPRounding  {FPRounding_TIEEVEN, FPRounding_POSINF, FPRounding_NEGINF,  FPRounding_ZERO, FPRounding_TIEAWAY, FPRounding_ODD}">FPRounding_TIEAWAY</a>;
        unsigned = (opcode&lt;0&gt; == '1');
        op = <a link="FPConvOp_CVT_FtoI" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_FtoI</a>;
    when '11 00'        // FMOV
        if fltsize != 16 &amp;&amp; fltsize != intsize then UNDEFINED;
        op = if opcode&lt;0&gt; == '1' then <a link="FPConvOp_MOV_ItoF" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_MOV_ItoF</a> else <a link="FPConvOp_MOV_FtoI" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_MOV_FtoI</a>;
        part = 0;
    when '11 01'        // FMOV D[1]
        if intsize != 64 || fltsize != 128 then UNDEFINED;
        op = if opcode&lt;0&gt; == '1' then <a link="FPConvOp_MOV_ItoF" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_MOV_ItoF</a> else <a link="FPConvOp_MOV_FtoI" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_MOV_FtoI</a>;
        part = 1;
        fltsize = 64;  // size of D[1] is 64
    when '11 11'       // FJCVTZS
        if !<a link="impl-shared.HaveFJCVTZSExt.0" file="shared_pseudocode.xml" hover="function: boolean HaveFJCVTZSExt()">HaveFJCVTZSExt</a>() then UNDEFINED;
        rounding = <a link="FPRounding_ZERO" file="shared_pseudocode.xml" hover="enumeration FPRounding  {FPRounding_TIEEVEN, FPRounding_POSINF, FPRounding_NEGINF,  FPRounding_ZERO, FPRounding_TIEAWAY, FPRounding_ODD}">FPRounding_ZERO</a>;
        unsigned = (opcode&lt;0&gt; == '1');
        op = <a link="FPConvOp_CVT_FtoI_JS" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_FtoI_JS</a>;
    otherwise
        UNDEFINED;</pstext>
        </ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="FMOV_D64_float2int" symboldefcount="1">
      <symbol link="sa_dd">&lt;Dd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the 64-bit name of the SIMD&amp;FP destination register, encoded in the "Rd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_H32_float2int, FMOV_H64_float2int" symboldefcount="1">
      <symbol link="sa_hd">&lt;Hd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the 16-bit name of the SIMD&amp;FP destination register, encoded in the "Rd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_S32_float2int" symboldefcount="1">
      <symbol link="sa_sd">&lt;Sd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the 32-bit name of the SIMD&amp;FP destination register, encoded in the "Rd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_H32_float2int, FMOV_S32_float2int" symboldefcount="1">
      <symbol link="sa_wn">&lt;Wn&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 32-bit name of the general-purpose source register, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_V64I_float2int" symboldefcount="1">
      <symbol link="sa_vd">&lt;Vd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the name of the SIMD&amp;FP destination register, encoded in the "Rd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_D64_float2int, FMOV_H64_float2int, FMOV_V64I_float2int" symboldefcount="1">
      <symbol link="sa_xn">&lt;Xn&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 64-bit name of the general-purpose source register, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_32S_float2int, FMOV_32H_float2int" 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="FMOV_32S_float2int" symboldefcount="1">
      <symbol link="sa_sn">&lt;Sn&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 32-bit name of the SIMD&amp;FP source register, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_64D_float2int, FMOV_64H_float2int, FMOV_64VX_float2int" 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="FMOV_64VX_float2int" 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="FMOV_32H_float2int, FMOV_64H_float2int" symboldefcount="1">
      <symbol link="sa_hn">&lt;Hn&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 16-bit name of the SIMD&amp;FP source register, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FMOV_64D_float2int" symboldefcount="1">
      <symbol link="sa_dn">&lt;Dn&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 64-bit name of the SIMD&amp;FP source register, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="aarch64/instrs/float/convert/int" mylink="execute" enclabels="" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">if op == <a link="FPConvOp_CVT_FtoI_JS" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_FtoI_JS</a> then
    <a link="impl-aarch64.CheckFPAdvSIMDEnabled64.0" file="shared_pseudocode.xml" hover="function: CheckFPAdvSIMDEnabled64()">CheckFPAdvSIMDEnabled64</a>();
else
    <a link="impl-aarch64.CheckFPEnabled64.0" file="shared_pseudocode.xml" hover="function: CheckFPEnabled64()">CheckFPEnabled64</a>();

<a link="FPCRType" file="shared_pseudocode.xml" hover="type FPCRType">FPCRType</a> fpcr = FPCR[];
boolean merge = <a link="impl-shared.IsMerging.1" file="shared_pseudocode.xml" hover="function: boolean IsMerging(FPCRType fpcr)">IsMerging</a>(fpcr);
integer fsize = if op == <a link="FPConvOp_CVT_ItoF" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_ItoF</a> &amp;&amp; merge then 128 else fltsize;
bits(fsize) fltval;
bits(intsize) intval;

case op of
    when <a link="FPConvOp_CVT_FtoI" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_FtoI</a>
        fltval = <a link="impl-aarch64.V.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) V[integer n, integer width]">V</a>[n, fsize];
        intval = <a link="impl-shared.FPToFixed.6" file="shared_pseudocode.xml" hover="function: bits(M) FPToFixed(bits(N) op, integer fbits, boolean unsigned, FPCRType fpcr, FPRounding rounding, integer M)">FPToFixed</a>(fltval, 0, unsigned, fpcr, rounding, intsize);
        <a link="impl-aarch64.X.write.2" file="shared_pseudocode.xml" hover="accessor: X[integer n, integer width] = bits(width) value">X</a>[d, intsize] = intval;
    when <a link="FPConvOp_CVT_ItoF" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_ItoF</a>
        intval = <a link="impl-aarch64.X.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) X[integer n, integer width]">X</a>[n, intsize];
        fltval = if merge then <a link="impl-aarch64.V.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) V[integer n, integer width]">V</a>[d, fsize] else <a link="impl-shared.Zeros.1" file="shared_pseudocode.xml" hover="function: bits(N) Zeros(integer N)">Zeros</a>(fsize);
        <a link="impl-shared.Elem.write.3" file="shared_pseudocode.xml" hover="accessor: Elem[bits(N) &amp;vector, integer e, integer size] = bits(size) value">Elem</a>[fltval, 0, fltsize] = <a link="impl-shared.FixedToFP.6" file="shared_pseudocode.xml" hover="function: bits(N) FixedToFP(bits(M) op, integer fbits, boolean unsigned, FPCRType fpcr, FPRounding rounding, integer N)">FixedToFP</a>(intval, 0, unsigned, fpcr, rounding, fltsize);
        <a link="impl-aarch64.V.write.2" file="shared_pseudocode.xml" hover="accessor: V[integer n, integer width] = bits(width) value">V</a>[d, fsize] = fltval;
    when <a link="FPConvOp_MOV_FtoI" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_MOV_FtoI</a>
        fltval = <a link="impl-aarch64.Vpart.read.3" file="shared_pseudocode.xml" hover="accessor: bits(width) Vpart[integer n, integer part, integer width]">Vpart</a>[n,part,fsize];
        intval = <a link="impl-shared.ZeroExtend.2" file="shared_pseudocode.xml" hover="function: bits(N) ZeroExtend(bits(M) x, integer N)">ZeroExtend</a>(fltval, intsize);
        <a link="impl-aarch64.X.write.2" file="shared_pseudocode.xml" hover="accessor: X[integer n, integer width] = bits(width) value">X</a>[d, intsize] = intval;
    when <a link="FPConvOp_MOV_ItoF" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_MOV_ItoF</a>
        intval = <a link="impl-aarch64.X.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) X[integer n, integer width]">X</a>[n, intsize];
        fltval = intval&lt;fsize-1:0&gt;;
        <a link="impl-aarch64.Vpart.write.3" file="shared_pseudocode.xml" hover="accessor: Vpart[integer n, integer part, integer width] = bits(width) value">Vpart</a>[d,part,fsize] = fltval;
    when <a link="FPConvOp_CVT_FtoI_JS" file="shared_pseudocode.xml" hover="enumeration FPConvOp    {FPConvOp_CVT_FtoI, FPConvOp_CVT_ItoF, FPConvOp_MOV_FtoI, FPConvOp_MOV_ItoF , FPConvOp_CVT_FtoI_JS }">FPConvOp_CVT_FtoI_JS</a>
        bit z;
        fltval = <a link="impl-aarch64.V.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) V[integer n, integer width]">V</a>[n, fsize];
        (intval, z) = <a link="impl-shared.FPToFixedJS.4" file="shared_pseudocode.xml" hover="function: (bits(N), bit) FPToFixedJS(bits(M) op, FPCRType fpcr, boolean Is64, integer N)">FPToFixedJS</a>(fltval, fpcr, TRUE, intsize);
        PSTATE.&lt;N,Z,C,V&gt; = '0':z:'00';
        <a link="impl-aarch64.X.write.2" file="shared_pseudocode.xml" hover="accessor: X[integer n, integer width] = bits(width) value">X</a>[d, intsize] = intval;</pstext>
    </ps>
  </ps_section>
</instructionsection>
