Decrement Before (AM 4)

Syntax

DB

Description

The addressing mode "decrement before" performs the following operation (pseudo-code description):

start_addr = basereg - (Bit_Number_Of(reglist) * 4)
end_addr = basereg - 4
if ConditionPassed (condition) and W == 1 then
basereg = basereg - (Bit_Number_Of(reglist) * 4)

"Decrement before" forms a range of addresses for load and store multiple instructions. The first address start_addr is the value of basereg minus four times the number of registers contained in reglist . Subsequent addresses are derived by increments of four. One address is required for each register in reglist . The last address end_addr is the value of basereg minus four. Provided condition has a valid value and the W bit is set, basereg is decremented by four for each register specified in reglist.

Encoding

31

 

28

27

26

25

24

23

22

21

20

19

 

16

15

 

0

 condition

 

 

 1

 0

 0

 1

 0

 S

 W

 L

 basereg

 

 

 reglist

 

 

Example

STMDB    R0, {R1 - R3, R7, R13}

Further Information

See Addressing Mode 4: Load and Store Multiple
See Alternative Names

See Assembler Instructions