summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/from_brain.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/from_brain.rs b/tests/from_brain.rs
index 8c1f44d..b26f6a9 100644
--- a/tests/from_brain.rs
+++ b/tests/from_brain.rs
@@ -446,6 +446,38 @@ fn inst_1000() {
test_display(&0b1000_0000111_00100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 = convert_df2d(R5:4):chop }");
test_display(&0b1000_0000111_00100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = convert_df2ud(R5:4):chop }");
+ test_display(&0b1000_0010000_00100_11_000110_000_10110u32.to_le_bytes(), "{ R23:22 -= asr(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 -= lsr(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 -= asl(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_011_10110u32.to_le_bytes(), "{ R23:22 -= rol(R5:4, #0x6) }");
+
+ test_display(&0b1000_0010000_00100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 += asr(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += lsr(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += asl(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += rol(R5:4, #0x6) }");
+
+ test_display(&0b1000_0010010_00100_11_000110_000_10110u32.to_le_bytes(), "{ R23:22 &= asr(R5:4, #0x6) }");
+ test_display(&0b1000_0010010_00100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 &= lsr(R5:4, #0x6) }");
+ test_display(&0b1000_0010010_00100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 &= asl(R5:4, #0x6) }");
+ test_display(&0b1000_0010010_00100_11_000110_011_10110u32.to_le_bytes(), "{ R23:22 &= rol(R5:4, #0x6) }");
+
+ test_display(&0b1000_0010010_00100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 |= asr(R5:4, #0x6) }");
+ test_display(&0b1000_0010010_00100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 |= lsr(R5:4, #0x6) }");
+ test_display(&0b1000_0010010_00100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 |= asl(R5:4, #0x6) }");
+ test_display(&0b1000_0010010_00100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 |= rol(R5:4, #0x6) }");
+
+ test_display(&0b1000_0010100_00100_11_000110_000_10110u32.to_le_bytes(), "{ R23:22 ^= asr(R5:4, #0x6) }");
+ test_display(&0b1000_0010100_00100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 ^= lsr(R5:4, #0x6) }");
+ test_display(&0b1000_0010100_00100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 ^= asl(R5:4, #0x6) }");
+ test_display(&0b1000_0010100_00100_11_000110_011_10110u32.to_le_bytes(), "{ R23:22 ^= rol(R5:4, #0x6) }");
+
+ test_display(&0b1000_0010000_00100_11_000110_000_10110u32.to_le_bytes(), "{ R23:22 -= asr(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 -= lsr(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 -= asl(R5:4, #0x6) }");
+ test_display(&0b1000_0010000_00100_11_000110_011_10110u32.to_le_bytes(), "{ R23:22 -= rol(R5:4, #0x6) }");
+
+ test_display(&0b1000_0011101_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = insert(R21:20, #0x6, #0x2f) }");
+
test_display(&0b1000_0001101_00100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = extractu(R5:4, #0x6, #0x2f) }");
test_display(&0b1000_1111011_00100_11_000110_111_10110u32.to_le_bytes(), "{ R22 = insert(R4, #0x6, #0x1f) }");
}
@@ -872,6 +904,10 @@ fn inst_1100() {
test_display(&0b1100_0001_000_00100_11_0_1_0000_010_10110u32.to_le_bytes(), "{ R23:22 = shuffeb(R5:4, R17:16) }");
test_display(&0b1100_0001_000_00100_11_0_1_0000_100_10110u32.to_le_bytes(), "{ R23:22 = shuffob(R17:16, R5:4) }");
test_display(&0b1100_0001_000_00100_11_0_1_0000_110_10110u32.to_le_bytes(), "{ R23:22 = shuffeh(R17:16, R5:4) }");
+
+ test_display(&0b1100_0011110_10100_11_000110_011_10110u32.to_le_bytes(), "{ R23:22 = vcnegh(R21:20, R6) }");
+
+ test_display(&0b1100_1011001_10100_11_100110_111_10110u32.to_le_bytes(), "{ R23:22 += vrcnegh(R21:20, R6) }");
}
#[test]