<?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="LD3R_advsimd" title="LD3R -- A64" type="instruction">
  <docvars>
    <docvar key="as-structure-org" value="to-all-lanes"/>
    <docvar key="instr-class" value="advsimd"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="LD3R"/>
  </docvars>
  <heading>LD3R</heading>
  <desc>
    <brief>
      <para>Load single 3-element structure and replicate to all lanes of three registers</para>
    </brief>
    <authored>
      <para>This instruction loads a 3-element structure from memory and replicates the
structure to all the lanes of the three SIMD&amp;FP registers.</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>
  <operationalnotes>
    <operationalnote>
      <operationalnote_content>
        <para>This instruction is a data-independent-time instruction as described in <xref linkend="ARMARM_BEICCDDAB3">About PSTATE.DIT</xref>.</para>
      </operationalnote_content>
    </operationalnote>
  </operationalnotes>
  <alias_list howmany="0"/>
  <classes>
    <classesintro count="2">
      <txt>It has encodings from 2 classes:</txt>
      <a href="#iclass_no_offset">No offset</a>
      <txt> and </txt>
      <a href="#iclass_post_index">Post-index</a>
    </classesintro>
    <iclass name="No offset" oneof="2" id="iclass_no_offset" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="as-structure-org" value="to-all-lanes"/>
        <docvar key="as-structure-post-index" value="as-no-post-index"/>
        <docvar key="instr-class" value="advsimd"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="LD3R"/>
      </docvars>
      <iclassintro count="1"/>
      <arch_variants>
        <arch_variant feature="FEAT_AdvSIMD" name="v8Ap0"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.ldst.asisdlso.LD3R_asisdlso_R3" 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="2" settings="2">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="27" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="26" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="25" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="24" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="22" name="L" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="21" name="R" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="20" width="4" settings="4">
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="16" name="o2" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="15" width="3" name="opcode" usename="1" settings="3" psbits="xxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="12" name="S" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="11" width="2" name="size" usename="1">
          <c colspan="2"/>
        </box>
        <box hibit="9" width="5" name="Rn" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="4" width="5" name="Rt" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="LD3R_asisdlso_R3" oneofinclass="1" oneof="3" label="">
        <docvars>
          <docvar key="as-structure-post-index" value="as-no-post-index"/>
          <docvar key="instr-class" value="advsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="as-structure-org" value="to-all-lanes"/>
          <docvar key="mnemonic" value="LD3R"/>
        </docvars>
        <asmtemplate><text>LD3R  { </text><a hover="Is the name of the first or only SIMD&amp;FP register to be transferred, encoded in the &quot;Rt&quot; field." link="Vt">&lt;Vt&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text>, </text><a hover="Is the name of the second SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 1 modulo 32." link="Vt2">&lt;Vt2&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text>, </text><a hover="Is the name of the third SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 2 modulo 32." link="Vt3">&lt;Vt3&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text> }, [</text><a hover="Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the &quot;Rn&quot; field." link="XnSP_option">&lt;Xn|SP&gt;</a><text>]</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.ldst.asisdlso.LD3R_asisdlso_R3" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_AdvSIMD) 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;
