<?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="FMOV_advsimd" title="FMOV (vector, immediate) -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="advsimd"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="FMOV"/>
  </docvars>
  <heading>FMOV (vector, immediate)</heading>
  <desc>
    <brief>
      <para>Floating-point move immediate (vector)</para>
    </brief>
    <authored>
      <para>This instruction copies an immediate
floating-point constant into every element of the SIMD&amp;FP destination register.</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>
    </authored>
  </desc>
  <alias_list howmany="0"/>
  <classes>
    <classesintro count="2">
      <txt>It has encodings from 2 classes:</txt>
      <a href="#iclass_half_precision">Half-precision</a>
      <txt> and </txt>
      <a href="#iclass_single_precision_and_double_precision">Single-precision and double-precision</a>
    </classesintro>
    <iclass name="Half-precision" oneof="2" id="iclass_half_precision" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="asimdimm-datatype" value="per-half"/>
        <docvar key="instr-class" value="advsimd"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="FMOV"/>
      </docvars>
      <iclassintro count="1"/>
      <arch_variants>
        <arch_variant feature="FEAT_AdvSIMD &amp;&amp; FEAT_FP16" name="v8Ap0 &amp;&amp; v8Ap2"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.simd_dp.asimdimm.FMOV_asimdimm_H_h" tworows="1">
        <box hibit="31" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="30" width="1" name="Q" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="29" name="op" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="28" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="27" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="24" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="22" width="4" settings="4">
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="18" width="1" name="a" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="17" width="1" name="b" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="16" width="1" name="c" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="15" width="4" name="cmode" usename="1" settings="4" psbits="xxxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="11" name="o2" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="10" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="9" width="1" name="d" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="8" width="1" name="e" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="7" width="1" name="f" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="6" width="1" name="g" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="5" width="1" name="h" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="4" width="5" name="Rd" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="FMOV_asimdimm_H_h" oneofinclass="1" oneof="3" label="">
        <docvars>
          <docvar key="asimdimm-datatype" value="per-half"/>
          <docvar key="instr-class" value="advsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="FMOV"/>
        </docvars>
        <asmtemplate><text>FMOV  </text><a hover="Is the name of the SIMD&amp;FP destination register, encoded in the &quot;Rd&quot; field." link="Vd">&lt;Vd&gt;</a><text>.</text><a hover="For the &quot;Half-precision&quot; variant: is an arrangement specifier, " link="T_option__4">&lt;T&gt;</a><text>, #</text><a hover="Is a signed floating-point constant with 3-bit exponent and normalized 4 bits of precision, encoded in &quot;a:b:c:d:e:f:g:h&quot;. For details of the range of constants available and the encoding of &lt;imm&gt;, see x[Modified immediate constants in A64 floating-point instructions](CJAFAFAI)." link="a_b_c_d_e_f_g_h__2">&lt;imm&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.simd_dp.asimdimm.FMOV_asimdimm_H_h" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_AdvSIMD) || !IsFeatureImplemented(FEAT_FP16) then
    EndOfDecode(Decode_UNDEF);
end;

let rd : integer = UInt(Rd);

