From 1fa6db6f4a17a518ae7fa18e54b07b6eeb71bb41 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 30 Apr 2024 12:41:44 -0300 Subject: [PATCH 1/2] Exercise be and le instructions --- tests/exercise_instructions.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/exercise_instructions.rs b/tests/exercise_instructions.rs index 78532f48..e3ace281 100644 --- a/tests/exercise_instructions.rs +++ b/tests/exercise_instructions.rs @@ -348,6 +348,13 @@ fn fuzz_alu() { test_ins(true, format!("neg64 r{src}"), &mut prng, 21); test_ins(true, format!("neg32 r{src}"), &mut prng, 21); + test_ins(true, format!("le16 r{src}"), &mut prng, 21); + test_ins(true, format!("le32 r{src}"), &mut prng, 21); + test_ins(true, format!("le64 r{src}"), &mut prng, 21); + test_ins(true, format!("be16 r{src}"), &mut prng, 21); + test_ins(true, format!("be32 r{src}"), &mut prng, 21); + test_ins(true, format!("be64 r{src}"), &mut prng, 21); + test_ins(true, format!("mul64 r{src}, {imm}"), &mut prng, 21); test_ins(true, format!("mod64 r{src}, {imm}"), &mut prng, 21); test_ins(true, format!("div64 r{src}, {imm}"), &mut prng, 21); From 5358965eabcaddbc8f5d5bcab5db9753c15f3e89 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 30 Apr 2024 13:44:21 -0300 Subject: [PATCH 2/2] Remove repeated be instructions --- tests/exercise_instructions.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/exercise_instructions.rs b/tests/exercise_instructions.rs index e3ace281..b590802c 100644 --- a/tests/exercise_instructions.rs +++ b/tests/exercise_instructions.rs @@ -348,13 +348,6 @@ fn fuzz_alu() { test_ins(true, format!("neg64 r{src}"), &mut prng, 21); test_ins(true, format!("neg32 r{src}"), &mut prng, 21); - test_ins(true, format!("le16 r{src}"), &mut prng, 21); - test_ins(true, format!("le32 r{src}"), &mut prng, 21); - test_ins(true, format!("le64 r{src}"), &mut prng, 21); - test_ins(true, format!("be16 r{src}"), &mut prng, 21); - test_ins(true, format!("be32 r{src}"), &mut prng, 21); - test_ins(true, format!("be64 r{src}"), &mut prng, 21); - test_ins(true, format!("mul64 r{src}, {imm}"), &mut prng, 21); test_ins(true, format!("mod64 r{src}, {imm}"), &mut prng, 21); test_ins(true, format!("div64 r{src}, {imm}"), &mut prng, 21); @@ -507,6 +500,10 @@ fn fuzz_alu() { test_ins(false, format!("be64 r{src}"), &mut prng, 21); test_ins(false, format!("be32 r{src}"), &mut prng, 21); test_ins(false, format!("be16 r{src}"), &mut prng, 21); + + test_ins(true, format!("le64 r{src}"), &mut prng, 21); + test_ins(true, format!("le32 r{src}"), &mut prng, 21); + test_ins(true, format!("le16 r{src}"), &mut prng, 21); } } }