fn beq(cpu: &mut Cpu, addr: u64, word: u32) -> Result<(), Trap> {
    let o = parse_type_b(word);
    match cpu.x[o.rs1 as usize] == cpu.x[o.rs2 as usize] {
        true => cpu.pc = addr.wrapping_add(o.imm),
        _ => {}
    }
    Ok(())
}
/// [beq rs1,rs2,offset]
/// BEQ and BNE take the branch if registers rs1 and rs2 are equal or unequal respectively.
[beq rs1,rs2,offset]
BEQ and BNE take the branch if registers rs1 and rs2 are equal or unequal respectively.
[ beq rs1 rs2 offset ] BEQ and BNE take the branch if registers rs1 and rs2 are equal or unequal respectively .
fn beq(cpu: &mut Cpu, addr: u64, word: u32) -> Result<(), Trap> {
    let o = parse_type_b(word);
    match cpu.x[o.rs1 as usize] == cpu.x[o.rs2 as usize] {
        true => cpu.pc = addr.wrapping_add(o.imm),
        _ => {}
    }
    Ok(())
}
fn beq ( cpu : & mut Cpu , addr : u64 , word : u32 ) -> Result < ( ) , Trap > { let o = parse_type_b ( word ) ; match cpu . x [ o . rs1 as usize ] == cpu . x [ o . rs2 as usize ] { true => cpu . pc = addr . wrapping_add ( o . imm ) , _ => { } } Ok ( ( ) ) }
[beq rs1,rs2,offset]
BEQ and BNE take the branch if registers rs1 and rs2 are equal or unequal respectively.
[ beq rs1 rs2 offset ] BEQ and BNE take the branch if registers rs1 and rs2 are equal or unequal respectively .
cpu
&mut Cpu
addr
u64
word
u32