🚨 Removed more clippy warnings from decode.rs
This commit is contained in:
parent
b6d494781e
commit
c4aede5371
@ -41,7 +41,7 @@ pub fn decode(val : u64) -> Instruction {
|
||||
let rs3 = ((val >> 27) & 0x1f) as u8;
|
||||
let rd = ((val >> 7) & 0x1f) as u8;
|
||||
let funct7 = ((val >> 25) & 0x7f) as u8;
|
||||
let funct7_smaller = (funct7 & 0x3e) as u8;
|
||||
let funct7_smaller = funct7 & 0x3e;
|
||||
|
||||
let funct3 = ((val >> 12) & 0x7) as u8;
|
||||
let imm12_I = ((val >> 20) & 0xfff) as u16;
|
||||
@ -52,7 +52,7 @@ pub fn decode(val : u64) -> Instruction {
|
||||
|
||||
let imm13 = (((val >> 19) & 0x1000) + ((val >> 20) & 0x7e0) +
|
||||
((val >> 7) & 0x1e) + ((val << 4) & 0x800)) as i16;
|
||||
let imm13_signed = if imm13 >= 4096 { imm13 - 8192 } else { imm13 } as i16;
|
||||
let imm13_signed = if imm13 >= 4096 { imm13 - 8192 } else { imm13 };
|
||||
|
||||
let imm31_12 = (val & 0xfffff000) as u32;
|
||||
let imm31_12_signed = imm31_12 as i32;
|
||||
|
Loading…
Reference in New Issue
Block a user