var t : integer = UInt(Rt);
let n : integer = UInt(Rn);
let m : integer = ARBITRARY : integer;
let wback : boolean = FALSE;
let nontemporal : boolean = FALSE;
let tagchecked : boolean = wback || n != 31;</pstext></ps>
      </ps_section>
    </iclass>
    <iclass name="Post-index" oneof="2" id="iclass_post_index" no_encodings="2" isa="A64">
      <docvars>
        <docvar key="as-structure-org" value="to-all-lanes"/>
        <docvar key="as-structure-post-index" value="as-post-index"/>
        <docvar key="instr-class" value="advsimd"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="LD3R"/>
      </docvars>
      <iclassintro count="2"/>
      <arch_variants>
        <arch_variant feature="FEAT_AdvSIMD" name="v8Ap0"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.ldst.asisdlsop.LD3R_asisdlsop_R3_i" 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="7" settings="7">
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="22" name="L" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="21" name="R" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="20" width="5" name="Rm" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="15" width="3" name="opcode" usename="1" settings="3" psbits="xxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="12" name="S" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="11" width="2" name="size" usename="1">
          <c colspan="2"/>
        </box>
        <box hibit="9" width="5" name="Rn" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="4" width="5" name="Rt" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="LD3R_asisdlsop_R3_i" oneofinclass="2" oneof="3" label="Immediate offset" bitdiffs="Rm == 11111">
        <docvars>
          <docvar key="as-structure-index-source" value="post-index-imm"/>
          <docvar key="as-structure-post-index" value="as-post-index"/>
          <docvar key="instr-class" value="advsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="as-structure-org" value="to-all-lanes"/>
          <docvar key="ld1-single-labels" value="to-all-lanes-post-index-imm"/>
          <docvar key="mnemonic" value="LD3R"/>
        </docvars>
        <box hibit="20" width="5" name="Rm">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <asmtemplate><text>LD3R  { </text><a hover="Is the name of the first or only SIMD&amp;FP register to be transferred, encoded in the &quot;Rt&quot; field." link="Vt">&lt;Vt&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text>, </text><a hover="Is the name of the second SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 1 modulo 32." link="Vt2">&lt;Vt2&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text>, </text><a hover="Is the name of the third SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 2 modulo 32." link="Vt3">&lt;Vt3&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text> }, [</text><a hover="Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the &quot;Rn&quot; field." link="XnSP_option">&lt;Xn|SP&gt;</a><text>], </text><a hover="Is the post-index immediate offset, " link="imm_option__9">&lt;imm&gt;</a></asmtemplate>
      </encoding>
      <encoding name="LD3R_asisdlsop_RX3_r" oneofinclass="2" oneof="3" label="Register offset" bitdiffs="Rm != 11111">
        <docvars>
          <docvar key="as-structure-index-source" value="post-index-reg"/>
          <docvar key="as-structure-post-index" value="as-post-index"/>
          <docvar key="instr-class" value="advsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="as-structure-org" value="to-all-lanes"/>
          <docvar key="ld1-single-labels" value="to-all-lanes-post-index-reg"/>
          <docvar key="mnemonic" value="LD3R"/>
        </docvars>
        <box hibit="20" width="5" name="Rm">
          <c>N</c>
          <c>N</c>
          <c>N</c>
          <c>N</c>
          <c>N</c>
        </box>
        <asmtemplate><text>LD3R  { </text><a hover="Is the name of the first or only SIMD&amp;FP register to be transferred, encoded in the &quot;Rt&quot; field." link="Vt">&lt;Vt&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text>, </text><a hover="Is the name of the second SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 1 modulo 32." link="Vt2">&lt;Vt2&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text>, </text><a hover="Is the name of the third SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 2 modulo 32." link="Vt3">&lt;Vt3&gt;</a><text>.</text><a hover="Is an arrangement specifier, " link="T_option__2">&lt;T&gt;</a><text> }, [</text><a hover="Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the &quot;Rn&quot; field." link="XnSP_option">&lt;Xn|SP&gt;</a><text>], </text><a hover="Is the 64-bit name of the general-purpose post-index register, excluding XZR, encoded in the &quot;Rm&quot; field." link="Xm__2">&lt;Xm&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.ldst.asisdlsop.LD3R_asisdlsop_R3_i" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_AdvSIMD) 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;
