<?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="PUSH_STMDB" title="PUSH (multiple registers) -- AArch32" type="alias">
  <docvars>
    <docvar key="alias_mnemonic" value="PUSH"/>
    <docvar key="instr-class" value="general"/>
    <docvar key="mnemonic" value="STM"/>
  </docvars>
  <heading>PUSH (multiple registers)</heading>
  <desc>
    <brief>
      <para>Push multiple registers to Stack</para>
    </brief>
    <authored>
      <para>Push multiple registers to Stack stores multiple general-purpose registers to the stack, storing to consecutive memory locations ending just below the address in SP, and updates SP to point to the start of the stored data.</para>
    </authored>
  </desc>
  <operationalnotes/>
  <aliasto refiform="stmdb.xml" iformid="STMDB">STMDB, STMFD</aliasto>
  <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="1" isa="A32">
      <docvars>
        <docvar key="armarmheading" value="A1"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="A32"/>
        <docvar key="mnemonic" value="STM"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="32" psname="A32.brblk.ldstm.STMDB_A1.PUSH" tworows="1">
        <box hibit="31" width="4" name="cond" usename="1" settings="4" constraint="!= 1111">
          <c colspan="4">!= 1111</c>
        </box>
        <box hibit="27" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="25" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="24" name="P" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="23" name="U" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="22" name="op" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="21" name="W" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="20" name="L" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="19" width="4" name="Rn" usename="1" settings="4" psbits="xxxx">
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="15" width="16" name="register_list" usename="1">
          <c colspan="16"/>
        </box>
      </regdiagram>
      <encoding name="PUSH_STMDB_A1" oneofinclass="1" oneof="2" label="A1">
        <docvars>
          <docvar key="armarmheading" value="A1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="A32"/>
          <docvar key="mnemonic" value="STM"/>
          <docvar key="alias_mnemonic" value="PUSH"/>
        </docvars>
        <asmtemplate><text>PUSH{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}  </text><a hover="For the &quot;A1&quot; variant: is a list of two or more registers to be stored, separated by commas and surrounded by { and }. The lowest-numbered register is stored to the lowest memory address, through to the highest-numbered register to the highest memory address. See also x[Encoding of lists of general-purpose registers and the PC](CHDDBEDG)." link="register_list__7">&lt;registers&gt;</a></asmtemplate>
        <equivalent_to>
          <asmtemplate><a href="stmdb.xml#STMDB_A1">STMDB</a><text>{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." href="stmdb.xml#cond__2">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." href="stmdb.xml#qw_option">&lt;q&gt;</a><text>}  SP!, </text><a hover="For the &quot;A1&quot; variant: is a list of one or more registers to be stored, separated by commas and surrounded by { and }." href="stmdb.xml#register_list__3">&lt;registers&gt;</a></asmtemplate>
          <aliascond>BitCount(register_list) &gt; 1</aliascond>
        </equivalent_to>
      </encoding>
    </iclass>
    <iclass name="T1" oneof="2" id="iclass_t1" no_encodings="1" isa="T32">
      <docvars>
        <docvar key="armarmheading" value="T1"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="T32"/>
        <docvar key="mnemonic" value="STM"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="16x2" psname="T32.w.ldstm.STMDB_T1.PUSH" tworows="1">
        <box hibit="31" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="28" width="4" settings="4">
          <c>0</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="24" width="2" name="opc" usename="1" settings="2" psbits="xx">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="22" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="21" name="W" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="20" name="L" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="19" width="4" name="Rn" usename="1" settings="4" psbits="xxxx">
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="15" name="P" usename="1" settings="1" psbits="x">
          <c>(0)</c>
        </box>
        <box hibit="14" width="1" name="M" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="13" width="14" name="register_list" usename="1">
          <c colspan="14"/>
        </box>
      </regdiagram>
      <encoding name="PUSH_STMDB_T1" oneofinclass="1" oneof="2" label="T1">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic" value="STM"/>
          <docvar key="alias_mnemonic" value="PUSH"/>
        </docvars>
        <asmtemplate><text>PUSH{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}  </text><a hover="For the &quot;T1&quot; variant: is a list of one or more registers to be stored, separated by commas and surrounded by { and }. The lowest-numbered register is stored to the lowest memory address, through to the highest-numbered register to the highest memory address. See also x[Encoding of lists of general-purpose registers and the PC](CHDDBEDG)." link="register_list__33">&lt;registers&gt;</a></asmtemplate>
        <asmtemplate comment="register_list[13:8] == '000000'"><text>PUSH{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&lt;c&gt;</a><text>}.W  </text><a hover="For the &quot;T1&quot; variant: is a list of one or more registers to be stored, separated by commas and surrounded by { and }. The lowest-numbered register is stored to the lowest memory address, through to the highest-numbered register to the highest memory address. See also x[Encoding of lists of general-purpose registers and the PC](CHDDBEDG)." link="register_list__33">&lt;registers&gt;</a></asmtemplate>
        <equivalent_to>
          <asmtemplate><a href="stmdb.xml#STMDB_T1">STMDB</a><text>{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." href="stmdb.xml#cond__2">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." href="stmdb.xml#qw_option">&lt;q&gt;</a><text>}  SP!, </text><a hover="For the &quot;T1&quot; variant: is a list of one or more registers to be stored, separated by commas and surrounded by { and }." href="stmdb.xml#register_list__30">&lt;registers&gt;</a></asmtemplate>
          <aliascond>BitCount(M :: register_list) &gt; 1</aliascond>
        </equivalent_to>
      </encoding>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="PUSH_STMDB_A1, PUSH_STMDB_T1" symboldefcount="1">
      <symbol link="cond__2">&lt;c&gt;</symbol>
      <account encodedin="cond">
        <intro>
          <para>See <xref linkend="Babbefhf">Standard assembler syntax fields</xref>.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="PUSH_STMDB_A1, PUSH_STMDB_T1" 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="PUSH_STMDB_A1" symboldefcount="1">
      <symbol link="register_list__7">&lt;registers&gt;</symbol>
      <account encodedin="">
        <intro>
          <para>For the "A1" variant: is a list of two or more registers to be stored, separated by commas and surrounded by { and }. The lowest-numbered register is stored to the lowest memory address, through to the highest-numbered register to the highest memory address. See also <xref linkend="CHDDBEDG">Encoding of lists of general-purpose registers and the PC</xref>.</para>
          <para>The SP and PC can be in the list. However:</para>
          <list type="unordered">
            <listitem>
              <content>Arm deprecates the use of instructions that include the PC in the list.</content>
            </listitem>
            <listitem>
              <content>If the SP is in the list, and it is not the lowest-numbered register in the list, the instruction stores an <arm-defined-word>UNKNOWN</arm-defined-word> value for the SP.</content>
            </listitem>
          </list>
        </intro>
      </account>
    </explanation>
    <explanation enclist="PUSH_STMDB_T1" symboldefcount="2">
      <symbol link="register_list__33">&lt;registers&gt;</symbol>
      <account encodedin="">
        <intro>
          <para>For the "T1" variant: is a list of one or more registers to be stored, separated by commas and surrounded by { and }. The lowest-numbered register is stored to the lowest memory address, through to the highest-numbered register to the highest memory address. See also <xref linkend="CHDDBEDG">Encoding of lists of general-purpose registers and the PC</xref>.</para>
          <para>The registers in the list must be in the range R0-R12, encoded in the "register_list" field, and can optionally contain the LR. If the LR is in the list, the "M" field is set to 1, otherwise it defaults to 0.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
