|
| 1 | +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+cmh,+lscp < %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=+all < %s \ |
| 6 | +// RUN: | llvm-objdump -d --mattr=+cmh,+lscp --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST |
| 7 | +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+all < %s \ |
| 8 | +// RUN: | llvm-objdump -d --mattr=-cmh,-lscp --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN |
| 9 | +// Disassemble encoding and check the re-encoding (-show-encoding) matches. |
| 10 | +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+cmh,+lscp < %s \ |
| 11 | +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ |
| 12 | +// RUN: | llvm-mc -triple=aarch64 -mattr=+cmh,+lscp -disassemble -show-encoding \ |
| 13 | +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 14 | + |
| 15 | +// Armv9.7-A Contention Management Hints (FEAT_CMH). |
| 16 | + |
| 17 | +shuh |
| 18 | +// CHECK-INST: shuh |
| 19 | +// CHECK-ENCODING: encoding: [0x5f,0x26,0x03,0xd5] |
| 20 | +// CHECK-ERROR: error: instruction requires: cmh |
| 21 | +// CHECK-UNKNOWN: d503265f hint #50 |
| 22 | + |
| 23 | +shuh ph |
| 24 | +// CHECK-INST: shuh ph |
| 25 | +// CHECK-ENCODING: encoding: [0x7f,0x26,0x03,0xd5] |
| 26 | +// CHECK-ERROR: error: instruction requires: cmh |
| 27 | +// CHECK-UNKNOWN: d503267f hint #51 |
| 28 | + |
| 29 | +stcph |
| 30 | +// CHECK-INST: stcph |
| 31 | +// CHECK-ENCODING: [0x9f,0x26,0x03,0xd5] |
| 32 | +// CHECK-ERROR: error: instruction requires: cmh |
| 33 | +// CHECK-UNKNOWN: d503269f hint #52 |
| 34 | + |
| 35 | +ldap x0, x1, [x2] |
| 36 | +// CHECK-INST: ldap x0, x1, [x2] |
| 37 | +// CHECK-ENCODING: encoding: [0x40,0x58,0x41,0xd9] |
| 38 | +// CHECK-ERROR: error: instruction requires: lscp |
| 39 | +// CHECK-UNKNOWN: d9415840 <unknown> |
| 40 | + |
| 41 | +ldap x0, x1, [x2, #0] |
| 42 | +// CHECK-INST: ldap x0, x1, [x2] |
| 43 | +// CHECK-ENCODING: encoding: [0x40,0x58,0x41,0xd9] |
| 44 | +// CHECK-ERROR: error: instruction requires: lscp |
| 45 | +// CHECK-UNKNOWN: d9415840 <unknown> |
| 46 | + |
| 47 | +ldapp x0, x1, [x2] |
| 48 | +// CHECK-INST: ldapp x0, x1, [x2] |
| 49 | +// CHECK-ENCODING: encoding: [0x40,0x78,0x41,0xd9] |
| 50 | +// CHECK-ERROR: error: instruction requires: lscp |
| 51 | +// CHECK-UNKNOWN: d9417840 <unknown> |
| 52 | + |
| 53 | +ldapp x0, x1, [x2, #0] |
| 54 | +// CHECK-INST: ldapp x0, x1, [x2] |
| 55 | +// CHECK-ENCODING: encoding: [0x40,0x78,0x41,0xd9] |
| 56 | +// CHECK-ERROR: error: instruction requires: lscp |
| 57 | +// CHECK-UNKNOWN: d9417840 <unknown> |
| 58 | + |
| 59 | +stlp x0, x1, [x2, #0] |
| 60 | +// CHECK-INST: stlp x0, x1, [x2] |
| 61 | +// CHECK-ENCODING: encoding: [0x40,0x58,0x01,0xd9] |
| 62 | +// CHECK-ERROR: error: instruction requires: lscp |
| 63 | +// CHECK-UNKNOWN: d9015840 <unknown> |
| 64 | + |
| 65 | +stlp x0, x1, [x2] |
| 66 | +// CHECK-INST: stlp x0, x1, [x2] |
| 67 | +// CHECK-ENCODING: encoding: [0x40,0x58,0x01,0xd9] |
| 68 | +// CHECK-ERROR: error: instruction requires: lscp |
| 69 | +// CHECK-UNKNOWN: d9015840 <unknown> |
| 70 | + |
| 71 | +mrs x3, VTLBID0_EL2 |
| 72 | +// CHECK-INST: mrs x3, VTLBID0_EL2 |
| 73 | +// CHECK-ENCODING: encoding: [0x03,0x28,0x3c,0xd5] |
| 74 | +// CHECK-UNKNOWN: d53c2803 |
| 75 | +mrs x3, VTLBID1_EL2 |
| 76 | +// CHECK-INST: mrs x3, VTLBID1_EL2 |
| 77 | +// CHECK-ENCODING: encoding: [0x23,0x28,0x3c,0xd5] |
| 78 | +// CHECK-UNKNOWN: d53c2823 |
| 79 | +mrs x3, VTLBID2_EL2 |
| 80 | +// CHECK-INST: mrs x3, VTLBID2_EL2 |
| 81 | +// CHECK-ENCODING: encoding: [0x43,0x28,0x3c,0xd5] |
| 82 | +// CHECK-UNKNOWN: d53c2843 |
| 83 | +mrs x3, VTLBID3_EL2 |
| 84 | +// CHECK-INST: mrs x3, VTLBID3_EL2 |
| 85 | +// CHECK-ENCODING: encoding: [0x63,0x28,0x3c,0xd5] |
| 86 | +// CHECK-UNKNOWN: d53c2863 |
| 87 | +mrs x3, VTLBIDOS0_EL2 |
| 88 | +// CHECK-INST: mrs x3, VTLBIDOS0_EL2 |
| 89 | +// CHECK-ENCODING: encoding: [0x03,0x29,0x3c,0xd5] |
| 90 | +// CHECK-UNKNOWN: d53c2903 |
| 91 | +mrs x3, VTLBIDOS1_EL2 |
| 92 | +// CHECK-INST: mrs x3, VTLBIDOS1_EL2 |
| 93 | +// CHECK-ENCODING: encoding: [0x23,0x29,0x3c,0xd5] |
| 94 | +// CHECK-UNKNOWN: d53c2923 |
| 95 | +mrs x3, VTLBIDOS2_EL2 |
| 96 | +// CHECK-INST: mrs x3, VTLBIDOS2_EL2 |
| 97 | +// CHECK-ENCODING: encoding: [0x43,0x29,0x3c,0xd5] |
| 98 | +// CHECK-UNKNOWN: d53c2943 |
| 99 | +mrs x3, VTLBIDOS3_EL2 |
| 100 | +// CHECK-INST: mrs x3, VTLBIDOS3_EL2 |
| 101 | +// CHECK-ENCODING: encoding: [0x63,0x29,0x3c,0xd5] |
| 102 | +// CHECK-UNKNOWN: d53c2963 |
| 103 | +mrs x3, TLBIDIDR_EL1 |
| 104 | +// CHECK-INST: mrs x3, TLBIDIDR_EL1 |
| 105 | +// CHECK-ENCODING: encoding: [0xc3,0xa4,0x38,0xd5] |
| 106 | +// CHECK-UNKNOWN: d538a4c3 |
| 107 | + |
| 108 | +msr VTLBID0_EL2, x3 |
| 109 | +// CHECK-INST: msr VTLBID0_EL2, x3 |
| 110 | +// CHECK-ENCODING: encoding: [0x03,0x28,0x1c,0xd5] |
| 111 | +// CHECK-UNKNOWN: d51c2803 |
| 112 | +msr VTLBID1_EL2, x3 |
| 113 | +// CHECK-INST: msr VTLBID1_EL2, x3 |
| 114 | +// CHECK-ENCODING: encoding: [0x23,0x28,0x1c,0xd5] |
| 115 | +// CHECK-UNKNOWN: d51c2823 |
| 116 | +msr VTLBID2_EL2, x3 |
| 117 | +// CHECK-INST: msr VTLBID2_EL2, x3 |
| 118 | +// CHECK-ENCODING: encoding: [0x43,0x28,0x1c,0xd5] |
| 119 | +// CHECK-UNKNOWN: d51c2843 |
| 120 | +msr VTLBID3_EL2, x3 |
| 121 | +// CHECK-INST: msr VTLBID3_EL2, x3 |
| 122 | +// CHECK-ENCODING: encoding: [0x63,0x28,0x1c,0xd5] |
| 123 | +// CHECK-UNKNOWN: d51c2863 |
| 124 | +msr VTLBIDOS0_EL2, x3 |
| 125 | +// CHECK-INST: msr VTLBIDOS0_EL2, x3 |
| 126 | +// CHECK-ENCODING: encoding: [0x03,0x29,0x1c,0xd5] |
| 127 | +// CHECK-UNKNOWN: d51c2903 |
| 128 | +msr VTLBIDOS1_EL2, x3 |
| 129 | +// CHECK-INST: msr VTLBIDOS1_EL2, x3 |
| 130 | +// CHECK-ENCODING: encoding: [0x23,0x29,0x1c,0xd5] |
| 131 | +// CHECK-UNKNOWN: d51c2923 |
| 132 | +msr VTLBIDOS2_EL2, x3 |
| 133 | +// CHECK-INST: msr VTLBIDOS2_EL2, x3 |
| 134 | +// CHECK-ENCODING: encoding: [0x43,0x29,0x1c,0xd5] |
| 135 | +// CHECK-UNKNOWN: d51c2943 |
| 136 | +msr VTLBIDOS3_EL2, x3 |
| 137 | +// CHECK-INST: msr VTLBIDOS3_EL2, x3 |
| 138 | +// CHECK-ENCODING: encoding: [0x63,0x29,0x1c,0xd5] |
| 139 | +// CHECK-UNKNOWN: d51c2963 |
| 140 | + |
0 commit comments