arm instruction query

Apr 30, 2013 2 Replies

Hi All, Could any one of tell me what does the plus sign in the undermentioned denote.



LDR r3, [r0,+r1,LSL #1]



Without the plus sign its just a simple load instruction.



regards ashu


AFAICT, this plus sign is just the unary positive operator, and it is used to stress the "offset" nature of r1.

formatting link

A5.2 Addressing Mode 2 - Load and Store Word or Unsigned Byte

  1. [, +/-, #] See Load and Store Word or Unsigned Byte - Scaled register offset on page A5-22.

Syntax One of: [, +/-, LSL #] [, +/-, LSR #] [, +/-, ASR #] [, +/-, ROR #] [, +/-, RRX] where: Specifies the register containing the base address. Specifies the register containing the offset to add to or subtract from Rn.

So your instruction would compute addr = r0 + (r1

denote.

A5-22.

Rn.

thanks so much Noob. The explanation really helped.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required