From 125966cd2ae732c3e8faa9ce0b1423dee91fc026 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 29 Dec 2021 04:58:53 -0800 Subject: more missed tables and manual compat --- test/armv8/a64.rs | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) (limited to 'test') diff --git a/test/armv8/a64.rs b/test/armv8/a64.rs index 2523a92..9b65618 100644 --- a/test/armv8/a64.rs +++ b/test/armv8/a64.rs @@ -4430,3 +4430,117 @@ fn test_tbl() { assert!(errs.is_empty()); } + +#[test] +fn test_saddw() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x10, 0x20, 0x0e], "saddw v0.8h, v0.8h, v0.8b"), + ([0x00, 0x60, 0x20, 0x0e], "subhn v0.8b, v0.8h, v0.8h"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] +fn test_vector_cmge() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x98, 0x20, 0x0e], "cmeq v0.8b, v0.8b, #0"), + ([0x00, 0xc8, 0xa0, 0x0e], "fcmgt v0.2s, v0.2s, #0.0"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] +fn test_xtn() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x28, 0x21, 0x0e], "xtn v0.8b, v0.8h"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] +fn test_saddlv() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x38, 0x30, 0x0e], "saddlv h0, v0.8b"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] +fn test_simd_same_three_fp16() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x04, 0x40, 0x0e], "fmaxnm v0.4h, v0.4h, v0.4h"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] +fn test_simd_two_register_misc_fp16() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x88, 0x79, 0x0e], "frintn v0.4h, v0.4h"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] +fn test_simd_three_same_extra() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x94, 0x90, 0x0e], "sdot v0.2s, v0.8b, v0.8b"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] +fn test_rev64() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x08, 0xa0, 0x0e], "rev64 v0.2s, v0.2s"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} -- cgit v1.1