Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by Taniwha

2 years ago

Either: "jal lr, dest" or "jalr lr, offset(reg)"

Both save the address of the next instruction in lr, the first is a relative branch the second is to the address pointed by a register plus an offset

Use "jalr r0, 0(lr)" to return

Anything else is just syntactic sugar in the assembler to set up the reg for jalr

0 comments

Taniwha

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities