1// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+spe < %s | FileCheck %s 2// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding < %s 2>&1 | FileCheck --check-prefix=NO_SPE %s 3 4 psb csync 5// CHECK: psb csync // encoding: [0x3f,0x22,0x03,0xd5] 6// NO_SPE: invalid operand for instruction 7 8 msr pmblimitr_el1, x0 9 msr pmbptr_el1, x0 10 msr pmbsr_el1, x0 11 msr pmbidr_el1, x0 12 msr pmscr_el2, x0 13 msr pmscr_el12, x0 14 msr pmscr_el1, x0 15 msr pmsicr_el1, x0 16 msr pmsirr_el1, x0 17 msr pmsfcr_el1, x0 18 msr pmsevfr_el1, x0 19 msr pmslatfr_el1, x0 20 msr pmsidr_el1, x0 21// CHECK: msr PMBLIMITR_EL1, x0 // encoding: [0x00,0x9a,0x18,0xd5] 22// CHECK: msr PMBPTR_EL1, x0 // encoding: [0x20,0x9a,0x18,0xd5] 23// CHECK: msr PMBSR_EL1, x0 // encoding: [0x60,0x9a,0x18,0xd5] 24// CHECK: msr PMBIDR_EL1, x0 // encoding: [0xe0,0x9a,0x18,0xd5] 25// CHECK: msr PMSCR_EL2, x0 // encoding: [0x00,0x99,0x1c,0xd5] 26// CHECK: msr PMSCR_EL12, x0 // encoding: [0x00,0x99,0x1d,0xd5] 27// CHECK: msr PMSCR_EL1, x0 // encoding: [0x00,0x99,0x18,0xd5] 28// CHECK: msr PMSICR_EL1, x0 // encoding: [0x40,0x99,0x18,0xd5] 29// CHECK: msr PMSIRR_EL1, x0 // encoding: [0x60,0x99,0x18,0xd5] 30// CHECK: msr PMSFCR_EL1, x0 // encoding: [0x80,0x99,0x18,0xd5] 31// CHECK: msr PMSEVFR_EL1, x0 // encoding: [0xa0,0x99,0x18,0xd5] 32// CHECK: msr PMSLATFR_EL1, x0 // encoding: [0xc0,0x99,0x18,0xd5] 33// CHECK: msr PMSIDR_EL1, x0 // encoding: [0xe0,0x99,0x18,0xd5] 34// NO_SPE: error: expected writable system register or pstate 35// NO_SPE: error: expected writable system register or pstate 36// NO_SPE: error: expected writable system register or pstate 37// NO_SPE: error: expected writable system register or pstate 38// NO_SPE: error: expected writable system register or pstate 39// NO_SPE: error: expected writable system register or pstate 40// NO_SPE: error: expected writable system register or pstate 41// NO_SPE: error: expected writable system register or pstate 42// NO_SPE: error: expected writable system register or pstate 43// NO_SPE: error: expected writable system register or pstate 44// NO_SPE: error: expected writable system register or pstate 45// NO_SPE: error: expected writable system register or pstate 46// NO_SPE: error: expected writable system register or pstate 47 48mrs x0, pmblimitr_el1 49 mrs x0, pmbptr_el1 50 mrs x0, pmbsr_el1 51 mrs x0, pmbidr_el1 52 mrs x0, pmscr_el2 53 mrs x0, pmscr_el12 54 mrs x0, pmscr_el1 55 mrs x0, pmsicr_el1 56 mrs x0, pmsirr_el1 57 mrs x0, pmsfcr_el1 58 mrs x0, pmsevfr_el1 59 mrs x0, pmslatfr_el1 60 mrs x0, pmsidr_el1 61 62// CHECK: mrs x0, PMBLIMITR_EL1 // encoding: [0x00,0x9a,0x38,0xd5] 63// CHECK: mrs x0, PMBPTR_EL1 // encoding: [0x20,0x9a,0x38,0xd5] 64// CHECK: mrs x0, PMBSR_EL1 // encoding: [0x60,0x9a,0x38,0xd5] 65// CHECK: mrs x0, PMBIDR_EL1 // encoding: [0xe0,0x9a,0x38,0xd5] 66// CHECK: mrs x0, PMSCR_EL2 // encoding: [0x00,0x99,0x3c,0xd5] 67// CHECK: mrs x0, PMSCR_EL12 // encoding: [0x00,0x99,0x3d,0xd5] 68// CHECK: mrs x0, PMSCR_EL1 // encoding: [0x00,0x99,0x38,0xd5] 69// CHECK: mrs x0, PMSICR_EL1 // encoding: [0x40,0x99,0x38,0xd5] 70// CHECK: mrs x0, PMSIRR_EL1 // encoding: [0x60,0x99,0x38,0xd5] 71// CHECK: mrs x0, PMSFCR_EL1 // encoding: [0x80,0x99,0x38,0xd5] 72// CHECK: mrs x0, PMSEVFR_EL1 // encoding: [0xa0,0x99,0x38,0xd5] 73// CHECK: mrs x0, PMSLATFR_EL1 // encoding: [0xc0,0x99,0x38,0xd5] 74// CHECK: mrs x0, PMSIDR_EL1 // encoding: [0xe0,0x99,0x38,0xd5] 75// NO_SPE: error: expected readable system register 76// NO_SPE: error: expected readable system register 77// NO_SPE: error: expected readable system register 78// NO_SPE: error: expected readable system register 79// NO_SPE: error: expected readable system register 80// NO_SPE: error: expected readable system register 81// NO_SPE: error: expected readable system register 82// NO_SPE: error: expected readable system register 83// NO_SPE: error: expected readable system register 84// NO_SPE: error: expected readable system register 85// NO_SPE: error: expected readable system register 86// NO_SPE: error: expected readable system register 87// NO_SPE: error: expected readable system register 88