From c1e188df22e446805cf143cc27a99b72a65e4f9e Mon Sep 17 00:00:00 2001 From: AmauryBrodu <60550980+AmauryBrodu@users.noreply.github.com> Date: Thu, 10 Nov 2022 00:08:06 +0100 Subject: [PATCH] ajout de l'instruction andi --- src/print.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/print.rs b/src/print.rs index aac1952..750dc9b 100644 --- a/src/print.rs +++ b/src/print.rs @@ -288,6 +288,8 @@ mod test { let sltiu = decode::decode(0b0000000000_10001_011_11100_0010011); let xori = decode::decode(0b_0000000000010001_100_11100_0010011); let ori = decode::decode(0b00000000000_10001_110_11100_0010011); + let andi = decode::decode(0b000000000000_10001_111_11100_0010011); + assert_eq!("andi x28, x17, 0", print::print(andi, 0)); assert_eq!("addi x28, x17, 0", print::print(addi, 0)); assert_eq!("slli x28, x17, 0", print::print(slli, 0)); assert_eq!("slti x28, x17, 0", print::print(slti, 0)); @@ -324,4 +326,6 @@ mod test { assert_eq!("lwu x28, 1520(x17)", print::print(lwu, 0)); } + + } \ No newline at end of file