<?xml version="1.0" ?><?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-2026 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="FCVTPS_float" title="FCVTPS (scalar) -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="float"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="FCVTPS"/>
  </docvars>
  <heading>FCVTPS (scalar)</heading>
  <desc>
    <brief>
      <para>Floating-point convert to signed integer, rounding toward plus infinity (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 signed integer
using the Round towards Plus Infinity 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="FCVTPS"/>
      </docvars>
      <iclassintro count="6"/>
      <regdiagram form="32" psname="A64.simd_dp.float2int.FCVTPS_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>1</c>
        </box>
        <box hibit="18" width="3" name="opcode" usename="1" settings="3" psbits="xxx">
          <c>0</c>
          <c>0</c>
          <c>0</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="FCVTPS_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="FCVTPS"/>
        </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>FCVTPS  </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="FCVTPS_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="FCVTPS"/>
        </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>FCVTPS  </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="FCVTPS_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="FCVTPS"/>
        </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>FCVTPS  </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="FCVTPS_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="FCVTPS"/>
        </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>FCVTPS  </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="FCVTPS_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="FCVTPS"/>
        </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>FCVTPS  </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="FCVTPS_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="FCVTPS"/>
        </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>FCVTPS  </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.FCVTPS_32H_float2int" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_FP) then <a link="func_EndOfDecode_1" file="shared_pseudocode.xml">EndOfDecode</a>(<a link="enum_Decode_UNDEF" file="shared_pseudocode.xml">Decode_UNDEF</a>); end;
if ftype == '10' then <a link="func_EndOfDecode_1" file="shared_pseudocode.xml">EndOfDecode</a>(<a link="enum_Decode_UNDEF" file="shared_pseudocode.xml">Decode_UNDEF</a>); end;
if ftype == '11' &amp;&amp; !IsFeatureImplemented(FEAT_FP16) then <a link="func_EndOfDecode_1" file="shared_pseudocode.xml">EndOfDecode</a>(<a link="enum_Decode_UNDEF" file="shared_pseudocode.xml">Decode_UNDEF</a>); 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 : <a link="type_FPRounding" file="shared_pseudocode.xml">FPRounding</a> = <a link="enum_FPRounding_POSINF" file="shared_pseudocode.xml">FPRounding_POSINF</a>;
let unsigned : boolean    = FALSE;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="FCVTPS_32H_float2int, FCVTPS_32S_float2int, FCVTPS_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 &quot;Rd&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FCVTPS_32H_float2int, FCVTPS_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 &quot;Rn&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FCVTPS_64H_float2int, FCVTPS_64S_float2int, FCVTPS_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 &quot;Rd&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FCVTPS_32S_float2int, FCVTPS_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 &quot;Rn&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="FCVTPS_32D_float2int, FCVTPS_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 &quot;Rn&quot; field.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.simd_dp.float2int.FCVTPS_32H_float2int" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="func_AArch64_CheckFPEnabled_0" file="shared_pseudocode.xml">AArch64_CheckFPEnabled</a>();

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

<a link="accessor_X_2" file="shared_pseudocode.xml">X</a>{intsize}(d) = <a link="func_FPToFixed_7" file="shared_pseudocode.xml">FPToFixed</a>{intsize, fltsize}(fltval, fracbits, unsigned, FPCR(), rounding);</pstext></ps>
  </ps_section>
  <timestamp>2026-03-26 20:27:25</timestamp>
  <commit_id>2026-03_rel</commit_id>
</instructionsection>