var t : integer = UInt(Rt);
let n : integer = UInt(Rn);
let m : integer = UInt(Rm);
let wback : boolean = TRUE;
let nontemporal : boolean = FALSE;
let tagchecked : boolean = wback || n != 31;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="LD3R_asisdlso_R3, LD3R_asisdlsop_R3_i, LD3R_asisdlsop_RX3_r" symboldefcount="1">
      <symbol link="Vt">&lt;Vt&gt;</symbol>
      <account encodedin="Rt">
        <intro>
          <para>Is the name of the first or only SIMD&amp;FP register to be transferred, encoded in the &quot;Rt&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="LD3R_asisdlso_R3, LD3R_asisdlsop_R3_i, LD3R_asisdlsop_RX3_r" symboldefcount="1">
      <symbol link="T_option__2">&lt;T&gt;</symbol>
      <definition encodedin="(size :: Q)">
        <intro>Is an arrangement specifier, </intro>
        <table class="valuetable">
          <tgroup cols="3">
            <thead>
              <row>
                <entry class="bitfield">size</entry>
                <entry class="bitfield">Q</entry>
                <entry class="symbol">&lt;T&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">00</entry>
                <entry class="bitfield">0</entry>
                <entry class="symbol">8B</entry>
              </row>
              <row>
                <entry class="bitfield">00</entry>
                <entry class="bitfield">1</entry>
                <entry class="symbol">16B</entry>
              </row>
              <row>
                <entry class="bitfield">01</entry>
                <entry class="bitfield">0</entry>
                <entry class="symbol">4H</entry>
              </row>
              <row>
                <entry class="bitfield">01</entry>
                <entry class="bitfield">1</entry>
                <entry class="symbol">8H</entry>
              </row>
              <row>
                <entry class="bitfield">10</entry>
                <entry class="bitfield">0</entry>
                <entry class="symbol">2S</entry>
              </row>
              <row>
                <entry class="bitfield">10</entry>
                <entry class="bitfield">1</entry>
                <entry class="symbol">4S</entry>
              </row>
              <row>
                <entry class="bitfield">11</entry>
                <entry class="bitfield">0</entry>
                <entry class="symbol">1D</entry>
              </row>
              <row>
                <entry class="bitfield">11</entry>
                <entry class="bitfield">1</entry>
                <entry class="symbol">2D</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="LD3R_asisdlso_R3, LD3R_asisdlsop_R3_i, LD3R_asisdlsop_RX3_r" symboldefcount="1">
      <symbol link="Vt2">&lt;Vt2&gt;</symbol>
      <account encodedin="Rt">
        <intro>
          <para>Is the name of the second SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 1 modulo 32.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="LD3R_asisdlso_R3, LD3R_asisdlsop_R3_i, LD3R_asisdlsop_RX3_r" symboldefcount="1">
      <symbol link="Vt3">&lt;Vt3&gt;</symbol>
      <account encodedin="Rt">
        <intro>
          <para>Is the name of the third SIMD&amp;FP register to be transferred, encoded as &quot;Rt&quot; plus 2 modulo 32.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="LD3R_asisdlso_R3, LD3R_asisdlsop_R3_i, LD3R_asisdlsop_RX3_r" symboldefcount="1">
      <symbol link="XnSP_option">&lt;Xn|SP&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the &quot;Rn&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="LD3R_asisdlsop_R3_i" symboldefcount="1">
      <symbol link="imm_option__9">&lt;imm&gt;</symbol>
      <definition encodedin="size">
        <intro>Is the post-index immediate offset, </intro>
        <table class="valuetable">
          <tgroup cols="2">
            <thead>
              <row>
                <entry class="bitfield">size</entry>
                <entry class="symbol">&lt;imm&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">00</entry>
                <entry class="symbol">#3</entry>
              </row>
              <row>
                <entry class="bitfield">01</entry>
                <entry class="symbol">#6</entry>
              </row>
              <row>
                <entry class="bitfield">10</entry>
                <entry class="symbol">#12</entry>
              </row>
              <row>
                <entry class="bitfield">11</entry>
                <entry class="symbol">#24</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="LD3R_asisdlsop_RX3_r" symboldefcount="1">
      <symbol link="Xm__2">&lt;Xm&gt;</symbol>
      <account encodedin="Rm">
        <intro>
          <para>Is the 64-bit name of the general-purpose post-index register, excluding XZR, encoded in the &quot;Rm&quot; field.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.ldst.asisdlso.LD3R_asisdlso_R3" sections="1" secttype="Shared Decode">
      <pstext mayhavelinks="1" section="Postdecode" rep_section="postdecode">var scale : bits(2) = opcode[2:1];
let selem : integer = UInt(opcode[0]::R) + 1;
var replicate : boolean = FALSE;
var index : integer;

