xref: /llvm-project/llvm/test/MC/AArch64/SVE2/mls.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
12mls z0.h, z1.h, z7.h[7]
13// CHECK-INST: mls	z0.h, z1.h, z7.h[7]
14// CHECK-ENCODING: [0x20,0x0c,0x7f,0x44]
15// CHECK-ERROR: instruction requires: sve2 or sme
16// CHECK-UNKNOWN: 447f0c20 <unknown>
17
18mls z0.s, z1.s, z7.s[3]
19// CHECK-INST: mls	z0.s, z1.s, z7.s[3]
20// CHECK-ENCODING: [0x20,0x0c,0xbf,0x44]
21// CHECK-ERROR: instruction requires: sve2 or sme
22// CHECK-UNKNOWN: 44bf0c20 <unknown>
23
24mls z0.d, z1.d, z7.d[1]
25// CHECK-INST: mls	z0.d, z1.d, z7.d[1]
26// CHECK-ENCODING: [0x20,0x0c,0xf7,0x44]
27// CHECK-ERROR: instruction requires: sve2 or sme
28// CHECK-UNKNOWN: 44f70c20 <unknown>
29
30
31// --------------------------------------------------------------------------//
32// Test compatibility with MOVPRFX instruction.
33
34movprfx z0, z7
35// CHECK-INST: movprfx	z0, z7
36// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
37// CHECK-ERROR: instruction requires: sve or sme
38// CHECK-UNKNOWN: 0420bce0 <unknown>
39
40mls z0.d, z1.d, z7.d[1]
41// CHECK-INST: mls	z0.d, z1.d, z7.d[1]
42// CHECK-ENCODING: [0x20,0x0c,0xf7,0x44]
43// CHECK-ERROR: instruction requires: sve2 or sme
44// CHECK-UNKNOWN: 44f70c20 <unknown>
45