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
10cntb  x0
11// CHECK-INST: cntb	x0
12// CHECK-ENCODING: [0xe0,0xe3,0x20,0x04]
13// CHECK-ERROR: instruction requires: sve
14// CHECK-UNKNOWN: e0 e3 20 04 <unknown>
15
16cntb  x0, all
17// CHECK-INST: cntb	x0
18// CHECK-ENCODING: [0xe0,0xe3,0x20,0x04]
19// CHECK-ERROR: instruction requires: sve
20// CHECK-UNKNOWN: e0 e3 20 04 <unknown>
21
22cntb  x0, all, mul #1
23// CHECK-INST: cntb	x0
24// CHECK-ENCODING: [0xe0,0xe3,0x20,0x04]
25// CHECK-ERROR: instruction requires: sve
26// CHECK-UNKNOWN: e0 e3 20 04 <unknown>
27
28cntb  x0, all, mul #16
29// CHECK-INST: cntb	x0, all, mul #16
30// CHECK-ENCODING: [0xe0,0xe3,0x2f,0x04]
31// CHECK-ERROR: instruction requires: sve
32// CHECK-UNKNOWN: e0 e3 2f 04 <unknown>
33
34cntb  x0, pow2
35// CHECK-INST: cntb	x0, pow2
36// CHECK-ENCODING: [0x00,0xe0,0x20,0x04]
37// CHECK-ERROR: instruction requires: sve
38// CHECK-UNKNOWN: 00 e0 20 04 <unknown>
39
40cntb  x0, #28
41// CHECK-INST: cntb	x0, #28
42// CHECK-ENCODING: [0x80,0xe3,0x20,0x04]
43// CHECK-ERROR: instruction requires: sve
44// CHECK-UNKNOWN: 80 e3 20 04 <unknown>
45