52 lines · plain
1// RUN: not llvm-mc -triple aarch64 -show-encoding -mattr=+ecv < %s 2> %t | FileCheck %s2// RUN: FileCheck --check-prefix=ERROR %s < %t3// RUN: not llvm-mc -triple aarch64 -show-encoding -mattr=+v8.6a < %s 2> %t | FileCheck %s4// RUN: FileCheck --check-prefix=ERROR %s < %t5// RUN: not llvm-mc -triple aarch64 -show-encoding < %s 2> %t | FileCheck --check-prefix=NOECV-OUT %s6// RUN: FileCheck --check-prefix=NOECV %s < %t7 8// Expect no successful code generation at all with ECV disabled9// NOECV-OUT-NOT: {{msr|mrs}}10 11// Writable system registers12msr CNTSCALE_EL2, x113msr CNTISCALE_EL2, x1114msr CNTPOFF_EL2, x2215msr CNTVFRQ_EL2, x316// CHECK: msr CNTSCALE_EL2, x1 // encoding: [0x81,0xe0,0x1c,0xd5]17// CHECK: msr CNTISCALE_EL2, x11 // encoding: [0xab,0xe0,0x1c,0xd5]18// CHECK: msr CNTPOFF_EL2, x22 // encoding: [0xd6,0xe0,0x1c,0xd5]19// CHECK: msr CNTVFRQ_EL2, x3 // encoding: [0xe3,0xe0,0x1c,0xd5]20// NOECV: :[[@LINE-8]]:5: error: expected writable system register or pstate21// NOECV: :[[@LINE-8]]:5: error: expected writable system register or pstate22// NOECV: :[[@LINE-8]]:5: error: expected writable system register or pstate23// NOECV: :[[@LINE-8]]:5: error: expected writable system register or pstate24 25// Readonly system registers: writing them gives an error even with26// ECV enabled27msr CNTPCTSS_EL0, x1328msr CNTVCTSS_EL0, x2329// ERROR: :[[@LINE-2]]:5: error: expected writable system register or pstate30// ERROR: :[[@LINE-2]]:5: error: expected writable system register or pstate31// NOECV: :[[@LINE-4]]:5: error: expected writable system register or pstate32// NOECV: :[[@LINE-4]]:5: error: expected writable system register or pstate33 34mrs x0, CNTSCALE_EL235mrs x5, CNTISCALE_EL236mrs x10, CNTPOFF_EL237mrs x15, CNTVFRQ_EL238mrs x20, CNTPCTSS_EL039mrs x30, CNTVCTSS_EL040// CHECK: mrs x0, CNTSCALE_EL2 // encoding: [0x80,0xe0,0x3c,0xd5]41// CHECK: mrs x5, CNTISCALE_EL2 // encoding: [0xa5,0xe0,0x3c,0xd5]42// CHECK: mrs x10, CNTPOFF_EL2 // encoding: [0xca,0xe0,0x3c,0xd5]43// CHECK: mrs x15, CNTVFRQ_EL2 // encoding: [0xef,0xe0,0x3c,0xd5]44// CHECK: mrs x20, CNTPCTSS_EL0 // encoding: [0xb4,0xe0,0x3b,0xd5]45// CHECK: mrs x30, CNTVCTSS_EL0 // encoding: [0xde,0xe0,0x3b,0xd5]46// NOECV: :[[@LINE-12]]:9: error: expected readable system register47// NOECV: :[[@LINE-12]]:9: error: expected readable system register48// NOECV: :[[@LINE-12]]:10: error: expected readable system register49// NOECV: :[[@LINE-12]]:10: error: expected readable system register50// NOECV: :[[@LINE-12]]:10: error: expected readable system register51// NOECV: :[[@LINE-12]]:10: error: expected readable system register52