bne
Branch if not equal
This instruction is defined by:
Synopsis
Branch to PC + imm if the value in register rs1 is not equal to the value in register rs2.
Raise a MisalignedAddress
exception if PC + imm is misaligned.
Decode Variables
Bits<13> imm = {$encoding[31], $encoding[7], $encoding[30:25], $encoding[11:8], 1'd0};
Bits<5> rs2 = $encoding[24:20];
Bits<5> rs1 = $encoding[19:15];
Execution
-
Pruned, XLEN == 64
-
Original
XReg lhs = X[rs1];
XReg rhs = X[rs2];
if (lhs != rhs) {
jump_halfword($pc + imm);
}
XReg lhs = X[rs1];
XReg rhs = X[rs2];
if (lhs != rhs) {
jump_halfword($pc + imm);
}