<?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" title="PUSH -- AArch32" type="instruction">
  <docvars>
    <docvar key="armarmheading" value="T1"/>
    <docvar key="instr-class" value="general"/>
    <docvar key="isa" value="T32"/>
    <docvar key="mnemonic" value="PUSH"/>
  </docvars>
  <heading>PUSH</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>
      <para>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="ARMARM_CHDDBEDG">Encoding of lists of
general-purpose registers and the PC</xref>.</para>
    </authored>
    <encodingnotes>
      <para>For more information about the <arm-defined-word>CONSTRAINED UNPREDICTABLE</arm-defined-word> behavior of this instruction, see <xref linkend="ARMARM_CJAEGDJC">Architectural Constraints on UNPREDICTABLE behaviors</xref>.</para>
    </encodingnotes>
  </desc>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="T1" oneof="1" 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="PUSH"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="16" psname="T32.n.misc16.pushpop16.PUSH_T1" tworows="1">
        <box hibit="15" width="4" settings="4">
          <c>1</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="11" name="L" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="10" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="8" width="1" name="M" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="7" width="8" name="register_list" usename="1">
          <c colspan="8"/>
        </box>
      </regdiagram>
      <encoding name="PUSH_T1" oneofinclass="1" oneof="1" label="">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic" value="PUSH"/>
        </docvars>
        <asmtemplate comment="Preferred syntax"><text>PUSH{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="AL_option__4">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qn_option">&lt;q&gt;</a><text>}  </text><a hover="Is a list of one or more registers to be stored, separated by commas and surrounded by { and }.&#10;&#10;The registers in the list must be in the range R0-R7, encoded in the &quot;register_list&quot; field, and can optionally include the LR. If the LR is in the list, the &quot;M&quot; field is set to 1, otherwise this field defaults to 0." link="register_list__26">&lt;registers&gt;</a></asmtemplate>
        <asmtemplate comment="Alternate syntax"><text>STMDB{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="AL_option__4">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qn_option">&lt;q&gt;</a><text>}  SP!, </text><a hover="Is a list of one or more registers to be stored, separated by commas and surrounded by { and }.&#10;&#10;The registers in the list must be in the range R0-R7, encoded in the &quot;register_list&quot; field, and can optionally include the LR. If the LR is in the list, the &quot;M&quot; field is set to 1, otherwise this field defaults to 0." link="register_list__26">&lt;registers&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="T32.n.misc16.pushpop16.PUSH_T1" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">let registers : bits(16) = '0'::M::'000000'::register_list;
let UnalignedAllowed : boolean = FALSE;
if BitCount(registers) &lt; 1 then UnpredictableProcedure(); end;</pstext></ps>
      </ps_section>
      <constrained_unpredictables encoding="T1" ps_block="Decode">
        <cu_case>
          <cu_cause>
            <pstext mayhavelinks="1">BitCount(registers) &lt; 1</pstext></cu_cause>
          <cu_type constraint="Constraint_UNDEF"/>
          <cu_type constraint="Constraint_NOP"/>
          <cu_type>
            <cu_type_text>The instruction targets an unspecified set of registers. These registers might include R15. If the instruction specifies writeback, the modification to the base address on writeback might differ from the number of registers loaded.</cu_type_text>
          </cu_type>
        </cu_case>
      </constrained_unpredictables>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="PUSH_T1, T1B_PUSH_T1" symboldefcount="1">
      <symbol link="AL_option__4">&lt;c&gt;</symbol>
      <account encodedin="">
        <intro>
          <para>See <xref linkend="Babbefhf">Standard assembler syntax fields</xref>.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="PUSH_T1, T1B_PUSH_T1" symboldefcount="1">
      <symbol link="qn_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_T1, T1B_PUSH_T1" symboldefcount="1">
      <symbol link="register_list__26">&lt;registers&gt;</symbol>
      <account encodedin="">
        <intro>
          <para>Is a list of one or more registers to be stored, separated by commas and surrounded by { and }.</para>
          <para>The registers in the list must be in the range R0-R7, encoded in the "register_list" field, and can optionally include the LR. If the LR is in the list, the "M" field is set to 1, otherwise this field defaults to 0.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="T32.n.misc16.pushpop16.PUSH_T1" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">if ConditionPassed() then
    EncodingSpecificOperations();
    var address : bits(32) = R(13) - 4*BitCount(registers);
    for i = 0 to 14 do
        if registers[i] == '1' then
            if i == 13 &amp;&amp; i != LowestSetBit(registers) then  // Only possible for encoding A1
                MemA{32}(address) = ARBITRARY : bits(32);
            else
                if UnalignedAllowed then
                    MemU{32}(address) = R(i);
                else
                    MemA{32}(address) = R(i);
                end;
            end;
            address = address + 4;
        end;
    end;
    if registers[15] == '1' then  // Only possible for encoding A1 or A2
        if UnalignedAllowed then
            MemU{32}(address) = PCStoreValue();
        else
            MemA{32}(address) = PCStoreValue();
        end;
    end;
    R(13) = R(13) - 4*BitCount(registers);
end;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
