• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a < %s  | FileCheck %s --check-prefix=CHECK
2// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=-v8.4a < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
3
4//------------------------------------------------------------------------------
5// ARMV8.4-A Debug, Trace and PMU Extensions
6//------------------------------------------------------------------------------
7
8msr TRFCR_EL1, x0
9msr TRFCR_EL2, x0
10msr TRFCR_EL12, x0
11
12mrs x0, TRFCR_EL1
13mrs x0, TRFCR_EL2
14mrs x0, TRFCR_EL12
15
16tsb csync
17
18//CHECK:  msr TRFCR_EL1, x0           // encoding: [0x20,0x12,0x18,0xd5]
19//CHECK:  msr TRFCR_EL2, x0           // encoding: [0x20,0x12,0x1c,0xd5]
20//CHECK:  msr TRFCR_EL12, x0          // encoding: [0x20,0x12,0x1d,0xd5]
21
22//CHECK:  mrs x0, TRFCR_EL1           // encoding: [0x20,0x12,0x38,0xd5]
23//CHECK:  mrs x0, TRFCR_EL2           // encoding: [0x20,0x12,0x3c,0xd5]
24//CHECK:  mrs x0, TRFCR_EL12          // encoding: [0x20,0x12,0x3d,0xd5]
25
26//CHECK:  tsb csync                   // encoding: [0x5f,0x22,0x03,0xd5]
27
28//CHECK-ERROR: error: expected writable system register or pstate
29//CHECK-ERROR: msr TRFCR_EL1, x0
30//CHECK-ERROR:     ^
31//CHECK-ERROR: error: expected writable system register or pstate
32//CHECK-ERROR: msr TRFCR_EL2, x0
33//CHECK-ERROR:     ^
34//CHECK-ERROR: error: expected writable system register or pstate
35//CHECK-ERROR: msr TRFCR_EL12, x0
36//CHECK-ERROR:     ^
37
38//CHECK-ERROR: error: expected readable system register
39//CHECK-ERROR: mrs x0, TRFCR_EL1
40//CHECK-ERROR:         ^
41//CHECK-ERROR: error: expected readable system register
42//CHECK-ERROR: mrs x0, TRFCR_EL2
43//CHECK-ERROR:         ^
44//CHECK-ERROR: error: expected readable system register
45//CHECK-ERROR: mrs x0, TRFCR_EL12
46//CHECK-ERROR:         ^
47
48//CHECK-ERROR: error: instruction requires: armv8.4a
49