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

前端 未结 4 1838
青春惊慌失措
青春惊慌失措 2020-12-13 04:01

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?

4条回答
  •  死守一世寂寞
    2020-12-13 04:21

    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).

提交回复
热议问题