case scale of
    when '11' =&gt;
        // load and replicate
        if L == '0' || S == '1' 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;
        scale = size;
        replicate = TRUE;
    when '00' =&gt;
        index = UInt(Q::S::size);     // B[0-15]
    when '01' =&gt;
        if size[0] == '1' 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;
        index = UInt(Q::S::size[1]);  // H[0-7]
    when '10' =&gt;
        if size[1] == '1' 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 size[0] == '0' then
            index = UInt(Q::S);       // S[0-3]
        else
            if S == '1' 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;
            index = UInt(Q);          // D[0-1]
            scale = '11';
        end;
end;

let datasize : integer{} = 64 &lt;&lt; UInt(Q);
let esize : integer{} = 8 &lt;&lt; UInt(scale);</pstext></ps>
  </ps_section>
  <ps_section howmany="1">
    <ps name="A64.ldst.asisdlso.LD3R_asisdlso_R3" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="func_AArch64_CheckFPAdvSIMDEnabled_0" file="shared_pseudocode.xml">AArch64_CheckFPAdvSIMDEnabled</a>();

var address : bits(64);
var eaddr : bits(64);
var rval : bits(128);
var element : bits(esize);
var offs : bits(64) = Zeros{64};
let ebytes : integer{} = esize DIV 8;

let privileged : boolean = <a link="global_PSTATE" file="shared_pseudocode.xml">PSTATE</a>.EL != <a link="global_EL0" file="shared_pseudocode.xml">EL0</a>;
let accdesc : <a link="type_AccessDescriptor" file="shared_pseudocode.xml">AccessDescriptor</a> = <a link="func_CreateAccDescASIMD_4" file="shared_pseudocode.xml">CreateAccDescASIMD</a>(<a link="enum_MemOp_LOAD" file="shared_pseudocode.xml">MemOp_LOAD</a>, nontemporal, tagchecked,
                                                       privileged);

if n == 31 then
    <a link="func_CheckSPAlignment_0" file="shared_pseudocode.xml">CheckSPAlignment</a>();
    address = <a link="accessor_SP_1" file="shared_pseudocode.xml">SP</a>{64}();
else
    address = <a link="accessor_X_2" file="shared_pseudocode.xml">X</a>{64}(n);
end;

if replicate then
    // load and replicate to all elements
    for s = 0 to selem-1 do
        eaddr = <a link="func_AddressIncrement_3" file="shared_pseudocode.xml">AddressIncrement</a>(address, offs, accdesc);
        element = <a link="accessor_Mem_3" file="shared_pseudocode.xml">Mem</a>{esize}(eaddr, accdesc);
        // replicate to fill 128- or 64-bit register
        <a link="accessor_V_2" file="shared_pseudocode.xml">V</a>{datasize}(t) = Replicate{datasize}(element);
        offs = offs + ebytes;
        t = (t + 1) MOD 32;
    end;
else
    // load/store one element per register
    for s = 0 to selem-1 do
        rval = <a link="accessor_V_2" file="shared_pseudocode.xml">V</a>{128}(t);
        eaddr = <a link="func_AddressIncrement_3" file="shared_pseudocode.xml">AddressIncrement</a>(address, offs, accdesc);
        rval[index*:esize] = <a link="accessor_Mem_3" file="shared_pseudocode.xml">Mem</a>{esize}(eaddr, accdesc);
        <a link="accessor_V_2" file="shared_pseudocode.xml">V</a>{128}(t) = rval;
        offs = offs + ebytes;
        t = ( t + 1 ) MOD 32;
    end;
end;
if wback then
    if m != 31 then
        offs = <a link="accessor_X_2" file="shared_pseudocode.xml">X</a>{64}(m);
    end;
    address = <a link="func_AddressAdd_3" file="shared_pseudocode.xml">AddressAdd</a>(address, offs, accdesc);
    if n == 31 then
        <a link="accessor_SP_1" file="shared_pseudocode.xml">SP</a>{64}() = address;
    else
        <a link="accessor_X_2" file="shared_pseudocode.xml">X</a>{64}(n) = address;
    end;
end;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-26 20:27:25</timestamp>
  <commit_id>2026-03_rel</commit_id>
</instructionsection>