diff options
author | iximeow <me@iximeow.net> | 2021-12-31 22:08:11 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-12-31 22:08:11 -0800 |
commit | b460185cca5ad4111cc7907182c307b99c4c21dd (patch) | |
tree | e3b075e9bcc9cc8040eb50384357f52d2056099e /test | |
parent | 7c2f7552f78eba6229a3fea352b68a7e0a6dad6c (diff) |
fix more invalid rejects, misdecodes, test cases
Diffstat (limited to 'test')
-rw-r--r-- | test/armv8/a64.rs | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/test/armv8/a64.rs b/test/armv8/a64.rs index b652ec3..45fa77f 100644 --- a/test/armv8/a64.rs +++ b/test/armv8/a64.rs @@ -4752,6 +4752,26 @@ fn test_pac() { } #[test] +fn test_uq() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x38, 0xe0, 0x4e], "suqadd v0.2d, v0.2d"), + ([0x00, 0x88, 0xe0, 0x4e], "cmgt v0.2d, v0.2d, #0x0"), + ([0x00, 0xb8, 0xe0, 0x4e], "abs v0.2d, v0.2d"), + ([0x00, 0xfc, 0x20, 0x5e], "frecps s0, s0, s0"), + ([0x00, 0xc8, 0xb0, 0x5e], "fminnmp h0, v0.2h"), + ([0x00, 0x74, 0x08, 0x5f], "sqshl b0, b0, #0x0"), + ([0x00, 0x94, 0x08, 0x5f], "sqshrn b0, h0, #0x8"), + ]; + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} + +#[test] fn test_cfi() { const TESTS: &[([u8; 4], &'static str)] = &[ ([0x1f, 0x08, 0x1f, 0xd6], "braaz x0"), @@ -4809,12 +4829,11 @@ fn test_misc() { ([0x00, 0x94, 0x08, 0x4f], "sqshrn2 v0.16b, v0.8h, #0x8"), ([0x00, 0x28, 0x40, 0x4f], "smlal2 v0.4s, v0.8h, v0.h[4]"), ([0x00, 0xc0, 0x40, 0x4f], "sqdmulh v0.8h, v0.8h, v0.h[0]"), - ([0x00, 0xc0, 0x40, 0x4f], "sqrdmulh v0.8h, v0.8h, v0.h[0]"), ([0x00, 0xe0, 0x80, 0x4f], "sdot v0.4s, v0.16b, v0.4b[0]"), ([0x00, 0x24, 0x40, 0x5e], "fcmeq h0, h0, h0"), ([0x00, 0x88, 0xe0, 0x5e], "cmgt d0, d0, #0x0"), ([0x00, 0xa8, 0xf9, 0x5e], "fcvtps h0, h0"), - ([0x00, 0x10, 0x10, 0x5f], "fmla h0,h h0, v0.h[1]"), + ([0x00, 0x10, 0x10, 0x5f], "fmla h0, h0, v0.h[1]"), ([0x00, 0xd0, 0x40, 0x5f], "sqrdmulh h0, h0, v0.h[0]"), ([0x00, 0x10, 0xd0, 0x5f], "fmla d0, d0, v16.d[0]"), ([0x1f, 0x00, 0x20, 0x6b], "cmp w0, w0, uxtb"), @@ -4823,8 +4842,6 @@ fn test_misc() { ([0x00, 0x28, 0x21, 0x6e], "sqxtun2 v0.16b, v0.8h"), ([0x1f, 0x00, 0x00, 0x72], "tst w0, #0x1"), ([0x00, 0x84, 0x40, 0x7e], "sqrdmlah h0, h0, h0"), - ([0x00, 0xd0, 0x40, 0x7f], "sqrdmlah h0, h0, v0.h[0]"), - ([0x00, 0xd0, 0x40, 0x7f], "sqrdmlsh h0, h0, v0.h[0]"), ([0x1f, 0x00, 0x20, 0x8b], "add sp, x0, w0, uxtb"), ([0x00, 0x00, 0x00, 0x00], "add x0, x0, #0x0"), ([0x1f, 0x00, 0x00, 0x91], "mov sp, x0"), @@ -4836,10 +4853,17 @@ fn test_misc() { ([0x00, 0x08, 0x00, 0xf8], "sttr x0, [x0]"), ([0x00, 0x14, 0x20, 0xf8], "ldraa x0, [x0, #0x8]"), ([0x00, 0x00, 0x80, 0xf8], "prfum pldl1keep, [x0]"), - ([0x06, 0x48, 0xa0, 0xf8], "prfm 0x6, [x0, w0, uxtw]"), + ([0x06, 0x48, 0xa0, 0xf8], "prfm 0x6, [x0, w0, uxtw]"), ([0xe0, 0x03, 0x00, 0x0b], "add w0, wzr, w0"), ([0x00, 0xc0, 0x40, 0x0f], "sqdmulh v0.4h, v0.4h, v0.h[0]"), ([0x00, 0xd0, 0x40, 0x0f], "sqrdmulh v0.4h, v0.4h, v0.h[0]"), + ([0x00, 0xc0, 0x40, 0x5f], "sqdmulh h0, h0, v0.h[0]"), + ([0x00, 0x10, 0x40, 0x6f], "fcmla v0.8h, v0.8h, v0.h[0]"), + ([0x00, 0x10, 0x80, 0x6f], "fcmla v0.4s, v0.4s, v0.s[0]"), + ([0x00, 0x14, 0xc0, 0x7e], "fabd h0, h0, h0"), + ([0x00, 0x24, 0xc0, 0x7e], "fcmgt h0, h0, h0"), + ([0x00, 0xd0, 0x40, 0x7f], "sqrdmlah h0, h0, v0.h[0]"), + ([0x00, 0x7c, 0xa0, 0x88], "cas w0, w0, [x0]"), ]; let errs = run_tests(TESTS); |