forked from Rativel/BurritOS
Added OPIW OPs and made some fix (see description)
Fix some warning which appear on clippy Fix print with 2 OPIW operations Fix doc in mod.rs
This commit is contained in:
@@ -91,9 +91,9 @@ pub fn print(ins: Instruction, pc: i32) -> String { //TODO pc should be u64
|
||||
RISCV_OPIW => {
|
||||
if ins.funct3 == RISCV_OPIW_SRW {
|
||||
if ins.funct7 == RISCV_OPIW_SRW_SRLIW {
|
||||
format!("srlwi\t{}, {}, {}", REG_X[rd], REG_X[rs1], REG_X[rs2])
|
||||
format!("srliw\t{}, {}, {}", REG_X[rd], REG_X[rs1], REG_X[rs2])
|
||||
} else {
|
||||
format!("srawi\t{}, {}, {}", REG_X[rd], REG_X[rs1], REG_X[rs2])
|
||||
format!("sraiw\t{}, {}, {}", REG_X[rd], REG_X[rs1], REG_X[rs2])
|
||||
}
|
||||
} else if ins.funct3 == RISCV_OPIW_SLLIW {
|
||||
format!("{}\t{}, {}, {}", NAMES_OPI[ins.funct3 as usize], REG_X[rd], REG_X[rs1], REG_X[rs2])
|
||||
|
||||
Reference in New Issue
Block a user