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