<?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="FCVTAU_float" title="FCVTAU (scalar) -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="float"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="FCVTAU"/>
  </docvars>
  <heading>FCVTAU (scalar)</heading>
  <desc>
    <brief>
      <para>Floating-point convert to unsigned integer, rounding to nearest with ties to away (scalar)</para>
    </brief>
    <authored>
      <para>This instruction converts the floating-point value
in the SIMD&amp;FP source register to a 32-bit or 64-bit unsigned integer
using the Round to Nearest with Ties to Away rounding mode, and
writes the result to the general-purpose destination register.</para>
      <para>This instruction can generate a floating-point exception.
  Depending on the settings in <register_link id="AArch64-fpcr.xml" state="AArch64">FPCR</register_link>,
  the exception results in either a flag being set in <register_link id="AArch64-fpsr.xml" state="AArch64">FPSR</register_link>
  or a synchronous exception being generated.
  For more information, see
  <xref linkend="ARMARM_BEIJDDAG">Floating-point exceptions and exception traps</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>
    </authored>
    <affected_by_sme output="general-purpose register"/>
  </desc>
  <operationalnotes>
    <operationalnote>
      <operationalnote_content>
        <para>If FEAT_SME is implemented and the PE is in Streaming SVE mode, then any subsequent instruction which is dependent on the general-purpose register written by this instruction might be significantly delayed.</para>
      </operationalnote_content>
    </operationalnote>
  </operationalnotes>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="Floating-point" oneof="1" id="iclass_floating_point" no_encodings="6" isa="A64">
      <docvars>
        <docvar key="instr-class" value="float"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="FCVTAU"/>
      </docvars>
      <iclassintro count="6"/>
      <regdiagram form="32" psname="A64.simd_dp.float2int.FCVTAU_32H_float2int" tworows="1">
        <box hibit="31" width="1" name="sf" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="30" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="29" name="S" usename="1" settings="1" psbits="x">
          <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"/>
        </box>
        <box hibit="21" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="20" width="2" name="rmode" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="18" width="3" name="opcode" usename="1" settings="3" psbits="xxx">
          <c>1</c>
          <c>0</c>
          <c>1</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"/>
        </box>
        <box hibit="4" width="5" name="Rd" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="FCVTAU_32H_float2int" oneofinclass="6" oneof="6" label="Half-precision to 32-bit" bitdiffs="sf == 0 &amp;&amp; ftype == 11">
        <docvars>
          <docvar key="convert-type" value="half-to-32"/>
          <docvar key="instr-class" value="float"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="FCVTAU"/>
        </docvars>
        <arch_variants>
          <arch_variant feature="FEAT_FP16" name="v8Ap2"/>
        </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>
        <asmtemplate><text>FCVTAU  </text><a hover="Is the 32-bit name of the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="WdOrWZR">&lt;Wd&gt;</a><text>, </text><a hover="Is the 16-bit name of the SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field." link="Hn__2">&lt;Hn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FCVTAU_64H_float2int" oneofinclass="6" oneof="6" label="Half-precision to 64-bit" bitdiffs="sf == 1 &amp;&amp; ftype == 11">
        <docvars>
          <docvar key="convert-type" value="half-to-64"/>
          <docvar key="instr-class" value="float"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="FCVTAU"/>
        </docvars>
        <arch_variants>
          <arch_variant feature="FEAT_FP16" name="v8Ap2"/>
        </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>
        <asmtemplate><text>FCVTAU  </text><a hover="Is the 64-bit name of the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="XdOrXZR__6">&lt;Xd&gt;</a><text>, </text><a hover="Is the 16-bit name of the SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field." link="Hn__2">&lt;Hn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FCVTAU_32S_float2int" oneofinclass="6" oneof="6" label="Single-precision to 32-bit" bitdiffs="sf == 0 &amp;&amp; ftype == 00">
        <docvars>
          <docvar key="convert-type" value="single-to-32"/>
          <docvar key="instr-class" value="float"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="FCVTAU"/>
        </docvars>
        <arch_variants>
          <arch_variant feature="FEAT_FP" name="v8Ap0"/>
        </arch_variants>
        <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>
        <asmtemplate><text>FCVTAU  </text><a hover="Is the 32-bit name of the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="WdOrWZR">&lt;Wd&gt;</a><text>, </text><a hover="Is the 32-bit name of the SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field." link="Sn">&lt;Sn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FCVTAU_64S_float2int" oneofinclass="6" oneof="6" label="Single-precision to 64-bit" bitdiffs="sf == 1 &amp;&amp; ftype == 00">
        <docvars>
          <docvar key="convert-type" value="single-to-64"/>
          <docvar key="instr-class" value="float"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="FCVTAU"/>
        </docvars>
        <arch_variants>
          <arch_variant feature="FEAT_FP" name="v8Ap0"/>
        </arch_variants>
        <box hibit="31" width="1" name="sf">
          <c>1</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>0</c>
          <c>0</c>
        </box>
        <asmtemplate><text>FCVTAU  </text><a hover="Is the 64-bit name of the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="XdOrXZR__6">&lt;Xd&gt;</a><text>, </text><a hover="Is the 32-bit name of the SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field." link="Sn">&lt;Sn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FCVTAU_32D_float2int" oneofinclass="6" oneof="6" label="Double-precision to 32-bit" bitdiffs="sf == 0 &amp;&amp; ftype == 01">
        <docvars>
          <docvar key="convert-type" value="double-to-32"/>
          <docvar key="instr-class" value="float"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="FCVTAU"/>
        </docvars>
        <arch_variants>
          <arch_variant feature="FEAT_FP" name="v8Ap0"/>
        </arch_variants>
        <box hibit="31" width="1" name="sf">
          <c>0</c>
        </box>
        <box hibit="23" width="2" name="ftype">
          <c>0</c>
          <c>1</c>
        </box>
        <asmtemplate><text>FCVTAU  </text><a hover="Is the 32-bit name of the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="WdOrWZR">&lt;Wd&gt;</a><text>, </text><a hover="Is the 64-bit name of the SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field." link="Dn">&lt;Dn&gt;</a></asmtemplate>
      </encoding>
      <encoding name="FCVTAU_64D_float2int" oneofinclass="6" oneof="6" label="Double-precision to 64-bit" bitdiffs="sf == 1 &amp;&amp; ftype == 01">
        <docvars>
          <docvar key="convert-type" value="double-to-64"/>
          <docvar key="instr-class" value="float"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="FCVTAU"/>
        </docvars>
        <arch_variants>
          <arch_variant feature="FEAT_FP" name="v8Ap0"/>
        </arch_variants>
        <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>
        <asmtemplate><text>FCVTAU  </text><a hover="Is the 64-bit name of the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="XdOrXZR__6">&lt;Xd&gt;</a><text>, </text><a hover="Is the 64-bit name of the SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field." link="Dn">&lt;Dn&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.simd_dp.float2int.FCVTAU_32H_float2int" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_FP) then EndOfDecode(Decode_UNDEF); end;
