[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AArch64 / SVE / system-regs-diagnostics.s
blob4fd83f78071f7a8ac72b3ea9bd083c92dc2d4df9
1 // RUN: not llvm-mc -triple aarch64 -mattr=+sve -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-SVE
2 // RUN: not llvm-mc -triple aarch64 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOSVE
5 // --------------------------------------------------------------------------//
6 // ID_AA64ZFR0_EL1 is read-only
8 msr ID_AA64ZFR0_EL1, x3
9 // CHECK-SVE: error: expected writable system register or pstate
10 // CHECK-SVE-NEXT: msr ID_AA64ZFR0_EL1, x3
13 // --------------------------------------------------------------------------//
14 // Check that the other SVE registers are only readable/writable when
15 // the +sve attribute is set.
17 mrs x3, ID_AA64ZFR0_EL1
18 // CHECK-NOSVE: error: expected readable system register
19 // CHECK-NOSVE: mrs x3, ID_AA64ZFR0_EL1
21 mrs x3, ZCR_EL1
22 // CHECK-NOSVE: error: expected readable system register
23 // CHECK-NOSVE-NEXT: mrs x3, ZCR_EL1
25 mrs x3, ZCR_EL2
26 // CHECK-NOSVE: error: expected readable system register
27 // CHECK-NOSVE-NEXT: mrs x3, ZCR_EL2
29 mrs x3, ZCR_EL3
30 // CHECK-NOSVE: error: expected readable system register
31 // CHECK-NOSVE-NEXT: mrs x3, ZCR_EL3
33 mrs x3, ZCR_EL12
34 // CHECK-NOSVE: error: expected readable system register
35 // CHECK-NOSVE-NEXT: mrs x3, ZCR_EL12
37 msr ZCR_EL1, x3
38 // CHECK-NOSVE: error: expected writable system register or pstate
39 // CHECK-NOSVE-NEXT: msr ZCR_EL1, x3
41 msr ZCR_EL2, x3
42 // CHECK-NOSVE: error: expected writable system register or pstate
43 // CHECK-NOSVE-NEXT: msr ZCR_EL2, x3
45 msr ZCR_EL3, x3
46 // CHECK-NOSVE: error: expected writable system register or pstate
47 // CHECK-NOSVE-NEXT: msr ZCR_EL3, x3
49 msr ZCR_EL12, x3
50 // CHECK-NOSVE: error: expected writable system register or pstate
51 // CHECK-NOSVE-NEXT: msr ZCR_EL12, x3