<?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="VDOT_s" title="VDOT (by element) -- AArch32" type="instruction">
  <docvars>
    <docvar key="instr-class" value="fpsimd"/>
    <docvar key="mnemonic" value="VDOT"/>
  </docvars>
  <heading>VDOT (by element)</heading>
  <desc>
    <brief>
      <para>BFloat16 floating-point indexed dot product (vector, by element)</para>
    </brief>
    <authored>
      <para>BFloat16 floating-point indexed dot product (vector, by element).
This instruction delimits the source vectors into pairs of
16-bit BF16 elements. Each pair of elements in the first source
vector is multiplied by the indexed pair of elements in the second
source vector. The resulting single-precision products are then
summed and added destructively to the single-precision element
in the destination vector which aligns with the pair of BFloat16 values
in the first source vector. The instruction does not update the <xref linkend="ARMARM_AArch32.fpscr">FPSCR</xref> exception status.</para>
    </authored>
  </desc>
  <alias_list howmany="0"/>
  <classes>
    <classesintro count="2">
      <txt>It has encodings from the following instruction sets:</txt>
      <txt> A32 (</txt>
      <a href="#iclass_a1">A1</a>
      <txt>)</txt>
      <txt> and </txt>
      <txt> T32 (</txt>
      <a href="#iclass_t1">T1</a>
      <txt>)</txt>
      <txt>.</txt>
    </classesintro>
    <iclass name="A1" oneof="2" id="iclass_a1" no_encodings="2" isa="A32">
      <docvars>
        <docvar key="armarmheading" value="A1"/>
        <docvar key="instr-class" value="fpsimd"/>
        <docvar key="isa" value="A32"/>
        <docvar key="mnemonic" value="VDOT"/>
      </docvars>
      <iclassintro count="2"/>
      <arch_variants>
        <arch_variant feature="FEAT_AA32BF16" name="v8Ap6"/>
      </arch_variants>
      <regdiagram form="32" psname="A32.cops_as.advsimdext.simd_dotprod.VDOT_s_A1_D" tworows="1">
        <box hibit="31" width="8" settings="8">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="23" name="op1" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="22" width="1" name="D" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="21" width="2" name="op2" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="19" width="4" name="Vn" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="15" width="4" name="Vd" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="11" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="8" name="op4" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="7" width="1" name="N" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="6" width="1" name="Q" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="5" width="1" name="M" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="4" name="U" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="3" width="4" name="Vm" usename="1">
          <c colspan="4"/>
        </box>
      </regdiagram>
      <encoding name="VDOT_s_A1_D" oneofinclass="2" oneof="4" label="64-bit SIMD vector" bitdiffs="Q == 0">
        <docvars>
          <docvar key="armarmheading" value="A1"/>
          <docvar key="instr-class" value="fpsimd"/>
          <docvar key="isa" value="A32"/>
          <docvar key="simdvectorsize" value="double"/>
          <docvar key="mnemonic" value="VDOT"/>
        </docvars>
        <box hibit="6" width="1" name="Q">
          <c>0</c>
        </box>
        <asmtemplate><text>VDOT{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}.BF16  </text><a hover="Is the 64-bit name of the SIMD&amp;FP destination register, encoded in the &quot;D:Vd&quot; field." link="D_Vd">&lt;Dd&gt;</a><text>, </text><a hover="Is the 64-bit name of the first SIMD&amp;FP source register, encoded in the &quot;N:Vn&quot; field." link="N_Vn">&lt;Dn&gt;</a><text>, </text><a hover="Is the 64-bit name of the second SIMD&amp;FP source register, encoded in the &quot;Vm&quot; field." link="Dm__3">&lt;Dm&gt;</a><text>[</text><a hover="Is the element index in the range 0 to 1, encoded in the &quot;M&quot; field." link="index__5">&lt;index&gt;</a><text>]</text></asmtemplate>
      </encoding>
      <encoding name="VDOT_s_A1_Q" oneofinclass="2" oneof="4" label="128-bit SIMD vector" bitdiffs="Q == 1">
        <docvars>
          <docvar key="armarmheading" value="A1"/>
          <docvar key="instr-class" value="fpsimd"/>
          <docvar key="isa" value="A32"/>
          <docvar key="simdvectorsize" value="quad"/>
          <docvar key="mnemonic" value="VDOT"/>
        </docvars>
        <box hibit="6" width="1" name="Q">
          <c>1</c>
        </box>
        <asmtemplate><text>VDOT{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}.BF16  </text><a hover="Is the 128-bit name of the SIMD&amp;FP destination register, encoded in the &quot;D:Vd&quot; field as &lt;Qd&gt;*2." link="D_Vd__4">&lt;Qd&gt;</a><text>, </text><a hover="Is the 128-bit name of the first SIMD&amp;FP source register, encoded in the &quot;N:Vn&quot; field as &lt;Qn&gt;*2." link="N_Vn__2">&lt;Qn&gt;</a><text>, </text><a hover="Is the 64-bit name of the second SIMD&amp;FP source register, encoded in the &quot;Vm&quot; field." link="Dm__3">&lt;Dm&gt;</a><text>[</text><a hover="Is the element index in the range 0 to 1, encoded in the &quot;M&quot; field." link="index__5">&lt;index&gt;</a><text>]</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A32.cops_as.advsimdext.simd_dotprod.VDOT_s_A1_D" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_AA32BF16) then Undefined(); end;