if ftype == '10' then EndOfDecode(Decode_UNDEF); end;
if ftype == '11' &amp;&amp; !IsFeatureImplemented(FEAT_FP16) then EndOfDecode(Decode_UNDEF); end;

let d : integer{} = UInt(Rd);
let n : integer{} = UInt(Rn);

let intsize : integer{} = 32 &lt;&lt; UInt(sf);
let fltsize : integer{} = 8 &lt;&lt; UInt(ftype XOR '10');

let rounding : FPRounding = FPRounding_TIEAWAY;
let unsigned : boolean    = TRUE;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="FCVTAU_32H_float2int, FCVTAU_32S_float2int, FCVTAU_32D_float2int" symboldefcount="1">
      <symbol link="WdOrWZR">&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="FCVTAU_32H_float2int, FCVTAU_64H_float2int" symboldefcount="1">
      <symbol link="Hn__2">&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="FCVTAU_64H_float2int, FCVTAU_64S_float2int, FCVTAU_64D_float2int" symboldefcount="1">
      <symbol link="XdOrXZR__6">&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="FCVTAU_32S_float2int, FCVTAU_64S_float2int" symboldefcount="1">
      <symbol link="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="FCVTAU_32D_float2int, FCVTAU_64D_float2int" symboldefcount="1">
      <symbol link="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="A64.simd_dp.float2int.FCVTAU_32H_float2int" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">AArch64_CheckFPEnabled();

let fltval : bits(fltsize) = V{}(n);
let fracbits : integer = 0;

X{intsize}(d) = FPToFixed{intsize, fltsize}(fltval, fracbits, unsigned, FPCR(), rounding);</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
