1// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.3a < %s 2> %t | FileCheck %s 2// RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2> %t 3// RUN: FileCheck --check-prefix=CHECK-REQ %s < %t 4 5 mrs x0, apiakeylo_el1 6 mrs x0, apiakeyhi_el1 7 mrs x0, apibkeylo_el1 8 mrs x0, apibkeyhi_el1 9 mrs x0, apdakeylo_el1 10 mrs x0, apdakeyhi_el1 11 mrs x0, apdbkeylo_el1 12 mrs x0, apdbkeyhi_el1 13 mrs x0, apgakeylo_el1 14 mrs x0, apgakeyhi_el1 15 16// CHECK: mrs x0, APIAKeyLo_EL1 // encoding: [0x00,0x21,0x38,0xd5] 17// CHECK: mrs x0, APIAKeyHi_EL1 // encoding: [0x20,0x21,0x38,0xd5] 18// CHECK: mrs x0, APIBKeyLo_EL1 // encoding: [0x40,0x21,0x38,0xd5] 19// CHECK: mrs x0, APIBKeyHi_EL1 // encoding: [0x60,0x21,0x38,0xd5] 20// CHECK: mrs x0, APDAKeyLo_EL1 // encoding: [0x00,0x22,0x38,0xd5] 21// CHECK: mrs x0, APDAKeyHi_EL1 // encoding: [0x20,0x22,0x38,0xd5] 22// CHECK: mrs x0, APDBKeyLo_EL1 // encoding: [0x40,0x22,0x38,0xd5] 23// CHECK: mrs x0, APDBKeyHi_EL1 // encoding: [0x60,0x22,0x38,0xd5] 24// CHECK: mrs x0, APGAKeyLo_EL1 // encoding: [0x00,0x23,0x38,0xd5] 25// CHECK: mrs x0, APGAKeyHi_EL1 // encoding: [0x20,0x23,0x38,0xd5] 26 27// CHECK-REQ: error: expected readable system register 28// CHECK-REQ: error: expected readable system register 29// CHECK-REQ: error: expected readable system register 30// CHECK-REQ: error: expected readable system register 31// CHECK-REQ: error: expected readable system register 32// CHECK-REQ: error: expected readable system register 33// CHECK-REQ: error: expected readable system register 34// CHECK-REQ: error: expected readable system register 35// CHECK-REQ: error: expected readable system register 36// CHECK-REQ: error: expected readable system register 37 38 msr apiakeylo_el1, x0 39 msr apiakeyhi_el1, x0 40 msr apibkeylo_el1, x0 41 msr apibkeyhi_el1, x0 42 msr apdakeylo_el1, x0 43 msr apdakeyhi_el1, x0 44 msr apdbkeylo_el1, x0 45 msr apdbkeyhi_el1, x0 46 msr apgakeylo_el1, x0 47 msr apgakeyhi_el1, x0 48 49// CHECK: msr APIAKeyLo_EL1, x0 // encoding: [0x00,0x21,0x18,0xd5] 50// CHECK: msr APIAKeyHi_EL1, x0 // encoding: [0x20,0x21,0x18,0xd5] 51// CHECK: msr APIBKeyLo_EL1, x0 // encoding: [0x40,0x21,0x18,0xd5] 52// CHECK: msr APIBKeyHi_EL1, x0 // encoding: [0x60,0x21,0x18,0xd5] 53// CHECK: msr APDAKeyLo_EL1, x0 // encoding: [0x00,0x22,0x18,0xd5] 54// CHECK: msr APDAKeyHi_EL1, x0 // encoding: [0x20,0x22,0x18,0xd5] 55// CHECK: msr APDBKeyLo_EL1, x0 // encoding: [0x40,0x22,0x18,0xd5] 56// CHECK: msr APDBKeyHi_EL1, x0 // encoding: [0x60,0x22,0x18,0xd5] 57// CHECK: msr APGAKeyLo_EL1, x0 // encoding: [0x00,0x23,0x18,0xd5] 58// CHECK: msr APGAKeyHi_EL1, x0 // encoding: [0x20,0x23,0x18,0xd5] 59 60// CHECK-REQ: error: expected writable system register or pstate 61// CHECK-REQ: error: expected writable system register or pstate 62// CHECK-REQ: error: expected writable system register or pstate 63// CHECK-REQ: error: expected writable system register or pstate 64// CHECK-REQ: error: expected writable system register or pstate 65// CHECK-REQ: error: expected writable system register or pstate 66// CHECK-REQ: error: expected writable system register or pstate 67// CHECK-REQ: error: expected writable system register or pstate 68// CHECK-REQ: error: expected writable system register or pstate 69// CHECK-REQ: error: expected writable system register or pstate 70 71 paciasp 72// CHECK: paciasp // encoding: [0x3f,0x23,0x03,0xd5] 73// CHECK-REQ-NOT: error: instruction requires: armv8.3a 74 autiasp 75// CHECK: autiasp // encoding: [0xbf,0x23,0x03,0xd5] 76// CHECK-REQ-NOT: error: instruction requires: armv8.3a 77 paciaz 78// CHECK: paciaz // encoding: [0x1f,0x23,0x03,0xd5] 79// CHECK-REQ-NOT: error: instruction requires: armv8.3a 80 autiaz 81// CHECK: autiaz // encoding: [0x9f,0x23,0x03,0xd5] 82// CHECK-REQ-NOT: error: instruction requires: armv8.3a 83 pacia1716 84// CHECK: pacia1716 // encoding: [0x1f,0x21,0x03,0xd5] 85// CHECK-REQ-NOT: error: instruction requires: armv8.3a 86 autia1716 87// CHECK: autia1716 // encoding: [0x9f,0x21,0x03,0xd5] 88// CHECK-REQ-NOT: error: instruction requires: armv8.3a 89 pacibsp 90// CHECK: pacibsp // encoding: [0x7f,0x23,0x03,0xd5] 91// CHECK-REQ-NOT: error: instruction requires: armv8.3a 92 autibsp 93// CHECK: autibsp // encoding: [0xff,0x23,0x03,0xd5] 94// CHECK-REQ-NOT: error: instruction requires: armv8.3a 95 pacibz 96// CHECK: pacibz // encoding: [0x5f,0x23,0x03,0xd5] 97// CHECK-REQ-NOT: error: instruction requires: armv8.3a 98 autibz 99// CHECK: autibz // encoding: [0xdf,0x23,0x03,0xd5] 100// CHECK-REQ-NOT: error: instruction requires: armv8.3a 101 pacib1716 102// CHECK: pacib1716 // encoding: [0x5f,0x21,0x03,0xd5] 103// CHECK-REQ-NOT: error: instruction requires: armv8.3a 104 autib1716 105// CHECK: autib1716 // encoding: [0xdf,0x21,0x03,0xd5] 106// CHECK-REQ-NOT: error: instruction requires: armv8.3a 107 xpaclri 108// CHECK: xpaclri // encoding: [0xff,0x20,0x03,0xd5] 109// CHECK-REQ-NOT: error: instruction requires: armv8.3a 110 111 pacia x0, x1 112// CHECK: pacia x0, x1 // encoding: [0x20,0x00,0xc1,0xda] 113// CHECK-REQ: error: instruction requires: armv8.3a 114 autia x0, x1 115// CHECK: autia x0, x1 // encoding: [0x20,0x10,0xc1,0xda] 116// CHECK-REQ: error: instruction requires: armv8.3a 117 pacda x0, x1 118// CHECK: pacda x0, x1 // encoding: [0x20,0x08,0xc1,0xda] 119// CHECK-REQ: error: instruction requires: armv8.3a 120 autda x0, x1 121// CHECK: autda x0, x1 // encoding: [0x20,0x18,0xc1,0xda] 122// CHECK-REQ: error: instruction requires: armv8.3a 123 pacib x0, x1 124// CHECK: pacib x0, x1 // encoding: [0x20,0x04,0xc1,0xda] 125// CHECK-REQ: error: instruction requires: armv8.3a 126 autib x0, x1 127// CHECK: autib x0, x1 // encoding: [0x20,0x14,0xc1,0xda] 128// CHECK-REQ: error: instruction requires: armv8.3a 129 pacdb x0, x1 130// CHECK: pacdb x0, x1 // encoding: [0x20,0x0c,0xc1,0xda] 131// CHECK-REQ: error: instruction requires: armv8.3a 132 autdb x0, x1 133// CHECK: autdb x0, x1 // encoding: [0x20,0x1c,0xc1,0xda] 134// CHECK-REQ: error: instruction requires: armv8.3a 135 pacga x0, x1, x2 136// CHECK: pacga x0, x1, x2 // encoding: [0x20,0x30,0xc2,0x9a] 137// CHECK-REQ: error: instruction requires: armv8.3a 138 paciza x0 139// CHECK: paciza x0 // encoding: [0xe0,0x23,0xc1,0xda] 140// CHECK-REQ: error: instruction requires: armv8.3a 141 autiza x0 142// CHECK: autiza x0 // encoding: [0xe0,0x33,0xc1,0xda] 143// CHECK-REQ: error: instruction requires: armv8.3a 144 pacdza x0 145// CHECK: pacdza x0 // encoding: [0xe0,0x2b,0xc1,0xda] 146// CHECK-REQ: error: instruction requires: armv8.3a 147 autdza x0 148// CHECK: autdza x0 // encoding: [0xe0,0x3b,0xc1,0xda] 149// CHECK-REQ: error: instruction requires: armv8.3a 150 pacizb x0 151// CHECK: pacizb x0 // encoding: [0xe0,0x27,0xc1,0xda] 152// CHECK-REQ: error: instruction requires: armv8.3a 153 autizb x0 154// CHECK: autizb x0 // encoding: [0xe0,0x37,0xc1,0xda] 155// CHECK-REQ: error: instruction requires: armv8.3a 156 pacdzb x0 157// CHECK: pacdzb x0 // encoding: [0xe0,0x2f,0xc1,0xda] 158// CHECK-REQ: error: instruction requires: armv8.3a 159 autdzb x0 160// CHECK: autdzb x0 // encoding: [0xe0,0x3f,0xc1,0xda] 161// CHECK-REQ: error: instruction requires: armv8.3a 162 xpaci x0 163// CHECK: xpaci x0 // encoding: [0xe0,0x43,0xc1,0xda] 164// CHECK-REQ: error: instruction requires: armv8.3a 165 xpacd x0 166// CHECK: xpacd x0 // encoding: [0xe0,0x47,0xc1,0xda] 167// CHECK-REQ: error: instruction requires: armv8.3a 168 169 braa x0, x1 170// CHECK: braa x0, x1 // encoding: [0x01,0x08,0x1f,0xd7] 171// CHECK-REQ: error: instruction requires: armv8.3a 172 brab x0, x1 173// CHECK: brab x0, x1 // encoding: [0x01,0x0c,0x1f,0xd7] 174// CHECK-REQ: error: instruction requires: armv8.3a 175 blraa x0, x1 176// CHECK: blraa x0, x1 // encoding: [0x01,0x08,0x3f,0xd7] 177// CHECK-REQ: error: instruction requires: armv8.3a 178 blrab x0, x1 179// CHECK: blrab x0, x1 // encoding: [0x01,0x0c,0x3f,0xd7] 180// CHECK-REQ: error: instruction requires: armv8.3a 181 182 braaz x0 183// CHECK: braaz x0 // encoding: [0x1f,0x08,0x1f,0xd6] 184// CHECK-REQ: error: instruction requires: armv8.3a 185 brabz x0 186// CHECK: brabz x0 // encoding: [0x1f,0x0c,0x1f,0xd6] 187// CHECK-REQ: error: instruction requires: armv8.3a 188 blraaz x0 189// CHECK: blraaz x0 // encoding: [0x1f,0x08,0x3f,0xd6] 190// CHECK-REQ: error: instruction requires: armv8.3a 191 blrabz x0 192// CHECK: blrabz x0 // encoding: [0x1f,0x0c,0x3f,0xd6] 193// CHECK-REQ: error: instruction requires: armv8.3a 194 retaa 195// CHECK: retaa // encoding: [0xff,0x0b,0x5f,0xd6] 196// CHECK-REQ: error: instruction requires: armv8.3a 197 retab 198// CHECK: retab // encoding: [0xff,0x0f,0x5f,0xd6] 199// CHECK-REQ: error: instruction requires: armv8.3a 200 eretaa 201// CHECK: eretaa // encoding: [0xff,0x0b,0x9f,0xd6] 202// CHECK-REQ: error: instruction requires: armv8.3a 203 eretab 204// CHECK: eretab // encoding: [0xff,0x0f,0x9f,0xd6] 205// CHECK-REQ: error: instruction requires: armv8.3a 206 ldraa x0, [x1, 4088] 207// CHECK: ldraa x0, [x1, #4088] // encoding: [0x20,0xf4,0x3f,0xf8] 208// CHECK-REQ: error: instruction requires: armv8.3a 209 ldraa x0, [x1, -4096] 210// CHECK: ldraa x0, [x1, #-4096] // encoding: [0x20,0x04,0x60,0xf8] 211// CHECK-REQ: error: instruction requires: armv8.3a 212 ldrab x0, [x1, 4088] 213// CHECK: ldrab x0, [x1, #4088] // encoding: [0x20,0xf4,0xbf,0xf8] 214// CHECK-REQ: error: instruction requires: armv8.3a 215 ldrab x0, [x1, -4096] 216// CHECK: ldrab x0, [x1, #-4096] // encoding: [0x20,0x04,0xe0,0xf8] 217// CHECK-REQ: error: instruction requires: armv8.3a 218 ldraa x0, [x1, 4088]! 219// CHECK: ldraa x0, [x1, #4088]! // encoding: [0x20,0xfc,0x3f,0xf8] 220// CHECK-REQ: error: instruction requires: armv8.3a 221 ldraa x0, [x1, -4096]! 222// CHECK: ldraa x0, [x1, #-4096]! // encoding: [0x20,0x0c,0x60,0xf8] 223// CHECK-REQ: error: instruction requires: armv8.3a 224 ldrab x0, [x1, 4088]! 225// CHECK: ldrab x0, [x1, #4088]! // encoding: [0x20,0xfc,0xbf,0xf8] 226// CHECK-REQ: error: instruction requires: armv8.3a 227 ldrab x0, [x1, -4096]! 228// CHECK: ldrab x0, [x1, #-4096]! // encoding: [0x20,0x0c,0xe0,0xf8] 229// CHECK-REQ: error: instruction requires: armv8.3a 230 ldraa x0, [x1] 231// CHECK: ldraa x0, [x1] // encoding: [0x20,0x04,0x20,0xf8] 232// CHECK-REQ: error: instruction requires: armv8.3a 233 ldrab x0, [x1] 234// CHECK: ldrab x0, [x1] // encoding: [0x20,0x04,0xa0,0xf8] 235// CHECK-REQ: error: instruction requires: armv8.3a 236