Hi, deas anybody know what's diference between: SP + = 16; P0=[FP+4]; (R7:4)=[SP++]; UNLINK; JUMP (P0); and SP + = 16; (R7:4)=[SP++]; UNLINK; RTS; Thanks JkH
Blackfin function epilogue
Started by ●July 21, 2006
Reply by ●July 22, 20062006-07-22
jenikh <jenikh@centrum.cz> wrote: [ADI blackfin]> deas anybody know what's diference between: > SP + = 16; > P0=[FP+4]; > (R7:4)=[SP++]; > UNLINK; > JUMP (P0);> and> SP + = 16; > (R7:4)=[SP++]; > UNLINK; > RTS;your solution is one cycle faster. ;-) WD --
Reply by ●July 24, 20062006-07-24
> > your solution is one cycle faster. ;-) > >WD >--So why VisualDSP++ use longer solution? ;-) JkH
Reply by ●July 24, 20062006-07-24
jenikh wrote:> Hi, > deas anybody know what's diference between: > > SP + = 16; > P0=[FP+4]; > (R7:4)=[SP++]; > UNLINK; > JUMP (P0); > > and > > SP + = 16; > (R7:4)=[SP++]; > UNLINK; > RTS; > > Thanks > > JkHIt has been long time since I have programmed BF asm, but IIRC RTS returns to address pointed by register RETS, while the longer version fetches the return address from memory. Functionally they seem identical. All I can think of is that the the longer version migth not issue a pipeline stall as the memory fetch for the return address is done earlier and stored in P0. This is only a guess though.. perhaps you should benchmark the two version. -- ---- Jani Huhtanen Tampere University of Technology, Pori