arm instruction query

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

Reply to
ashu
Loading thread data ...

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

Reply to
Noob

denote.

A5-22.

Rn.

thanks so much Noob. The explanation really helped.

Reply to
ashu

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.