J-type
Last updated
Last updated
I'm sorry for putting JALR here. Actually JALR is I-type.
JALR rd, rs1, imm
Reg[rd] <- PC + 4; PC <- Reg[rs1] + imm;
Write PC + 4
to Reg[rd] (return address)
Sets PC = Reg[rs1] + offset
Don't need to multiply the immediate by 2.
JALR
to datapathJAL rd, imm
Reg[rd] <- PC + 4; PC <- PC + imm;
Write PC + 4
to Reg[rd] (return address)
Sets PC = PC + offset
JAL
to datapathWhat should be added to datapath?