Alex Rivera | Logout

What is the difference between unconditional branch and unconditional jump (instructions in MIPS)?

Asked 2012-06-11T13:59:25.533
59

You may look into Wikipedia or short summary for students. Everybody says that there are two instructions for the same thing. But nobody tells why?

Edit
Report

1 Answer

42

Branches (b) use a PC-relative displacement while jumps (j) use absolute addresses. The distinction is important for position-independent code. Also, only jumps can be used for indirect control transfer (jr, using a register value).

answered 2012-06-11T14:18:22.247

Your Answer