Why Link register needed in ARM LPC210x

Hi all,

I am a novice to ARM. I started studying ARM7 from “The Insider’s Guide To The Philips ARM7-Based Micro” book.

I want to know why additional link register(R14- as LR) is needed in user mode, just to save return address.

Can’t the good old method of pushing PC onto stack be used for that? Or is it related to pipelining?

If somebody can throw moer light on it,I would be really thankful.

Thanks all,

myetrx

In ARM LR is often used to store address that caused exception e.g data abort, prefetch abort etc. You define handlers for those exceptions, and by looking at LR you can easily get address at which exception was generated.

Hey…thanks a lot for your response.

I was wondering, whether providing seperate register overweighs speed of stack access for push-pop operation

myetrx

myetrx:
I was wondering, whether providing seperate register overweighs speed of stack access for push-pop operation

The ARM architecture is an example of 'Reduced Instruction Set Computer' (RISC) processor design. You can learn more about these sorts of issues by researching the features of RISC. For recommended reading see the 'Notes and references' section of the Wikipedia article:

http://en.wikipedia.org/wiki/Reduced_in … t_computer

“Branch and Link” put PC into Rn and jump to somewhere. Let the code at the target address decide if the link register needs to be pushed.

An instruction in many computers going way back.

Pros and cons; it can be efficient. And a PITA.