<s>
A	O
link	B-General_Concept
register	I-General_Concept
(	O
LR	O
for	O
short	O
)	O
is	O
a	O
register	B-General_Concept
which	O
holds	O
the	O
address	O
to	O
return	O
to	O
when	O
a	O
subroutine	O
call	O
completes	O
.	O
</s>
<s>
This	O
is	O
more	O
efficient	O
than	O
the	O
more	O
traditional	O
scheme	O
of	O
storing	O
return	O
addresses	O
on	O
a	O
call	B-General_Concept
stack	I-General_Concept
,	O
sometimes	O
called	O
a	O
machine	O
stack	O
.	O
</s>
<s>
The	O
link	B-General_Concept
register	I-General_Concept
does	O
not	O
require	O
the	O
writes	O
and	O
reads	O
of	O
the	O
memory	O
containing	O
the	O
stack	O
which	O
can	O
save	O
a	O
considerable	O
percentage	O
of	O
execution	O
time	O
with	O
repeated	O
calls	O
of	O
small	O
subroutines	O
.	O
</s>
<s>
The	O
IBM	B-Architecture
POWER	I-Architecture
architecture	I-Architecture
,	O
and	O
its	O
PowerPC	B-Architecture
and	O
Power	B-Architecture
ISA	I-Architecture
successors	O
,	O
have	O
a	O
special-purpose	O
link	B-General_Concept
register	I-General_Concept
,	O
into	O
which	O
subroutine	O
call	O
instructions	O
put	O
the	O
return	O
address	O
.	O
</s>
<s>
In	O
some	O
other	O
instruction	O
sets	O
,	O
such	O
as	O
the	O
ARM	B-Architecture
architectures	I-Architecture
,	O
SPARC	B-Architecture
,	O
and	O
OpenRISC	B-Device
,	O
subroutine	O
call	O
instructions	O
put	O
the	O
return	O
address	O
into	O
a	O
specific	O
general-purpose	O
register	B-General_Concept
,	O
so	O
that	O
register	B-General_Concept
is	O
designated	O
by	O
the	O
instruction	O
set	O
architecture	O
as	O
the	O
link	B-General_Concept
register	I-General_Concept
.	O
</s>
<s>
In	O
some	O
others	O
,	O
such	O
as	O
PA-RISC	B-Device
,	O
RISC-V	B-Device
,	O
and	O
the	O
IBM	B-Application
System/360	I-Application
and	O
its	O
successors	O
,	O
including	O
z/Architecture	B-Device
,	O
the	O
subroutine	O
call	O
instruction	O
can	O
store	O
the	O
return	O
address	O
in	O
any	O
general-purpose	O
register	B-General_Concept
;	O
a	O
particular	O
register	B-General_Concept
is	O
usually	O
chosen	O
,	O
by	O
convention	O
,	O
to	O
be	O
used	O
as	O
the	O
link	B-General_Concept
register	I-General_Concept
.	O
</s>
<s>
The	O
ARMv7	O
architecture	O
uses	O
general-purpose	O
register	B-General_Concept
R14	O
as	O
the	O
link	B-General_Concept
register	I-General_Concept
,	O
OpenRISC	B-Device
uses	O
register	B-General_Concept
r9	O
,	O
and	O
SPARC	B-Architecture
uses	O
"	O
output	O
register	B-General_Concept
7	O
"	O
or	O
o7	O
.	O
</s>
<s>
Some	O
architectures	O
have	O
two	O
link	B-General_Concept
registers	I-General_Concept
:	O
a	O
standard	O
"	O
branch	O
link	B-General_Concept
register	I-General_Concept
"	O
for	O
most	O
subroutine	O
calls	O
,	O
and	O
a	O
special	O
"	O
interrupt	O
link	B-General_Concept
register	I-General_Concept
"	O
for	O
interrupts	O
.	O
</s>
<s>
One	O
of	O
these	O
is	O
ARCv2	O
(	O
ARC	B-Application
processors	I-Application
using	O
version	O
2	O
of	O
the	O
ARCompact	B-Application
architecture	O
)	O
,	O
which	O
uses	O
general-purpose-registers	O
r29	O
for	O
the	O
interrupt	O
link	B-General_Concept
register	I-General_Concept
and	O
r31	O
for	O
the	O
branch	O
link	B-General_Concept
register	I-General_Concept
.	O
</s>
<s>
References	O
to	O
"	O
the	O
link	B-General_Concept
register	I-General_Concept
"	O
on	O
such	O
platforms	O
will	O
be	O
referring	O
to	O
the	O
branch	O
link	B-General_Concept
register	I-General_Concept
.	O
</s>
<s>
Earlier	O
ARC	B-Application
processors	I-Application
based	O
on	O
the	O
ARCompact	B-Application
and	O
ARCtangent	O
architectures	O
had	O
three	O
link	B-General_Concept
registers	I-General_Concept
:	O
two	O
interrupt	O
link	B-General_Concept
registers	I-General_Concept
(	O
ILINK	O
)	O
and	O
one	O
branch	O
link	B-General_Concept
register	I-General_Concept
(	O
BLINK	O
)	O
.	O
</s>
<s>
The	O
two	O
interrupt	O
link	B-General_Concept
registers	I-General_Concept
were	O
ILINK1	O
(	O
for	O
level	O
1	O
(	O
low	O
priority	O
)	O
maskable	O
interrupts	O
)	O
,	O
and	O
ILINK2	O
(	O
for	O
level	O
2	O
(	O
mid	O
priority	O
)	O
maskable	O
interrupts	O
)	O
.	O
</s>
<s>
In	O
these	O
architectures	O
,	O
r29	O
was	O
used	O
as	O
the	O
level	O
1	O
interrupt	O
link	B-General_Concept
register	I-General_Concept
,	O
r30	O
as	O
the	O
level	O
2	O
interrupt	O
link	B-General_Concept
register	I-General_Concept
,	O
and	O
r31	O
as	O
the	O
branch	O
link	B-General_Concept
register	I-General_Concept
.	O
</s>
<s>
ILINK1	O
and	O
ILINK2	O
were	O
not	O
accessible	O
in	O
user	O
mode	O
on	O
the	O
ARC	B-Application
700	O
processors	O
.	O
</s>
<s>
The	O
use	O
of	O
a	O
link	B-General_Concept
register	I-General_Concept
,	O
regardless	O
of	O
whether	O
it	O
is	O
a	O
dedicated	O
register	B-General_Concept
or	O
a	O
general-purpose	O
register	B-General_Concept
,	O
allows	O
for	O
faster	O
calls	O
to	O
leaf	B-General_Concept
subroutines	I-General_Concept
.	O
</s>
<s>
When	O
the	O
subroutine	O
is	O
non-leaf	O
,	O
passing	O
the	O
return	O
address	O
in	O
a	O
register	B-General_Concept
can	O
still	O
result	O
in	O
generation	O
of	O
more	O
efficient	O
code	O
for	O
thunks	B-Application
,	O
e.g.	O
</s>
<s>
Other	O
subroutines	O
can	O
benefit	O
from	O
the	O
use	O
of	O
the	O
link	B-General_Concept
register	I-General_Concept
because	O
it	O
can	O
be	O
saved	O
in	O
a	O
batch	O
with	O
other	O
callee-used	O
registers	O
—	O
e.g.	O
</s>
