| 1 |
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ |
| 2 |
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 3 |
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \ |
| 4 |
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 5 |
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ |
| 6 |
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR |
| 7 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ |
| 8 |
// RUN: | llvm-objdump -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST |
| 9 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ |
| 10 |
// RUN: | llvm-objdump -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
orr z5.b, z5.b, #0xf9 |
| 15 |
// CHECK-INST: orr z5.b, z5.b, #0xf9 |
| 16 |
// CHECK-ENCODING: [0xa5,0x2e,0x00,0x05] |
| 17 |
// CHECK-ERROR: instruction requires: sve or sme |
| 18 |
// CHECK-UNKNOWN: 05002ea5 <unknown> |
| 19 |
|
| 20 |
orr z23.h, z23.h, #0xfff9 |
| 21 |
// CHECK-INST: orr z23.h, z23.h, #0xfff9 |
| 22 |
// CHECK-ENCODING: [0xb7,0x6d,0x00,0x05] |
| 23 |
// CHECK-ERROR: instruction requires: sve or sme |
| 24 |
// CHECK-UNKNOWN: 05006db7 <unknown> |
| 25 |
|
| 26 |
orr z0.s, z0.s, #0xfffffff9 |
| 27 |
// CHECK-INST: orr z0.s, z0.s, #0xfffffff9 |
| 28 |
// CHECK-ENCODING: [0xa0,0xeb,0x00,0x05] |
| 29 |
// CHECK-ERROR: instruction requires: sve or sme |
| 30 |
// CHECK-UNKNOWN: 0500eba0 <unknown> |
| 31 |
|
| 32 |
orr z0.d, z0.d, #0xfffffffffffffff9 |
| 33 |
// CHECK-INST: orr z0.d, z0.d, #0xfffffffffffffff9 |
| 34 |
// CHECK-ENCODING: [0xa0,0xef,0x03,0x05] |
| 35 |
// CHECK-ERROR: instruction requires: sve or sme |
| 36 |
// CHECK-UNKNOWN: 0503efa0 <unknown> |
| 37 |
|
| 38 |
orr z5.b, z5.b, #0x6 |
| 39 |
// CHECK-INST: orr z5.b, z5.b, #0x6 |
| 40 |
// CHECK-ENCODING: [0x25,0x3e,0x00,0x05] |
| 41 |
// CHECK-ERROR: instruction requires: sve or sme |
| 42 |
// CHECK-UNKNOWN: 05003e25 <unknown> |
| 43 |
|
| 44 |
orr z23.h, z23.h, #0x6 |
| 45 |
// CHECK-INST: orr z23.h, z23.h, #0x6 |
| 46 |
// CHECK-ENCODING: [0x37,0x7c,0x00,0x05] |
| 47 |
// CHECK-ERROR: instruction requires: sve or sme |
| 48 |
// CHECK-UNKNOWN: 05007c37 <unknown> |
| 49 |
|
| 50 |
orr z0.s, z0.s, #0x6 |
| 51 |
// CHECK-INST: orr z0.s, z0.s, #0x6 |
| 52 |
// CHECK-ENCODING: [0x20,0xf8,0x00,0x05] |
| 53 |
// CHECK-ERROR: instruction requires: sve or sme |
| 54 |
// CHECK-UNKNOWN: 0500f820 <unknown> |
| 55 |
|
| 56 |
orr z0.d, z0.d, #0x6 |
| 57 |
// CHECK-INST: orr z0.d, z0.d, #0x6 |
| 58 |
// CHECK-ENCODING: [0x20,0xf8,0x03,0x05] |
| 59 |
// CHECK-ERROR: instruction requires: sve or sme |
| 60 |
// CHECK-UNKNOWN: 0503f820 <unknown> |
| 61 |
|
| 62 |
orr z0.d, z0.d, z0.d // should use mov-alias |
| 63 |
// CHECK-INST: mov z0.d, z0.d |
| 64 |
// CHECK-ENCODING: [0x00,0x30,0x60,0x04] |
| 65 |
// CHECK-ERROR: instruction requires: sve or sme |
| 66 |
// CHECK-UNKNOWN: 04603000 <unknown> |
| 67 |
|
| 68 |
orr z23.d, z13.d, z8.d // should not use mov-alias |
| 69 |
// CHECK-INST: orr z23.d, z13.d, z8.d |
| 70 |
// CHECK-ENCODING: [0xb7,0x31,0x68,0x04] |
| 71 |
// CHECK-ERROR: instruction requires: sve or sme |
| 72 |
// CHECK-UNKNOWN: 046831b7 <unknown> |
| 73 |
|
| 74 |
orr z31.b, p7/m, z31.b, z31.b |
| 75 |
// CHECK-INST: orr z31.b, p7/m, z31.b, z31.b |
| 76 |
// CHECK-ENCODING: [0xff,0x1f,0x18,0x04] |
| 77 |
// CHECK-ERROR: instruction requires: sve or sme |
| 78 |
// CHECK-UNKNOWN: 04181fff <unknown> |
| 79 |
|
| 80 |
orr z31.h, p7/m, z31.h, z31.h |
| 81 |
// CHECK-INST: orr z31.h, p7/m, z31.h, z31.h |
| 82 |
// CHECK-ENCODING: [0xff,0x1f,0x58,0x04] |
| 83 |
// CHECK-ERROR: instruction requires: sve or sme |
| 84 |
// CHECK-UNKNOWN: 04581fff <unknown> |
| 85 |
|
| 86 |
orr z31.s, p7/m, z31.s, z31.s |
| 87 |
// CHECK-INST: orr z31.s, p7/m, z31.s, z31.s |
| 88 |
// CHECK-ENCODING: [0xff,0x1f,0x98,0x04] |
| 89 |
// CHECK-ERROR: instruction requires: sve or sme |
| 90 |
// CHECK-UNKNOWN: 04981fff <unknown> |
| 91 |
|
| 92 |
orr z31.d, p7/m, z31.d, z31.d |
| 93 |
// CHECK-INST: orr z31.d, p7/m, z31.d, z31.d |
| 94 |
// CHECK-ENCODING: [0xff,0x1f,0xd8,0x04] |
| 95 |
// CHECK-ERROR: instruction requires: sve or sme |
| 96 |
// CHECK-UNKNOWN: 04d81fff <unknown> |
| 97 |
|
| 98 |
orr p0.b, p0/z, p0.b, p1.b |
| 99 |
// CHECK-INST: orr p0.b, p0/z, p0.b, p1.b |
| 100 |
// CHECK-ENCODING: [0x00,0x40,0x81,0x25] |
| 101 |
// CHECK-ERROR: instruction requires: sve or sme |
| 102 |
// CHECK-UNKNOWN: 25814000 <unknown> |
| 103 |
|
| 104 |
orr p0.b, p0/z, p0.b, p0.b |
| 105 |
// CHECK-INST: mov p0.b, p0.b |
| 106 |
// CHECK-ENCODING: [0x00,0x40,0x80,0x25] |
| 107 |
// CHECK-ERROR: instruction requires: sve or sme |
| 108 |
// CHECK-UNKNOWN: 25804000 <unknown> |
| 109 |
|
| 110 |
orr p15.b, p15/z, p15.b, p15.b |
| 111 |
// CHECK-INST: mov p15.b, p15.b |
| 112 |
// CHECK-ENCODING: [0xef,0x7d,0x8f,0x25] |
| 113 |
// CHECK-ERROR: instruction requires: sve or sme |
| 114 |
// CHECK-UNKNOWN: 258f7def <unknown> |
| 115 |
|
| 116 |
|
| 117 |
// --------------------------------------------------------------------------// |
| 118 |
// Test aliases. |
| 119 |
|
| 120 |
orr z0.s, z0.s, z0.s |
| 121 |
// CHECK-INST: mov z0.d, z0.d |
| 122 |
// CHECK-ENCODING: [0x00,0x30,0x60,0x04] |
| 123 |
// CHECK-ERROR: instruction requires: sve or sme |
| 124 |
// CHECK-UNKNOWN: 04603000 <unknown> |
| 125 |
|
| 126 |
orr z0.h, z0.h, z0.h |
| 127 |
// CHECK-INST: mov z0.d, z0.d |
| 128 |
// CHECK-ENCODING: [0x00,0x30,0x60,0x04] |
| 129 |
// CHECK-ERROR: instruction requires: sve or sme |
| 130 |
// CHECK-UNKNOWN: 04603000 <unknown> |
| 131 |
|
| 132 |
orr z0.b, z0.b, z0.b |
| 133 |
// CHECK-INST: mov z0.d, z0.d |
| 134 |
// CHECK-ENCODING: [0x00,0x30,0x60,0x04] |
| 135 |
// CHECK-ERROR: instruction requires: sve or sme |
| 136 |
// CHECK-UNKNOWN: 04603000 <unknown> |
| 137 |
|
| 138 |
orr z23.s, z13.s, z8.s // should not use mov-alias |
| 139 |
// CHECK-INST: orr z23.d, z13.d, z8.d |
| 140 |
// CHECK-ENCODING: [0xb7,0x31,0x68,0x04] |
| 141 |
// CHECK-ERROR: instruction requires: sve or sme |
| 142 |
// CHECK-UNKNOWN: 046831b7 <unknown> |
| 143 |
|
| 144 |
orr z23.h, z13.h, z8.h // should not use mov-alias |
| 145 |
// CHECK-INST: orr z23.d, z13.d, z8.d |
| 146 |
// CHECK-ENCODING: [0xb7,0x31,0x68,0x04] |
| 147 |
// CHECK-ERROR: instruction requires: sve or sme |
| 148 |
// CHECK-UNKNOWN: 046831b7 <unknown> |
| 149 |
|
| 150 |
orr z23.b, z13.b, z8.b // should not use mov-alias |
| 151 |
// CHECK-INST: orr z23.d, z13.d, z8.d |
| 152 |
// CHECK-ENCODING: [0xb7,0x31,0x68,0x04] |
| 153 |
// CHECK-ERROR: instruction requires: sve or sme |
| 154 |
// CHECK-UNKNOWN: 046831b7 <unknown> |
| 155 |
|
| 156 |
|
| 157 |
// --------------------------------------------------------------------------// |
| 158 |
// Test compatibility with MOVPRFX instruction. |
| 159 |
|
| 160 |
movprfx z4.d, p7/z, z6.d |
| 161 |
// CHECK-INST: movprfx z4.d, p7/z, z6.d |
| 162 |
// CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04] |
| 163 |
// CHECK-ERROR: instruction requires: sve or sme |
| 164 |
// CHECK-UNKNOWN: 04d03cc4 <unknown> |
| 165 |
|
| 166 |
orr z4.d, p7/m, z4.d, z31.d |
| 167 |
// CHECK-INST: orr z4.d, p7/m, z4.d, z31.d |
| 168 |
// CHECK-ENCODING: [0xe4,0x1f,0xd8,0x04] |
| 169 |
// CHECK-ERROR: instruction requires: sve or sme |
| 170 |
// CHECK-UNKNOWN: 04d81fe4 <unknown> |
| 171 |
|
| 172 |
movprfx z4, z6 |
| 173 |
// CHECK-INST: movprfx z4, z6 |
| 174 |
// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04] |
| 175 |
// CHECK-ERROR: instruction requires: sve or sme |
| 176 |
// CHECK-UNKNOWN: 0420bcc4 <unknown> |
| 177 |
|
| 178 |
orr z4.d, p7/m, z4.d, z31.d |
| 179 |
// CHECK-INST: orr z4.d, p7/m, z4.d, z31.d |
| 180 |
// CHECK-ENCODING: [0xe4,0x1f,0xd8,0x04] |
| 181 |
// CHECK-ERROR: instruction requires: sve or sme |
| 182 |
// CHECK-UNKNOWN: 04d81fe4 <unknown> |
| 183 |
|
| 184 |
movprfx z0, z7 |
| 185 |
// CHECK-INST: movprfx z0, z7 |
| 186 |
// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] |
| 187 |
// CHECK-ERROR: instruction requires: sve or sme |
| 188 |
// CHECK-UNKNOWN: 0420bce0 <unknown> |
| 189 |
|
| 190 |
orr z0.d, z0.d, #0x6 |
| 191 |
// CHECK-INST: orr z0.d, z0.d, #0x6 |
| 192 |
// CHECK-ENCODING: [0x20,0xf8,0x03,0x05] |
| 193 |
// CHECK-ERROR: instruction requires: sve or sme |
| 194 |
// CHECK-UNKNOWN: 0503f820 <unknown> |