if Q == '1' &amp;&amp; (Vd[0] == '1' || Vn[0] == '1') then Undefined(); end;
let d : integer = UInt(D::Vd);
let n : integer = UInt(N::Vn);
let m : integer = UInt(Vm);
let i : integer = UInt(M);
let regs : integer = if Q == '1' then 2 else 1;</pstext></ps>
      </ps_section>
    </iclass>
    <iclass name="T1" oneof="2" id="iclass_t1" no_encodings="2" isa="T32">
      <docvars>
        <docvar key="armarmheading" value="T1"/>
        <docvar key="instr-class" value="fpsimd"/>
        <docvar key="isa" value="T32"/>
        <docvar key="mnemonic" value="VDOT"/>
      </docvars>
      <iclassintro count="2"/>
      <arch_variants>
        <arch_variant feature="FEAT_AA32BF16" name="v8Ap6"/>
      </arch_variants>
      <regdiagram form="16x2" psname="T32.w.cpaf.advsimdext.tsimd_dotprod.VDOT_s_T1_D" tworows="1">
        <box hibit="31" width="8" settings="8">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="23" name="op1" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="22" width="1" name="D" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="21" width="2" name="op2" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="19" width="4" name="Vn" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="15" width="4" name="Vd" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="11" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="8" name="op4" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="7" width="1" name="N" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="6" width="1" name="Q" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="5" width="1" name="M" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="4" name="U" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="3" width="4" name="Vm" usename="1">
          <c colspan="4"/>
        </box>
      </regdiagram>
      <encoding name="VDOT_s_T1_D" oneofinclass="2" oneof="4" label="64-bit SIMD vector" bitdiffs="Q == 0">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="fpsimd"/>
          <docvar key="isa" value="T32"/>
          <docvar key="simdvectorsize" value="double"/>
          <docvar key="mnemonic" value="VDOT"/>
        </docvars>
        <box hibit="6" width="1" name="Q">
          <c>0</c>
        </box>
        <asmtemplate><text>VDOT{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}.BF16  </text><a hover="Is the 64-bit name of the SIMD&amp;FP destination register, encoded in the &quot;D:Vd&quot; field." link="D_Vd">&lt;Dd&gt;</a><text>, </text><a hover="Is the 64-bit name of the first SIMD&amp;FP source register, encoded in the &quot;N:Vn&quot; field." link="N_Vn">&lt;Dn&gt;</a><text>, </text><a hover="Is the 64-bit name of the second SIMD&amp;FP source register, encoded in the &quot;Vm&quot; field." link="Dm__3">&lt;Dm&gt;</a><text>[</text><a hover="Is the element index in the range 0 to 1, encoded in the &quot;M&quot; field." link="index__5">&lt;index&gt;</a><text>]</text></asmtemplate>
      </encoding>
      <encoding name="VDOT_s_T1_Q" oneofinclass="2" oneof="4" label="128-bit SIMD vector" bitdiffs="Q == 1">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="fpsimd"/>
          <docvar key="isa" value="T32"/>
          <docvar key="simdvectorsize" value="quad"/>
          <docvar key="mnemonic" value="VDOT"/>
        </docvars>
        <box hibit="6" width="1" name="Q">
          <c>1</c>
        </box>
        <asmtemplate><text>VDOT{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}.BF16  </text><a hover="Is the 128-bit name of the SIMD&amp;FP destination register, encoded in the &quot;D:Vd&quot; field as &lt;Qd&gt;*2." link="D_Vd__4">&lt;Qd&gt;</a><text>, </text><a hover="Is the 128-bit name of the first SIMD&amp;FP source register, encoded in the &quot;N:Vn&quot; field as &lt;Qn&gt;*2." link="N_Vn__2">&lt;Qn&gt;</a><text>, </text><a hover="Is the 64-bit name of the second SIMD&amp;FP source register, encoded in the &quot;Vm&quot; field." link="Dm__3">&lt;Dm&gt;</a><text>[</text><a hover="Is the element index in the range 0 to 1, encoded in the &quot;M&quot; field." link="index__5">&lt;index&gt;</a><text>]</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="T32.w.cpaf.advsimdext.tsimd_dotprod.VDOT_s_T1_D" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if InITBlock() then UnpredictableProcedure(); end;