let datasize : integer{} = 64 &lt;&lt; UInt(Q);
let imm8 : bits(8) = a::b::c::d::e::f::g::h;
let imm16 : bits(16) = imm8[7]::NOT(imm8[6])::Replicate{2}(imm8[6])::imm8[5:0]::Zeros{6};
let imm : bits(datasize) = Replicate{}(imm16);</pstext></ps>
      </ps_section>
    </iclass>
    <iclass name="Single-precision and double-precision" oneof="2" id="iclass_single_precision_and_double_precision" no_encodings="2" isa="A64">
      <docvars>
        <docvar key="datatype" value="single-and-double"/>
        <docvar key="instr-class" value="advsimd"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="FMOV"/>
      </docvars>
      <iclassintro count="2"/>
      <arch_variants>
        <arch_variant feature="FEAT_AdvSIMD" name="v8Ap0"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.simd_dp.asimdimm.FMOV_asimdimm_S_s" tworows="1">
        <box hibit="31" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="30" width="1" name="Q" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="29" width="1" name="op" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="28" width="10" settings="10">
          <c>0</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="18" width="1" name="a" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="17" width="1" name="b" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="16" width="1" name="c" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="15" width="4" name="cmode" usename="1" settings="4" psbits="xxxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="11" name="o2" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="10" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="9" width="1" name="d" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="8" width="1" name="e" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="7" width="1" name="f" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="6" width="1" name="g" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="5" width="1" name="h" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="4" width="5" name="Rd" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="FMOV_asimdimm_S_s" oneofinclass="2" oneof="3" label="Single-precision" bitdiffs="op == 0">
        <docvars>
          <docvar key="asimdimm-datatype" value="per-single"/>
          <docvar key="instr-class" value="advsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="datatype" value="single-and-double"/>
          <docvar key="mnemonic" value="FMOV"/>
        </docvars>
        <box hibit="29" width="1" name="op">
          <c>0</c>
        </box>
        <asmtemplate><text>FMOV  </text><a hover="Is the name of the SIMD&amp;FP destination register, encoded in the &quot;Rd&quot; field." link="Vd">&lt;Vd&gt;</a><text>.</text><a hover="For the &quot;Single-precision&quot; variant: is an arrangement specifier, " link="T_option__8">&lt;T&gt;</a><text>, #</text><a hover="Is a signed floating-point constant with 3-bit exponent and normalized 4 bits of precision, encoded in &quot;a:b:c:d:e:f:g:h&quot;. For details of the range of constants available and the encoding of &lt;imm&gt;, see x[Modified immediate constants in A64 floating-point instructions](CJAFAFAI)." link="a_b_c_d_e_f_g_h__2">&lt;imm&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FMOV_asimdimm_D2_d" oneofinclass="2" oneof="3" label="Double-precision" bitdiffs="Q == 1 &amp;&amp; op == 1">
        <docvars>
          <docvar key="asimdimm-datatype" value="per-double"/>
          <docvar key="instr-class" value="advsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="datatype" value="single-and-double"/>
          <docvar key="mnemonic" value="FMOV"/>
        </docvars>
        <box hibit="30" width="1" name="Q">
          <c>1</c>
        </box>
        <box hibit="29" width="1" name="op">
          <c>1</c>
        </box>
        <asmtemplate><text>FMOV  </text><a hover="Is the name of the SIMD&amp;FP destination register, encoded in the &quot;Rd&quot; field." link="Vd">&lt;Vd&gt;</a><text>.2D, #</text><a hover="Is a signed floating-point constant with 3-bit exponent and normalized 4 bits of precision, encoded in &quot;a:b:c:d:e:f:g:h&quot;. For details of the range of constants available and the encoding of &lt;imm&gt;, see x[Modified immediate constants in A64 floating-point instructions](CJAFAFAI)." link="a_b_c_d_e_f_g_h__2">&lt;imm&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.simd_dp.asimdimm.FMOV_asimdimm_S_s" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_AdvSIMD) then EndOfDecode(Decode_UNDEF); end;
if cmode::op == '11111' then
    // FMOV Dn,#imm is in main FP instruction set
    if Q == '0' then EndOfDecode(Decode_UNDEF); end;
end;

let rd : integer = UInt(Rd);
let datasize : integer{} = 64 &lt;&lt; UInt(Q);
let imm64 : bits(64) = AdvSIMDExpandImm(op, cmode, a::b::c::d::e::f::g::h);
let imm : bits(datasize) = Replicate{}(imm64);</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="FMOV_asimdimm_H_h, FMOV_asimdimm_S_s, FMOV_asimdimm_D2_d" symboldefcount="1">
      <symbol link="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_asimdimm_H_h" symboldefcount="1">
      <symbol link="T_option__4">&lt;T&gt;</symbol>
      <definition encodedin="Q">
        <intro>For the "Half-precision" variant: is an arrangement specifier, </intro>
        <table class="valuetable">
          <tgroup cols="2">
            <thead>
              <row>
                <entry class="bitfield">Q</entry>
                <entry class="symbol">&lt;T&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="symbol">4H</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="symbol">8H</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="FMOV_asimdimm_S_s" symboldefcount="2">
      <symbol link="T_option__8">&lt;T&gt;</symbol>
      <definition encodedin="Q">
        <intro>For the "Single-precision" variant: is an arrangement specifier, </intro>
        <table class="valuetable">
          <tgroup cols="2">
            <thead>
              <row>
                <entry class="bitfield">Q</entry>
                <entry class="symbol">&lt;T&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="symbol">2S</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="symbol">4S</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="FMOV_asimdimm_H_h, FMOV_asimdimm_S_s, FMOV_asimdimm_D2_d" symboldefcount="1">
      <symbol link="a_b_c_d_e_f_g_h__2">&lt;imm&gt;</symbol>
      <account encodedin="(a :: b :: c :: d :: e :: f :: g :: h)">
        <intro>
          <para>Is a signed floating-point constant with 3-bit exponent and normalized 4 bits of precision, encoded in "a:b:c:d:e:f:g:h". For details of the range of constants available and the encoding of <syntax>&lt;imm&gt;</syntax>, see <xref linkend="CJAFAFAI">Modified immediate constants in A64 floating-point instructions</xref>.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.simd_dp.asimdimm.FMOV_asimdimm_H_h" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">AArch64_CheckFPAdvSIMDEnabled();
V{datasize}(rd) = imm;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
