0

I'm currently creating an application that would take in the user's input and return to them the hex of the branch instruction they wanted.

The input includes:

  • Branch Type (Conditional/Non-Conditional)
  • If conditional, the condition
  • Address to branch to
  • Address branching from

I can currently fill in most bits of the 32 bits but I am unable to fill in three certain bits which bother me. These are the S bit, the J1 bit, and the J2 bit as shown in the references below:

Conditional Reference

Non-Conditional Reference

Do these bits have default values? Otherwise, how do I know the value I need to use for them? Thanks for your time.

4

1 回答 1

0

我进一步搜索互联网,直到找到答案:

实验表明不使用J1和J2位,定义为:imm32 = SignExtend(S:imm6:imm11:'0', 32);

所以基本上不使用 J1 和 J2,只使用 S 位。这是有道理的,因为它也适用于我的实验。而S位好像是符号位,地址为负时等于1,地址为正时等于0。

于 2014-08-13T01:33:44.313 回答