summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/from_brain.rs79
1 files changed, 79 insertions, 0 deletions
diff --git a/tests/from_brain.rs b/tests/from_brain.rs
index 3f26ad6..047db47 100644
--- a/tests/from_brain.rs
+++ b/tests/from_brain.rs
@@ -1578,6 +1578,85 @@ fn inst_1110() {
test_display(&0b1110_1000_011_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 = vmpyweuh(R21:20, R7:6):rnd:sat }");
test_display(&0b1110_1000_011_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = vmpywouh(R21:20, R7:6):rnd:sat }");
+ test_display(&0b1110_1000_100_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 = vdmpy(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_100_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 = vmpyweh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_100_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 = vmpyeh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_100_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = vmpywoh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_101_10100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 = vrmpywoh(R21:20, R7:6):<<1 }");
+ test_display(&0b1110_1000_101_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 = vmpyweh(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1000_101_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 = vcmpyr(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_101_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = vmpywoh(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1000_110_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 = vrmpywoh(R21:20, R7:6):<<1 }");
+ test_display(&0b1110_1000_110_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 = vmpyweuh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_110_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 = vcmpyi(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_110_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = vmpywouh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1000_111_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 = vmpyweuh(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1000_111_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 = vmpywouh(R21:20, R7:6):<<1:rnd:sat }");
+
+ test_display(&0b1110_1001_000_10100_11_000110_001_10110u32.to_le_bytes(), "{ R22 = vradduh(R21:20, R7:6) }");
+ test_display(&0b1110_1001_001_10100_11_000110_111_10110u32.to_le_bytes(), "{ R22 = vraddh(R21:20, R7:6) }");
+ test_display(&0b1110_1001_000_10100_11_000110_100_10110u32.to_le_bytes(), "{ R22 = cmpyiw(R21:20, R7:6*):<<1:sat }");
+ test_display(&0b1110_1001_001_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = cmpyiw(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1001_010_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = cmpyrw(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1001_011_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = cmpyrw(R21:20, R7:6*):<<1:sat }");
+ test_display(&0b1110_1001_101_10100_11_000110_110_10110u32.to_le_bytes(), "{ R22 = vrcmpys(R21:20, R7:6):<<1:rnd:sat:raw:hi }");
+ test_display(&0b1110_1001_101_10100_11_000110_111_10110u32.to_le_bytes(), "{ R22 = vrcmpys(R21:20, R7:6):<<1:rnd:sat:raw:lo }");
+ test_display(&0b1110_1001_100_10100_11_000110_100_10110u32.to_le_bytes(), "{ R22 = cmpyiw(R21:20, R7:6*):<<1:rnd:sat }");
+ test_display(&0b1110_1001_101_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = cmpyiw(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1001_110_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = cmpyrw(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1001_111_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = cmpyrw(R21:20, R7:6*):<<1:rnd:sat }");
+
+ test_display(&0b1110_1001_000_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = vdmpy(R21:20, R7:6):rnd:sat }");
+ test_display(&0b1110_1001_100_10100_11_000110_000_10110u32.to_le_bytes(), "{ R22 = vdmpy(R21:20, R7:6):<<1:rnd:sat }");
+
+ test_display(&0b1110_1010_000_10100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 += vrmpyh(R21:20, R7:6) }");
+ test_display(&0b1110_1010_000_10100_11_000110_011_10110u32.to_le_bytes(), "{ R23:22 += dfmpylh(R21:20, R7:6) }");
+ test_display(&0b1110_1010_001_10100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 += vdmpybsu(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_001_10100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 += vmpyeh(R21:20, R7:6) }");
+ test_display(&0b1110_1010_001_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 += vcmpyr(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_010_10100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 += vraddub(R21:20, R7:6) }");
+ test_display(&0b1110_1010_010_10100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 += vrsadub(R21:20, R7:6) }");
+ test_display(&0b1110_1010_010_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 += vcmpyi(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_010_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += cmpyiw(R21:20, R7:6*) }");
+ test_display(&0b1110_1010_011_10100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 += cmpyiw(R21:20, R7:6) }");
+
+ test_display(&0b1110_1010_100_10100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 += vrmpybu(R21:20, R7:6) }");
+ test_display(&0b1110_1010_100_10100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 += cmpyrw(R21:20, R7:6) }");
+ test_display(&0b1110_1010_100_10100_11_000110_011_10110u32.to_le_bytes(), "{ R23:22 += dfmpyhh(R21:20, R7:6) }");
+ test_display(&0b1110_1010_101_10100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22, P1 = vacsh(R21:20, R7:6) }");
+ test_display(&0b1110_1010_101_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 += vrcmpys(R21:20, R7:6):<<1:sat:raw:hi }");
+
+ test_display(&0b1110_1010_110_10100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22 += vrmpybsu(R21:20, R7:6) }");
+ test_display(&0b1110_1010_110_10100_11_000110_010_10110u32.to_le_bytes(), "{ R23:22 += cmpyrw(R21:20, R7:6*) }");
+ test_display(&0b1110_1010_111_10100_11_000110_001_10110u32.to_le_bytes(), "{ R23:22, P1 = vminub(R21:20, R7:6) }");
+ test_display(&0b1110_1010_111_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 += vrcmpys(R21:20, R7:6):<<1:sat:raw:lo }");
+
+ test_display(&0b1110_1010_000_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 += vdmpy(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_000_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweh(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_000_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += vmpyeh(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_000_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywoh(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_001_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweh(R21:20, R7:6):rnd:sat }");
+ test_display(&0b1110_1010_001_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += vrmpyweh(R21:20, R7:6) }");
+ test_display(&0b1110_1010_001_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywoh(R21:20, R7:6):rnd:sat }");
+ test_display(&0b1110_1010_010_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweuh(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_010_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywouh(R21:20, R7:6):sat }");
+ test_display(&0b1110_1010_011_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweuh(R21:20, R7:6):rnd:sat }");
+ test_display(&0b1110_1010_011_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += vrmpywoh(R21:20, R7:6) }");
+ test_display(&0b1110_1010_011_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywouh(R21:20, R7:6):rnd:sat }");
+
+ test_display(&0b1110_1010_100_10100_11_000110_100_10110u32.to_le_bytes(), "{ R23:22 += vdmpy(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1010_100_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1010_100_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += vmpyeh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1010_100_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywoh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1010_101_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweh(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1010_101_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += vrmpyweh(R21:20, R7:6):<<1 }");
+ test_display(&0b1110_1010_101_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywoh(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1010_110_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweuh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1010_110_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywouh(R21:20, R7:6):<<1:sat }");
+ test_display(&0b1110_1010_111_10100_11_000110_101_10110u32.to_le_bytes(), "{ R23:22 += vmpyweuh(R21:20, R7:6):<<1:rnd:sat }");
+ test_display(&0b1110_1010_111_10100_11_000110_110_10110u32.to_le_bytes(), "{ R23:22 += vrmpywoh(R21:20, R7:6):<<1 }");
+ test_display(&0b1110_1010_111_10100_11_000110_111_10110u32.to_le_bytes(), "{ R23:22 += vmpywouh(R21:20, R7:6):<<1:rnd:sat }");
+
test_invalid(&0b1110_1011_000_10100_11_000110_000_10110u32.to_le_bytes(), DecodeError::InvalidOpcode);
test_display(&0b1110_1011_000_10100_11_000110_001_10110u32.to_le_bytes(), "{ R22 = sfsub(R20, R6) }");
test_display(&0b1110_1011_000_10100_11_000110_011_10110u32.to_le_bytes(), "{ R22 = sfadd(R20, R6) }");