xref: /llvm-project/llvm/test/MC/AArch64/SVE2/sqrdmlsh.s (revision ae16b2ed9871b5624fdcb4286fbd0d6ddfd88961)
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
4// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
8// RUN:        | llvm-objdump -d --mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
10// RUN:   | llvm-objdump -d --mattr=-sve2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11
12sqrdmlsh z0.b, z1.b, z31.b
13// CHECK-INST: sqrdmlsh z0.b, z1.b, z31.b
14// CHECK-ENCODING: [0x20,0x74,0x1f,0x44]
15// CHECK-ERROR: instruction requires: sve2 or sme
16// CHECK-UNKNOWN: 441f7420 <unknown>
17
18sqrdmlsh z0.h, z1.h, z31.h
19// CHECK-INST: sqrdmlsh z0.h, z1.h, z31.h
20// CHECK-ENCODING: [0x20,0x74,0x5f,0x44]
21// CHECK-ERROR: instruction requires: sve2 or sme
22// CHECK-UNKNOWN: 445f7420 <unknown>
23
24sqrdmlsh z0.s, z1.s, z31.s
25// CHECK-INST: sqrdmlsh z0.s, z1.s, z31.s
26// CHECK-ENCODING: [0x20,0x74,0x9f,0x44]
27// CHECK-ERROR: instruction requires: sve2 or sme
28// CHECK-UNKNOWN: 449f7420 <unknown>
29
30sqrdmlsh z0.d, z1.d, z31.d
31// CHECK-INST: sqrdmlsh z0.d, z1.d, z31.d
32// CHECK-ENCODING: [0x20,0x74,0xdf,0x44]
33// CHECK-ERROR: instruction requires: sve2 or sme
34// CHECK-UNKNOWN: 44df7420 <unknown>
35
36sqrdmlsh z0.h, z1.h, z7.h[7]
37// CHECK-INST: sqrdmlsh	z0.h, z1.h, z7.h[7]
38// CHECK-ENCODING: [0x20,0x14,0x7f,0x44]
39// CHECK-ERROR: instruction requires: sve2 or sme
40// CHECK-UNKNOWN: 447f1420 <unknown>
41
42sqrdmlsh z0.s, z1.s, z7.s[3]
43// CHECK-INST: sqrdmlsh	z0.s, z1.s, z7.s[3]
44// CHECK-ENCODING: [0x20,0x14,0xbf,0x44]
45// CHECK-ERROR: instruction requires: sve2 or sme
46// CHECK-UNKNOWN: 44bf1420 <unknown>
47
48sqrdmlsh z0.d, z1.d, z15.d[1]
49// CHECK-INST: sqrdmlsh	z0.d, z1.d, z15.d[1]
50// CHECK-ENCODING: [0x20,0x14,0xff,0x44]
51// CHECK-ERROR: instruction requires: sve2 or sme
52// CHECK-UNKNOWN: 44ff1420 <unknown>
53
54
55// --------------------------------------------------------------------------//
56// Test compatibility with MOVPRFX instruction.
57
58movprfx z0, z7
59// CHECK-INST: movprfx	z0, z7
60// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
61// CHECK-ERROR: instruction requires: sve or sme
62// CHECK-UNKNOWN: 0420bce0 <unknown>
63
64sqrdmlsh z0.d, z1.d, z31.d
65// CHECK-INST: sqrdmlsh z0.d, z1.d, z31.d
66// CHECK-ENCODING: [0x20,0x74,0xdf,0x44]
67// CHECK-ERROR: instruction requires: sve2 or sme
68// CHECK-UNKNOWN: 44df7420 <unknown>
69
70movprfx z0, z7
71// CHECK-INST: movprfx	z0, z7
72// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
73// CHECK-ERROR: instruction requires: sve or sme
74// CHECK-UNKNOWN: 0420bce0 <unknown>
75
76sqrdmlsh z0.d, z1.d, z15.d[1]
77// CHECK-INST: sqrdmlsh	z0.d, z1.d, z15.d[1]
78// CHECK-ENCODING: [0x20,0x14,0xff,0x44]
79// CHECK-ERROR: instruction requires: sve2 or sme
80// CHECK-UNKNOWN: 44ff1420 <unknown>
81