add of the test function for opwi instructions
This commit is contained in:
parent
5a5afda8be
commit
3b9a23948a
10
src/print.rs
10
src/print.rs
@ -339,5 +339,15 @@ mod test {
|
||||
assert_eq!("sraw x28, x17, x16", print::print(sraw, 0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_opwi() {
|
||||
let addwi: decode::Instruction =decode::decode(0b000000000000_10001_000_11100_0011011);
|
||||
let sllwi: decode::Instruction = decode::decode(0b0000000_10000_10001_001_11100_0011011);
|
||||
let srai: decode::Instruction = decode::decode(0b010000010001_10001_101_11100_0010011);
|
||||
assert_eq!("addwi x28, x17, x0", print::print(addwi, 0));
|
||||
assert_eq!("slli x28, x17, x16", print::print(sllwi, 0));
|
||||
assert_eq!("srai x28, x17, 17", print::print(srai, 0));
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user