• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3
4
5// --------------------------------------------------------------------------//
6// ID_AA64ZFR0_EL1 is read-only
7
8msr ID_AA64ZFR0_EL1, x3
9// CHECK-SVE: error: expected writable system register or pstate
10// CHECK-SVE-NEXT:         msr ID_AA64ZFR0_EL1, x3
11
12
13// --------------------------------------------------------------------------//
14// Check that the other SVE registers are only readable/writable when
15// the +sve attribute is set.
16
17mrs x3, ID_AA64ZFR0_EL1
18// CHECK-NOSVE: error: expected readable system register
19// CHECK-NOSVE: mrs x3, ID_AA64ZFR0_EL1
20
21mrs x3, ZCR_EL1
22// CHECK-NOSVE: error: expected readable system register
23// CHECK-NOSVE-NEXT: mrs x3, ZCR_EL1
24
25mrs x3, ZCR_EL2
26// CHECK-NOSVE: error: expected readable system register
27// CHECK-NOSVE-NEXT: mrs x3, ZCR_EL2
28
29mrs x3, ZCR_EL3
30// CHECK-NOSVE: error: expected readable system register
31// CHECK-NOSVE-NEXT: mrs x3, ZCR_EL3
32
33mrs x3, ZCR_EL12
34// CHECK-NOSVE: error: expected readable system register
35// CHECK-NOSVE-NEXT: mrs x3, ZCR_EL12
36
37msr ZCR_EL1, x3
38// CHECK-NOSVE: error: expected writable system register or pstate
39// CHECK-NOSVE-NEXT: msr ZCR_EL1, x3
40
41msr ZCR_EL2, x3
42// CHECK-NOSVE: error: expected writable system register or pstate
43// CHECK-NOSVE-NEXT: msr ZCR_EL2, x3
44
45msr ZCR_EL3, x3
46// CHECK-NOSVE: error: expected writable system register or pstate
47// CHECK-NOSVE-NEXT: msr ZCR_EL3, x3
48
49msr ZCR_EL12, x3
50// CHECK-NOSVE: error: expected writable system register or pstate
51// CHECK-NOSVE-NEXT: msr ZCR_EL12, x3
52