最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

assembly - MIPS - How to find the immediate valuebranch offset from the bne instructions? - Stack Overflow

programmeradmin2浏览0评论
        slt $t2, $t5, $t0 <---- 0x04001248 (PC) [Memory Address]
        bne $t2, $s4, ELSE
        lw $s4, 120($s1)
        j DONE
  ELSE: addi $t2, $t2, -100
  DONE: nop

Assume this is the example. What are the steps I need to get the immediate/target address of bne ?

I have only got the opcode, rs and rt which is : op : 00 0101 (bne) rs : 0 1010 ($t2) rt : 0 1100 (t4)

I have tried following tutorial such as this one : ;t=410s&ab_channel=James

But, at the initial steps to get the byte address, I already got a minus hexadecimal value. I think this method is wrong, isn't it ?

发布评论

评论列表(0)

  1. 暂无评论