13.80 POP

Pop registers off a full descending stack.

Syntax

POP{cond} reglist

where:

cond

is an optional condition code.

reglist

is a non-empty list of registers, enclosed in braces. It can contain register ranges. It must be comma separated if it contains more than one register or register range.

Operation

POP is a synonym for LDMIA sp! reglist. POP is the preferred mnemonic.

Note:

LDM and LDMFD are synonyms of LDMIA.

Registers are stored on the stack in numerical order, with the lowest numbered register at the lowest address.

POP, with reglist including the PC

This instruction causes a branch to the address popped off the stack into the PC. This is usually a return from a subroutine, where the LR was pushed onto the stack at the start of the subroutine.

Also:

  • Bits[1:0] must not be 0b10.
  • If bit[0] is 1, execution continues in T32 state.
  • If bit[0] is 0, execution continues in A32 state.

T32 instructions

A subset of this instruction is available in the T32 instruction set.

The following restriction applies to the 16-bit POP instruction:

  • reglist can only include the Lo registers and the PC.

The following restrictions apply to the 32-bit POP instruction:

  • reglist must not include the SP.
  • reglist can include either the LR or the PC, but not both.

Restrictions on reglist in A32 instructions

The A32 POP instruction cannot have SP but can have PC in the reglist. The instruction that includes both PC and LR in the reglist is deprecated.

Example

        POP     {r0,r10,pc} ; no 16-bit version available
Non-ConfidentialPDF file icon PDF versionDUI0801J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.