if !IsFeatureImplemented(FEAT_AA32BF16) then Undefined(); end;
if Q == '1' &amp;&amp; (Vd[0] == '1' || Vn[0] == '1') then Undefined(); end;
let d : integer = UInt(D::Vd);
let n : integer = UInt(N::Vn);
let m : integer = UInt(Vm);
let i : integer = UInt(M);
let regs : integer = if Q == '1' then 2 else 1;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="VDOT_s_A1_D, VDOT_s_A1_Q, VDOT_s_T1_D, VDOT_s_T1_Q" symboldefcount="1">
      <symbol link="qw_option">&lt;q&gt;</symbol>
      <account encodedin="">
        <intro>
          <para>See <xref linkend="Babbefhf">Standard assembler syntax fields</xref>.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="VDOT_s_A1_D, VDOT_s_T1_D" symboldefcount="1">
      <symbol link="D_Vd">&lt;Dd&gt;</symbol>
      <account encodedin="(D :: Vd)">
        <intro>
          <para>Is the 64-bit name of the SIMD&amp;FP destination register, encoded in the "D:Vd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="VDOT_s_A1_D, VDOT_s_T1_D" symboldefcount="1">
      <symbol link="N_Vn">&lt;Dn&gt;</symbol>
      <account encodedin="(N :: Vn)">
        <intro>
          <para>Is the 64-bit name of the first SIMD&amp;FP source register, encoded in the "N:Vn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="VDOT_s_A1_D, VDOT_s_A1_Q, VDOT_s_T1_D, VDOT_s_T1_Q" symboldefcount="1">
      <symbol link="Dm__3">&lt;Dm&gt;</symbol>
      <account encodedin="Vm">
        <intro>
          <para>Is the 64-bit name of the second SIMD&amp;FP source register, encoded in the "Vm" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="VDOT_s_A1_D, VDOT_s_A1_Q, VDOT_s_T1_D, VDOT_s_T1_Q" symboldefcount="1">
      <symbol link="index__5">&lt;index&gt;</symbol>
      <account encodedin="M">
        <intro>
          <para>Is the element index in the range 0 to 1, encoded in the "M" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="VDOT_s_A1_Q, VDOT_s_T1_Q" symboldefcount="1">
      <symbol link="D_Vd__4">&lt;Qd&gt;</symbol>
      <account encodedin="(D :: Vd)">
        <intro>
          <para>Is the 128-bit name of the SIMD&amp;FP destination register, encoded in the "D:Vd" field as &lt;Qd&gt;*2.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="VDOT_s_A1_Q, VDOT_s_T1_Q" symboldefcount="1">
      <symbol link="N_Vn__2">&lt;Qn&gt;</symbol>
      <account encodedin="(N :: Vn)">
        <intro>
          <para>Is the 128-bit name of the first SIMD&amp;FP source register, encoded in the "N:Vn" field as &lt;Qn&gt;*2.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A32.cops_as.advsimdext.simd_dotprod.VDOT_s_A1_D" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">CheckAdvSIMDEnabled();
let fpcr : FPCR_Type = StandardFPCR();

var operand1 : bits(64);
var operand2 : bits(64);
var result : bits(64);

operand2 = Din(m);
for r = 0 to regs-1 do
    operand1 = Din(n+r);
    result = Din(d+r);
    for e = 0 to 1 do
        let elt1_a : bits(16) = operand1[(2 * e + 0)*:16];
        let elt1_b : bits(16) = operand1[(2 * e + 1)*:16];
        let elt2_a : bits(16) = operand2[(2 * i + 0)*:16];
        let elt2_b : bits(16) = operand2[(2 * i + 1)*:16];
        let sum : bits(32) = FPAdd_BF16(BFMulH(elt1_a, elt2_a, fpcr),
                                           BFMulH(elt1_b, elt2_b, fpcr), fpcr);
        result[e*:32] = FPAdd_BF16(result[e*:32], sum, fpcr);
    end;
    D(d+r) = result;
end;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
