|
| 1 | +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ |
| 2 | +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 3 | +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ |
| 4 | +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR |
| 5 | +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ |
| 6 | +// RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST |
| 7 | +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ |
| 8 | +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN |
| 9 | + |
| 10 | +mrs x3, ID_AA64ZFR0_EL1 |
| 11 | +// CHECK-INST: mrs x3, ID_AA64ZFR0_EL1 |
| 12 | +// CHECK-ENCODING: [0x83,0x04,0x38,0xd5] |
| 13 | +// CHECK-ERROR: expected readable system register |
| 14 | +// CHECK-UNKNOWN: 83 04 38 d5 mrs x3, S3_0_C0_C4_4 |
| 15 | + |
| 16 | +mrs x3, ZCR_EL1 |
| 17 | +// CHECK-INST: mrs x3, ZCR_EL1 |
| 18 | +// CHECK-ENCODING: [0x03,0x12,0x38,0xd5] |
| 19 | +// CHECK-ERROR: expected readable system register |
| 20 | +// CHECK-UNKNOWN: 03 12 38 d5 mrs x3, S3_0_C1_C2_0 |
| 21 | + |
| 22 | +mrs x3, ZCR_EL2 |
| 23 | +// CHECK-INST: mrs x3, ZCR_EL2 |
| 24 | +// CHECK-ENCODING: [0x03,0x12,0x3c,0xd5] |
| 25 | +// CHECK-ERROR: expected readable system register |
| 26 | +// CHECK-UNKNOWN: 03 12 3c d5 mrs x3, S3_4_C1_C2_0 |
| 27 | + |
| 28 | +mrs x3, ZCR_EL3 |
| 29 | +// CHECK-INST: mrs x3, ZCR_EL3 |
| 30 | +// CHECK-ENCODING: [0x03,0x12,0x3e,0xd5] |
| 31 | +// CHECK-ERROR: expected readable system register |
| 32 | +// CHECK-UNKNOWN: 03 12 3e d5 mrs x3, S3_6_C1_C2_0 |
| 33 | + |
| 34 | +mrs x3, ZCR_EL12 |
| 35 | +// CHECK-INST: mrs x3, ZCR_EL12 |
| 36 | +// CHECK-ENCODING: [0x03,0x12,0x3d,0xd5] |
| 37 | +// CHECK-ERROR: expected readable system register |
| 38 | +// CHECK-UNKNOWN: 03 12 3d d5 mrs x3, S3_5_C1_C2_0 |
| 39 | + |
| 40 | +msr ZCR_EL1, x3 |
| 41 | +// CHECK-INST: msr ZCR_EL1, x3 |
| 42 | +// CHECK-ENCODING: [0x03,0x12,0x18,0xd5] |
| 43 | +// CHECK-ERROR: expected writable system register or pstate |
| 44 | +// CHECK-UNKNOWN: 03 12 18 d5 msr S3_0_C1_C2_0, x3 |
| 45 | + |
| 46 | +msr ZCR_EL2, x3 |
| 47 | +// CHECK-INST: msr ZCR_EL2, x3 |
| 48 | +// CHECK-ENCODING: [0x03,0x12,0x1c,0xd5] |
| 49 | +// CHECK-ERROR: expected writable system register or pstate |
| 50 | +// CHECK-UNKNOWN: 03 12 1c d5 msr S3_4_C1_C2_0, x3 |
| 51 | + |
| 52 | +msr ZCR_EL3, x3 |
| 53 | +// CHECK-INST: msr ZCR_EL3, x3 |
| 54 | +// CHECK-ENCODING: [0x03,0x12,0x1e,0xd5] |
| 55 | +// CHECK-ERROR: expected writable system register or pstate |
| 56 | +// CHECK-UNKNOWN: 03 12 1e d5 msr S3_6_C1_C2_0, x3 |
| 57 | + |
| 58 | +msr ZCR_EL12, x3 |
| 59 | +// CHECK-INST: msr ZCR_EL12, x3 |
| 60 | +// CHECK-ENCODING: [0x03,0x12,0x1d,0xd5] |
| 61 | +// CHECK-ERROR: expected writable system register or pstate |
| 62 | +// CHECK-UNKNOWN: 03 12 1d d5 msr S3_5_C1_C2_0, x3 |
0 commit comments