|
Message
From: Matjaz Breskvar<phoenix@o...>
Date: Tue May 31 22:05:04 CEST 2005
Subject: [openrisc] Difference Between Jump(l.j) and Jump and Link (l.jal)
* Balaji V. Iyer (bviyer@n...) wrote: > Hi Everyone, > What exactly is the difference between Jump and link and the Jump > instruction? Don't they both do the same thing (according to the > OpenRISC architecture manual where it says "32 Bit Implementation"). > > For Example, let's say we have > > 100C: l.j 103233 > 1010: addi r3,r0,0x2 > 1014: ori r3,r11,0x0 > and > > 100C: l.jal 103233 > 1010: addi r3,r0,0x2 > 1014: ori r3,r11,0x0 > > > both of then should write 2 into R3 before jumping to 103233 and the R9 > for both the jumps will be set to 1014.. am I correct?
all true, but l.jal does an additionaly moves the address of next instruction after the delay slot into r9 (the link register). this way you simplify the function call/return (ie the return is just l.jr r9)
best regards, p.
|
 |