1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme,+mpam < %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: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s 2>&1 \
6// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
7// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+mpam < %s 2>&1 \
8// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme,+mpam < %s \
10// RUN:        | llvm-objdump -d --mattr=+sme,+mpam - | FileCheck %s --check-prefix=CHECK-INST
11// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme,+mpam < %s \
12// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
13// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme,+mpam < %s \
14// RUN:        | llvm-objdump -d --mattr=+sme - | FileCheck %s --check-prefix=CHECK-UNKNOWN
15// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme,+mpam < %s \
16// RUN:        | llvm-objdump -d --mattr=+mpam - | FileCheck %s --check-prefix=CHECK-UNKNOWN
17
18// --------------------------------------------------------------------------//
19// read
20
21mrs x3, MPAMSM_EL1
22// CHECK-INST: mrs x3, MPAMSM_EL1
23// CHECK-ENCODING: [0x63,0xa5,0x38,0xd5]
24// CHECK-ERROR: expected readable system register
25// CHECK-UNKNOWN: 63 a5 38 d5   mrs   x3, S3_0_C10_C5_3
26
27// --------------------------------------------------------------------------//
28// write
29
30msr MPAMSM_EL1, x3
31// CHECK-INST: msr MPAMSM_EL1, x3
32// CHECK-ENCODING: [0x63,0xa5,0x18,0xd5]
33// CHECK-ERROR: expected writable system register or pstate
34// CHECK-UNKNOWN: 63 a5 18 d5   msr   S3_0_C10_C5_3, x3
35