mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
268 lines
13 KiB
XML
268 lines
13 KiB
XML
<?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="FCVT_float" title="FCVT -- A64" type="instruction">
|
|
<docvars>
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<heading>FCVT</heading>
|
|
<desc>
|
|
<brief>
|
|
<para>Floating-point Convert precision (scalar)</para>
|
|
</brief>
|
|
<authored>
|
|
<para>Floating-point Convert precision (scalar). This instruction converts the floating-point value in the SIMD&FP source register to the precision for the destination register data type using the rounding mode that is determined by the <xref linkend="AArch64.fpcr">FPCR</xref> and writes the result to the SIMD&FP destination 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>
|
|
<alias_list howmany="0"></alias_list>
|
|
<classes>
|
|
<iclass name="Floating-point" oneof="1" id="iclass_float" no_encodings="6" isa="A64">
|
|
<docvars>
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<iclassintro count="6"></iclassintro>
|
|
<regdiagram form="32" psname="aarch64/instrs/float/convert/fp">
|
|
<box hibit="31" name="M" settings="1">
|
|
<c>0</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="4" name="opcode[5:2]" settings="4">
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="16" width="2" name="opc" usename="1">
|
|
<c colspan="2"></c>
|
|
</box>
|
|
<box hibit="14" width="5" settings="5">
|
|
<c>1</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="FCVT_SH_floatdp1" oneofinclass="6" oneof="6" label="Half-precision to single-precision" bitdiffs="ftype == 11 && opc == 00">
|
|
<docvars>
|
|
<docvar key="convert-type" value="half-to-single" />
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<box hibit="23" width="2" name="ftype">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="16" width="2" name="opc">
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<asmtemplate><text>FCVT </text><a link="sa_sd" hover="32-bit SIMD&FP destination register (field "Rd")"><Sd></a><text>, </text><a link="sa_hn" hover="16-bit SIMD&FP source register (field "Rn")"><Hn></a></asmtemplate>
|
|
</encoding>
|
|
<encoding name="FCVT_DH_floatdp1" oneofinclass="6" oneof="6" label="Half-precision to double-precision" bitdiffs="ftype == 11 && opc == 01">
|
|
<docvars>
|
|
<docvar key="convert-type" value="half-to-double" />
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<box hibit="23" width="2" name="ftype">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="16" width="2" name="opc">
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<asmtemplate><text>FCVT </text><a link="sa_dd" hover="64-bit SIMD&FP destination register (field "Rd")"><Dd></a><text>, </text><a link="sa_hn" hover="16-bit SIMD&FP source register (field "Rn")"><Hn></a></asmtemplate>
|
|
</encoding>
|
|
<encoding name="FCVT_HS_floatdp1" oneofinclass="6" oneof="6" label="Single-precision to half-precision" bitdiffs="ftype == 00 && opc == 11">
|
|
<docvars>
|
|
<docvar key="convert-type" value="single-to-half" />
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<box hibit="23" width="2" name="ftype">
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="16" width="2" name="opc">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
</box>
|
|
<asmtemplate><text>FCVT </text><a link="sa_hd" hover="16-bit SIMD&FP destination register (field "Rd")"><Hd></a><text>, </text><a link="sa_sn" hover="32-bit SIMD&FP source register (field "Rn")"><Sn></a></asmtemplate>
|
|
</encoding>
|
|
<encoding name="FCVT_DS_floatdp1" oneofinclass="6" oneof="6" label="Single-precision to double-precision" bitdiffs="ftype == 00 && opc == 01">
|
|
<docvars>
|
|
<docvar key="convert-type" value="single-to-double" />
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<box hibit="23" width="2" name="ftype">
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="16" width="2" name="opc">
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<asmtemplate><text>FCVT </text><a link="sa_dd" hover="64-bit SIMD&FP destination register (field "Rd")"><Dd></a><text>, </text><a link="sa_sn" hover="32-bit SIMD&FP source register (field "Rn")"><Sn></a></asmtemplate>
|
|
</encoding>
|
|
<encoding name="FCVT_HD_floatdp1" oneofinclass="6" oneof="6" label="Double-precision to half-precision" bitdiffs="ftype == 01 && opc == 11">
|
|
<docvars>
|
|
<docvar key="convert-type" value="double-to-half" />
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<box hibit="23" width="2" name="ftype">
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="16" width="2" name="opc">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
</box>
|
|
<asmtemplate><text>FCVT </text><a link="sa_hd" hover="16-bit SIMD&FP destination register (field "Rd")"><Hd></a><text>, </text><a link="sa_dn" hover="64-bit SIMD&FP source register (field "Rn")"><Dn></a></asmtemplate>
|
|
</encoding>
|
|
<encoding name="FCVT_SD_floatdp1" oneofinclass="6" oneof="6" label="Double-precision to single-precision" bitdiffs="ftype == 01 && opc == 00">
|
|
<docvars>
|
|
<docvar key="convert-type" value="double-to-single" />
|
|
<docvar key="instr-class" value="float" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="FCVT" />
|
|
</docvars>
|
|
<box hibit="23" width="2" name="ftype">
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="16" width="2" name="opc">
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<asmtemplate><text>FCVT </text><a link="sa_sd" hover="32-bit SIMD&FP destination register (field "Rd")"><Sd></a><text>, </text><a link="sa_dn" hover="64-bit SIMD&FP source register (field "Rn")"><Dn></a></asmtemplate>
|
|
</encoding>
|
|
<ps_section howmany="1">
|
|
<ps name="aarch64/instrs/float/convert/fp" mylink="aarch64.instrs.float.convert.fp" 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 srcsize;
|
|
integer dstsize;
|
|
|
|
if ftype == opc then UNDEFINED;
|
|
|
|
case ftype of
|
|
when '00' srcsize = 32;
|
|
when '01' srcsize = 64;
|
|
when '10' UNDEFINED;
|
|
when '11' srcsize = 16;
|
|
case opc of
|
|
when '00' dstsize = 32;
|
|
when '01' dstsize = 64;
|
|
when '10' UNDEFINED;
|
|
when '11' dstsize = 16;</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</iclass>
|
|
</classes>
|
|
<explanations scope="all">
|
|
<explanation enclist="FCVT_DH_floatdp1, FCVT_DS_floatdp1" symboldefcount="1">
|
|
<symbol link="sa_dd"><Dd></symbol>
|
|
<account encodedin="Rd">
|
|
<intro>
|
|
<para>Is the 64-bit name of the SIMD&FP destination register, encoded in the "Rd" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="FCVT_HD_floatdp1, FCVT_HS_floatdp1" symboldefcount="1">
|
|
<symbol link="sa_hd"><Hd></symbol>
|
|
<account encodedin="Rd">
|
|
<intro>
|
|
<para>Is the 16-bit name of the SIMD&FP destination register, encoded in the "Rd" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="FCVT_DS_floatdp1, FCVT_HS_floatdp1" symboldefcount="1">
|
|
<symbol link="sa_sn"><Sn></symbol>
|
|
<account encodedin="Rn">
|
|
<intro>
|
|
<para>Is the 32-bit name of the SIMD&FP source register, encoded in the "Rn" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="FCVT_SD_floatdp1, FCVT_SH_floatdp1" symboldefcount="1">
|
|
<symbol link="sa_sd"><Sd></symbol>
|
|
<account encodedin="Rd">
|
|
<intro>
|
|
<para>Is the 32-bit name of the SIMD&FP destination register, encoded in the "Rd" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="FCVT_DH_floatdp1, FCVT_SH_floatdp1" symboldefcount="1">
|
|
<symbol link="sa_hn"><Hn></symbol>
|
|
<account encodedin="Rn">
|
|
<intro>
|
|
<para>Is the 16-bit name of the SIMD&FP source register, encoded in the "Rn" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="FCVT_HD_floatdp1, FCVT_SD_floatdp1" symboldefcount="1">
|
|
<symbol link="sa_dn"><Dn></symbol>
|
|
<account encodedin="Rn">
|
|
<intro>
|
|
<para>Is the 64-bit name of the SIMD&FP source register, encoded in the "Rn" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
</explanations>
|
|
<ps_section howmany="1">
|
|
<ps name="aarch64/instrs/float/convert/fp" mylink="execute" enclabels="" sections="1" secttype="Operation">
|
|
<pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="impl-aarch64.CheckFPEnabled64.0" file="shared_pseudocode.xml" hover="function: CheckFPEnabled64()">CheckFPEnabled64</a>();
|
|
|
|
bits(srcsize) operand = <a link="impl-aarch64.V.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) V[integer n, integer width]">V</a>[n, srcsize];
|
|
<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);
|
|
bits(128) result = 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, 128] else <a link="impl-shared.Zeros.1" file="shared_pseudocode.xml" hover="function: bits(N) Zeros(integer N)">Zeros</a>(128);
|
|
|
|
<a link="impl-shared.Elem.write.3" file="shared_pseudocode.xml" hover="accessor: Elem[bits(N) &vector, integer e, integer size] = bits(size) value">Elem</a>[result, 0, dstsize] = <a link="impl-shared.FPConvert.3" file="shared_pseudocode.xml" hover="function: bits(M) FPConvert(bits(N) op, FPCRType fpcr, integer M)">FPConvert</a>(operand, fpcr, dstsize);
|
|
|
|
<a link="impl-aarch64.V.write.2" file="shared_pseudocode.xml" hover="accessor: V[integer n, integer width] = bits(width) value">V</a>[d, 128] = result;</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</instructionsection>
|