Why are RISC-V S-B and U-J instruction types encoded in this way?
问题 I am reading a book "Computer Organization and Design RISC-V Edition" , and I came across the encoding for S-B and U-J instruction types. Those types I have mentioned above has strange encoded immediate field. S-B types separate the immediate field into 2 parts. This makes sense since all instructions encoding has to be similar. But I cannot understand why the immediate field is encoded in this way below. imm[12, 10:5], imm[4:1, 11] instead of imm[11:5], imm[4:0] U-J types also have this