<?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="DMB" title="DMB -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="system"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="DMB"/>
  </docvars>
  <heading>DMB</heading>
  <desc>
    <brief>
      <para>Data memory barrier</para>
    </brief>
    <authored>
      <para>This instruction is a memory barrier that ensures the ordering
of observations of memory accesses, see <xref linkend="ARMARM_BEIIECBH">Data Memory Barrier</xref>.</para>
    </authored>
  </desc>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="System" oneof="1" id="iclass_system" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="instr-class" value="system"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="DMB"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="32" psname="A64.control.barriers.DMB_BO_barriers" tworows="1">
        <box hibit="31" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="28" width="3" settings="3">
          <c>1</c>
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="25" width="14" settings="14">
          <c>0</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="11" width="4" name="CRm" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="7" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="6" width="2" name="opc" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="4" width="5" name="Rt" usename="1" settings="5" psbits="xxxxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
      </regdiagram>
      <encoding name="DMB_BO_barriers" oneofinclass="1" oneof="1" label="">
        <docvars>
          <docvar key="instr-class" value="system"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="DMB"/>
        </docvars>
        <asmtemplate><text>DMB  (</text><a hover="Specifies the limitation on the barrier operation. Values are:&#10;&#10;&#10;SY&#10;: Full system is the required shareability domain, reads and writes are the required access types, both before and after the barrier instruction. This option is referred to as the full system barrier. Encoded as CRm = 0b1111.&#10;&#10;ST&#10;: Full system is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = 0b1110.&#10;&#10;LD&#10;: Full system is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = 0b1101.&#10;&#10;ISH&#10;: Inner Shareable is the required shareability domain, reads and writes are the required access types, both before and after the barrier instruction. Encoded as CRm = 0b1011.&#10;&#10;ISHST&#10;: Inner Shareable is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = 0b1010.&#10;&#10;ISHLD&#10;: Inner Shareable is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = 0b1001.&#10;&#10;NSH&#10;: Non-shareable is the required shareability domain, reads and writes are the required access, both before and after the barrier instruction. Encoded as CRm = 0b0111.&#10;&#10;NSHST&#10;: Non-shareable is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = 0b0110.&#10;&#10;NSHLD&#10;: Non-shareable is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = 0b0101.&#10;&#10;OSH&#10;: Outer Shareable is the required shareability domain, reads and writes are the required access types, both before and after the barrier instruction. Encoded as CRm = 0b0011.&#10;&#10;OSHST&#10;: Outer Shareable is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = 0b0010.&#10;&#10;OSHLD&#10;: Outer Shareable is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = 0b0001.&#10;&#10;&#10;All other encodings of &quot;CRm&quot; that are not listed are reserved and can be encoded using the #&lt;imm&gt; syntax. All unsupported and reserved options must execute as a full system barrier operation, but software must not rely on this behavior. For more information on whether an access is before or after a barrier instruction, see x[Data Memory Barrier (DMB)](BEIIECBH) or see x[Data Synchronization Barrier (DSB)](BEICEFJH)." link="CRm_option__3">&lt;option&gt;</a><text>|#</text><a hover="Is a 4-bit unsigned immediate, in the range 0 to 15, encoded in the &quot;CRm&quot; field." link="option__2">&lt;imm&gt;</a><text>)</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.control.barriers.DMB_BO_barriers" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">var domain : MBReqDomain;
var types : <a link="MBReqTypes" file="shared_pseudocode.xml" hover="type MBReqTypes">MBReqTypes</a>;
case CRm[3:2] of
    when '00' =&gt; domain = MBReqDomain_OuterShareable;
    when '01' =&gt; domain = MBReqDomain_Nonshareable;
    when '10' =&gt; domain = MBReqDomain_InnerShareable;
    when '11' =&gt; domain = MBReqDomain_FullSystem;
end;
case CRm[1:0] of
    when '00' =&gt; types = MBReqTypes_All; domain = MBReqDomain_FullSystem;
    when '01' =&gt; types = MBReqTypes_Reads;
    when '10' =&gt; types = MBReqTypes_Writes;
    when '11' =&gt; types = MBReqTypes_All;
end;
</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="DMB_BO_barriers" symboldefcount="1">
      <symbol link="CRm_option__3">&lt;option&gt;</symbol>
      <definition encodedin="CRm">
        <intro>
          <para>Specifies the limitation on the barrier operation. Values are:</para>
          <list type="param">
            <listitem>
              <param>SY</param>
              <content>Full system is the required shareability domain, reads and writes are the required access types, both before and after the barrier instruction. This option is referred to as the full system barrier. Encoded as CRm = <binarynumber>0b1111</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>ST</param>
              <content>Full system is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = <binarynumber>0b1110</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>LD</param>
              <content>Full system is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = <binarynumber>0b1101</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>ISH</param>
              <content>Inner Shareable is the required shareability domain, reads and writes are the required access types, both before and after the barrier instruction. Encoded as CRm = <binarynumber>0b1011</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>ISHST</param>
              <content>Inner Shareable is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = <binarynumber>0b1010</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>ISHLD</param>
              <content>Inner Shareable is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = <binarynumber>0b1001</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>NSH</param>
              <content>Non-shareable is the required shareability domain, reads and writes are the required access, both before and after the barrier instruction. Encoded as CRm = <binarynumber>0b0111</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>NSHST</param>
              <content>Non-shareable is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = <binarynumber>0b0110</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>NSHLD</param>
              <content>Non-shareable is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = <binarynumber>0b0101</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>OSH</param>
              <content>Outer Shareable is the required shareability domain, reads and writes are the required access types, both before and after the barrier instruction. Encoded as CRm = <binarynumber>0b0011</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>OSHST</param>
              <content>Outer Shareable is the required shareability domain, writes are the required access type, both before and after the barrier instruction. Encoded as CRm = <binarynumber>0b0010</binarynumber>.</content>
            </listitem>
            <listitem>
              <param>OSHLD</param>
              <content>Outer Shareable is the required shareability domain, reads are the required access type before the barrier instruction, and reads and writes are the required access types after the barrier instruction. Encoded as CRm = <binarynumber>0b0001</binarynumber>.</content>
            </listitem>
          </list>
          <para>All other encodings of "CRm" that are not listed are reserved and can be encoded using the <syntax>#&lt;imm&gt;</syntax> syntax. All unsupported and reserved options must execute as a full system barrier operation, but software must not rely on this behavior. For more information on whether an access is before or after a barrier instruction, see <xref linkend="BEIIECBH">Data Memory Barrier (DMB)</xref> or see <xref linkend="BEICEFJH">Data Synchronization Barrier (DSB)</xref>.</para>
        </intro>
        <table class="valuetable">
          <tgroup cols="2">
            <thead>
              <row>
                <entry class="bitfield">CRm</entry>
                <entry class="symbol">&lt;option&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">xx00</entry>
                <entry class="symbol">RESERVED</entry>
              </row>
              <row>
                <entry class="bitfield">0001</entry>
                <entry class="symbol">OSHLD</entry>
              </row>
              <row>
                <entry class="bitfield">0010</entry>
                <entry class="symbol">OSHST</entry>
              </row>
              <row>
                <entry class="bitfield">0011</entry>
                <entry class="symbol">OSH</entry>
              </row>
              <row>
                <entry class="bitfield">0101</entry>
                <entry class="symbol">NSHLD</entry>
              </row>
              <row>
                <entry class="bitfield">0110</entry>
                <entry class="symbol">NSHST</entry>
              </row>
              <row>
                <entry class="bitfield">0111</entry>
                <entry class="symbol">NSH</entry>
              </row>
              <row>
                <entry class="bitfield">1001</entry>
                <entry class="symbol">ISHLD</entry>
              </row>
              <row>
                <entry class="bitfield">1010</entry>
                <entry class="symbol">ISHST</entry>
              </row>
              <row>
                <entry class="bitfield">1011</entry>
                <entry class="symbol">ISH</entry>
              </row>
              <row>
                <entry class="bitfield">1101</entry>
                <entry class="symbol">LD</entry>
              </row>
              <row>
                <entry class="bitfield">1110</entry>
                <entry class="symbol">ST</entry>
              </row>
              <row>
                <entry class="bitfield">1111</entry>
                <entry class="symbol">SY</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="DMB_BO_barriers" symboldefcount="1">
      <symbol link="option__2">&lt;imm&gt;</symbol>
      <account encodedin="CRm">
        <intro>
          <para>Is a 4-bit unsigned immediate, in the range 0 to 15, encoded in the "CRm" field.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.control.barriers.DMB_BO_barriers" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">DataMemoryBarrier(domain, types);</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
