push.w

Push (Wide)

PUSH.W <registers>

Thumb-2 32-bit Push.

Details

Thumb-2 32-bit push instruction that stores multiple general-purpose registers to the stack. Decrements SP by 4×(number of registers) and stores each register in the list to memory in ascending order of register number. This is equivalent to STMDB SP!, <registers>.

Pseudocode Operation

SP ← SP - 4 * PopCount(registers)
for i = 0 to 15
  if registers[i] == 1 then
    memory[SP + 4*(count_of_set_bits_below_i)] ← Ri

Example

PUSH.W registers

Encoding

Binary Layout
1110100
10
0
1
0
1101
0
M
register_list
 
Format Thumb Store Multiple
Opcode 0xE92D0000
Extension T32 (Thumb2)

Operands

  • registers
    List

Reference (Arm AArch32 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0xB400 PUSH{<c>}{<q>} <registers> T32 1011 | 0 | 10 | M | register_list
0x092D0000 PUSH{<c>}{<q>} <registers> A32 cond | 100 | 1 | 0 | 0 | 1 | 0 | 1101 | register_list
0xE92D0000 PUSH{<c>}.W <registers> T32 1110100 | 10 | 0 | 1 | 0 | 1101 | 0 | M | register_list
0x052D0004 PUSH{<c>}{<q>} <single_register_list> A32 cond | 010 | 1 | 0 | 0 | 1 | 0 | 1101 | Rt | 000000000100
0xF84D0D04 PUSH{<c>}{<q>} <single_register_list> T32 111110000 | 10 | 0 | 1101 | Rt | 1 | 1 | 0 | 1 | 00000100

Description

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