1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
5// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
6// RUN:        | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9
10ext z31.b, z31.b, z0.b, #0
11// CHECK-INST: ext	z31.b, z31.b, z0.b, #0
12// CHECK-ENCODING: [0x1f,0x00,0x20,0x05]
13// CHECK-ERROR: instruction requires: sve
14// CHECK-UNKNOWN: 1f 00 20 05 <unknown>
15
16ext z31.b, z31.b, z0.b, #255
17// CHECK-INST: ext	z31.b, z31.b, z0.b, #255
18// CHECK-ENCODING: [0x1f,0x1c,0x3f,0x05]
19// CHECK-ERROR: instruction requires: sve
20// CHECK-UNKNOWN: 1f 1c 3f 05 <unknown>
21
22
23// --------------------------------------------------------------------------//
24// Test compatibility with MOVPRFX instruction.
25
26movprfx z31, z6
27// CHECK-INST: movprfx	z31, z6
28// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
29// CHECK-ERROR: instruction requires: sve
30// CHECK-UNKNOWN: df bc 20 04 <unknown>
31
32ext z31.b, z31.b, z0.b, #255
33// CHECK-INST: ext	z31.b, z31.b, z0.b, #255
34// CHECK-ENCODING: [0x1f,0x1c,0x3f,0x05]
35// CHECK-ERROR: instruction requires: sve
36// CHECK-UNKNOWN: 1f 1c 3f 05 <unknown>
37