| 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 --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST |
| 9 |
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ |
| 10 |
// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN |
| 11 |
|
| 12 |
dup z0.b, w0 |
| 13 |
// CHECK-INST: mov z0.b, w0 |
| 14 |
// CHECK-ENCODING: [0x00,0x38,0x20,0x05] |
| 15 |
// CHECK-ERROR: instruction requires: sve or sme |
| 16 |
// CHECK-UNKNOWN: 05203800 <unknown> |
| 17 |
|
| 18 |
dup z0.h, w0 |
| 19 |
// CHECK-INST: mov z0.h, w0 |
| 20 |
// CHECK-ENCODING: [0x00,0x38,0x60,0x05] |
| 21 |
// CHECK-ERROR: instruction requires: sve or sme |
| 22 |
// CHECK-UNKNOWN: 05603800 <unknown> |
| 23 |
|
| 24 |
dup z0.s, w0 |
| 25 |
// CHECK-INST: mov z0.s, w0 |
| 26 |
// CHECK-ENCODING: [0x00,0x38,0xa0,0x05] |
| 27 |
// CHECK-ERROR: instruction requires: sve or sme |
| 28 |
// CHECK-UNKNOWN: 05a03800 <unknown> |
| 29 |
|
| 30 |
dup z0.d, x0 |
| 31 |
// CHECK-INST: mov z0.d, x0 |
| 32 |
// CHECK-ENCODING: [0x00,0x38,0xe0,0x05] |
| 33 |
// CHECK-ERROR: instruction requires: sve or sme |
| 34 |
// CHECK-UNKNOWN: 05e03800 <unknown> |
| 35 |
|
| 36 |
dup z31.h, wsp |
| 37 |
// CHECK-INST: mov z31.h, wsp |
| 38 |
// CHECK-ENCODING: [0xff,0x3b,0x60,0x05] |
| 39 |
// CHECK-ERROR: instruction requires: sve or sme |
| 40 |
// CHECK-UNKNOWN: 05603bff <unknown> |
| 41 |
|
| 42 |
dup z31.s, wsp |
| 43 |
// CHECK-INST: mov z31.s, wsp |
| 44 |
// CHECK-ENCODING: [0xff,0x3b,0xa0,0x05] |
| 45 |
// CHECK-ERROR: instruction requires: sve or sme |
| 46 |
// CHECK-UNKNOWN: 05a03bff <unknown> |
| 47 |
|
| 48 |
dup z31.d, sp |
| 49 |
// CHECK-INST: mov z31.d, sp |
| 50 |
// CHECK-ENCODING: [0xff,0x3b,0xe0,0x05] |
| 51 |
// CHECK-ERROR: instruction requires: sve or sme |
| 52 |
// CHECK-UNKNOWN: 05e03bff <unknown> |
| 53 |
|
| 54 |
dup z31.b, wsp |
| 55 |
// CHECK-INST: mov z31.b, wsp |
| 56 |
// CHECK-ENCODING: [0xff,0x3b,0x20,0x05] |
| 57 |
// CHECK-ERROR: instruction requires: sve or sme |
| 58 |
// CHECK-UNKNOWN: 05203bff <unknown> |
| 59 |
|
| 60 |
dup z5.b, #-128 |
| 61 |
// CHECK-INST: mov z5.b, #-128 |
| 62 |
// CHECK-ENCODING: [0x05,0xd0,0x38,0x25] |
| 63 |
// CHECK-ERROR: instruction requires: sve or sme |
| 64 |
// CHECK-UNKNOWN: 2538d005 <unknown> |
| 65 |
|
| 66 |
dup z5.b, #127 |
| 67 |
// CHECK-INST: mov z5.b, #127 |
| 68 |
// CHECK-ENCODING: [0xe5,0xcf,0x38,0x25] |
| 69 |
// CHECK-ERROR: instruction requires: sve or sme |
| 70 |
// CHECK-UNKNOWN: 2538cfe5 <unknown> |
| 71 |
|
| 72 |
dup z5.b, #255 |
| 73 |
// CHECK-INST: mov z5.b, #-1 |
| 74 |
// CHECK-ENCODING: [0xe5,0xdf,0x38,0x25] |
| 75 |
// CHECK-ERROR: instruction requires: sve or sme |
| 76 |
// CHECK-UNKNOWN: 2538dfe5 <unknown> |
| 77 |
|
| 78 |
dup z21.h, #-128 |
| 79 |
// CHECK-INST: mov z21.h, #-128 |
| 80 |
// CHECK-ENCODING: [0x15,0xd0,0x78,0x25] |
| 81 |
// CHECK-ERROR: instruction requires: sve or sme |
| 82 |
// CHECK-UNKNOWN: 2578d015 <unknown> |
| 83 |
|
| 84 |
dup z21.h, #-128, lsl #8 |
| 85 |
// CHECK-INST: mov z21.h, #-32768 |
| 86 |
// CHECK-ENCODING: [0x15,0xf0,0x78,0x25] |
| 87 |
// CHECK-ERROR: instruction requires: sve or sme |
| 88 |
// CHECK-UNKNOWN: 2578f015 <unknown> |
| 89 |
|
| 90 |
dup z21.h, #-32768 |
| 91 |
// CHECK-INST: mov z21.h, #-32768 |
| 92 |
// CHECK-ENCODING: [0x15,0xf0,0x78,0x25] |
| 93 |
// CHECK-ERROR: instruction requires: sve or sme |
| 94 |
// CHECK-UNKNOWN: 2578f015 <unknown> |
| 95 |
|
| 96 |
dup z21.h, #127 |
| 97 |
// CHECK-INST: mov z21.h, #127 |
| 98 |
// CHECK-ENCODING: [0xf5,0xcf,0x78,0x25] |
| 99 |
// CHECK-ERROR: instruction requires: sve or sme |
| 100 |
// CHECK-UNKNOWN: 2578cff5 <unknown> |
| 101 |
|
| 102 |
dup z21.h, #127, lsl #8 |
| 103 |
// CHECK-INST: mov z21.h, #32512 |
| 104 |
// CHECK-ENCODING: [0xf5,0xef,0x78,0x25] |
| 105 |
// CHECK-ERROR: instruction requires: sve or sme |
| 106 |
// CHECK-UNKNOWN: 2578eff5 <unknown> |
| 107 |
|
| 108 |
dup z21.h, #32512 |
| 109 |
// CHECK-INST: mov z21.h, #32512 |
| 110 |
// CHECK-ENCODING: [0xf5,0xef,0x78,0x25] |
| 111 |
// CHECK-ERROR: instruction requires: sve or sme |
| 112 |
// CHECK-UNKNOWN: 2578eff5 <unknown> |
| 113 |
|
| 114 |
dup z21.s, #-128 |
| 115 |
// CHECK-INST: mov z21.s, #-128 |
| 116 |
// CHECK-ENCODING: [0x15,0xd0,0xb8,0x25] |
| 117 |
// CHECK-ERROR: instruction requires: sve or sme |
| 118 |
// CHECK-UNKNOWN: 25b8d015 <unknown> |
| 119 |
|
| 120 |
dup z21.s, #-128, lsl #8 |
| 121 |
// CHECK-INST: mov z21.s, #-32768 |
| 122 |
// CHECK-ENCODING: [0x15,0xf0,0xb8,0x25] |
| 123 |
// CHECK-ERROR: instruction requires: sve or sme |
| 124 |
// CHECK-UNKNOWN: 25b8f015 <unknown> |
| 125 |
|
| 126 |
dup z21.s, #-32768 |
| 127 |
// CHECK-INST: mov z21.s, #-32768 |
| 128 |
// CHECK-ENCODING: [0x15,0xf0,0xb8,0x25] |
| 129 |
// CHECK-ERROR: instruction requires: sve or sme |
| 130 |
// CHECK-UNKNOWN: 25b8f015 <unknown> |
| 131 |
|
| 132 |
dup z21.s, #127 |
| 133 |
// CHECK-INST: mov z21.s, #127 |
| 134 |
// CHECK-ENCODING: [0xf5,0xcf,0xb8,0x25] |
| 135 |
// CHECK-ERROR: instruction requires: sve or sme |
| 136 |
// CHECK-UNKNOWN: 25b8cff5 <unknown> |
| 137 |
|
| 138 |
dup z21.s, #127, lsl #8 |
| 139 |
// CHECK-INST: mov z21.s, #32512 |
| 140 |
// CHECK-ENCODING: [0xf5,0xef,0xb8,0x25] |
| 141 |
// CHECK-ERROR: instruction requires: sve or sme |
| 142 |
// CHECK-UNKNOWN: 25b8eff5 <unknown> |
| 143 |
|
| 144 |
dup z21.s, #32512 |
| 145 |
// CHECK-INST: mov z21.s, #32512 |
| 146 |
// CHECK-ENCODING: [0xf5,0xef,0xb8,0x25] |
| 147 |
// CHECK-ERROR: instruction requires: sve or sme |
| 148 |
// CHECK-UNKNOWN: 25b8eff5 <unknown> |
| 149 |
|
| 150 |
dup z21.d, #-128 |
| 151 |
// CHECK-INST: mov z21.d, #-128 |
| 152 |
// CHECK-ENCODING: [0x15,0xd0,0xf8,0x25] |
| 153 |
// CHECK-ERROR: instruction requires: sve or sme |
| 154 |
// CHECK-UNKNOWN: 25f8d015 <unknown> |
| 155 |
|
| 156 |
dup z21.d, #-128, lsl #8 |
| 157 |
// CHECK-INST: mov z21.d, #-32768 |
| 158 |
// CHECK-ENCODING: [0x15,0xf0,0xf8,0x25] |
| 159 |
// CHECK-ERROR: instruction requires: sve or sme |
| 160 |
// CHECK-UNKNOWN: 25f8f015 <unknown> |
| 161 |
|
| 162 |
dup z21.d, #-32768 |
| 163 |
// CHECK-INST: mov z21.d, #-32768 |
| 164 |
// CHECK-ENCODING: [0x15,0xf0,0xf8,0x25] |
| 165 |
// CHECK-ERROR: instruction requires: sve or sme |
| 166 |
// CHECK-UNKNOWN: 25f8f015 <unknown> |
| 167 |
|
| 168 |
dup z21.d, #127 |
| 169 |
// CHECK-INST: mov z21.d, #127 |
| 170 |
// CHECK-ENCODING: [0xf5,0xcf,0xf8,0x25] |
| 171 |
// CHECK-ERROR: instruction requires: sve or sme |
| 172 |
// CHECK-UNKNOWN: 25f8cff5 <unknown> |
| 173 |
|
| 174 |
dup z21.d, #127, lsl #8 |
| 175 |
// CHECK-INST: mov z21.d, #32512 |
| 176 |
// CHECK-ENCODING: [0xf5,0xef,0xf8,0x25] |
| 177 |
// CHECK-ERROR: instruction requires: sve or sme |
| 178 |
// CHECK-UNKNOWN: 25f8eff5 <unknown> |
| 179 |
|
| 180 |
dup z21.d, #32512 |
| 181 |
// CHECK-INST: mov z21.d, #32512 |
| 182 |
// CHECK-ENCODING: [0xf5,0xef,0xf8,0x25] |
| 183 |
// CHECK-ERROR: instruction requires: sve or sme |
| 184 |
// CHECK-UNKNOWN: 25f8eff5 <unknown> |
| 185 |
|
| 186 |
dup z0.b, z0.b[0] |
| 187 |
// CHECK-INST: mov z0.b, b0 |
| 188 |
// CHECK-ENCODING: [0x00,0x20,0x21,0x05] |
| 189 |
// CHECK-ERROR: instruction requires: sve or sme |
| 190 |
// CHECK-UNKNOWN: 05212000 <unknown> |
| 191 |
|
| 192 |
dup z0.h, z0.h[0] |
| 193 |
// CHECK-INST: mov z0.h, h0 |
| 194 |
// CHECK-ENCODING: [0x00,0x20,0x22,0x05] |
| 195 |
// CHECK-ERROR: instruction requires: sve or sme |
| 196 |
// CHECK-UNKNOWN: 05222000 <unknown> |
| 197 |
|
| 198 |
dup z0.s, z0.s[0] |
| 199 |
// CHECK-INST: mov z0.s, s0 |
| 200 |
// CHECK-ENCODING: [0x00,0x20,0x24,0x05] |
| 201 |
// CHECK-ERROR: instruction requires: sve or sme |
| 202 |
// CHECK-UNKNOWN: 05242000 <unknown> |
| 203 |
|
| 204 |
dup z0.d, z0.d[0] |
| 205 |
// CHECK-INST: mov z0.d, d0 |
| 206 |
// CHECK-ENCODING: [0x00,0x20,0x28,0x05] |
| 207 |
// CHECK-ERROR: instruction requires: sve or sme |
| 208 |
// CHECK-UNKNOWN: 05282000 <unknown> |
| 209 |
|
| 210 |
dup z0.q, z0.q[0] |
| 211 |
// CHECK-INST: mov z0.q, q0 |
| 212 |
// CHECK-ENCODING: [0x00,0x20,0x30,0x05] |
| 213 |
// CHECK-ERROR: instruction requires: sve or sme |
| 214 |
// CHECK-UNKNOWN: 05302000 <unknown> |
| 215 |
|
| 216 |
dup z31.b, z31.b[63] |
| 217 |
// CHECK-INST: mov z31.b, z31.b[63] |
| 218 |
// CHECK-ENCODING: [0xff,0x23,0xff,0x05] |
| 219 |
// CHECK-ERROR: instruction requires: sve or sme |
| 220 |
// CHECK-UNKNOWN: 05ff23ff <unknown> |
| 221 |
|
| 222 |
dup z31.h, z31.h[31] |
| 223 |
// CHECK-INST: mov z31.h, z31.h[31] |
| 224 |
// CHECK-ENCODING: [0xff,0x23,0xfe,0x05] |
| 225 |
// CHECK-ERROR: instruction requires: sve or sme |
| 226 |
// CHECK-UNKNOWN: 05fe23ff <unknown> |
| 227 |
|
| 228 |
dup z31.s, z31.s[15] |
| 229 |
// CHECK-INST: mov z31.s, z31.s[15] |
| 230 |
// CHECK-ENCODING: [0xff,0x23,0xfc,0x05] |
| 231 |
// CHECK-ERROR: instruction requires: sve or sme |
| 232 |
// CHECK-UNKNOWN: 05fc23ff <unknown> |
| 233 |
|
| 234 |
dup z31.d, z31.d[7] |
| 235 |
// CHECK-INST: mov z31.d, z31.d[7] |
| 236 |
// CHECK-ENCODING: [0xff,0x23,0xf8,0x05] |
| 237 |
// CHECK-ERROR: instruction requires: sve or sme |
| 238 |
// CHECK-UNKNOWN: 05f823ff <unknown> |
| 239 |
|
| 240 |
dup z5.q, z17.q[3] |
| 241 |
// CHECK-INST: mov z5.q, z17.q[3] |
| 242 |
// CHECK-ENCODING: [0x25,0x22,0xf0,0x05] |
| 243 |
// CHECK-ERROR: instruction requires: sve or sme |
| 244 |
// CHECK-UNKNOWN: 05f02225 <unknown> |
| 245 |
|
| 246 |
// --------------------------------------------------------------------------// |
| 247 |
// Tests where the negative immediate is in bounds when interpreted |
| 248 |
// as the element type. |
| 249 |
|
| 250 |
dup z0.b, #-129 |
| 251 |
// CHECK-INST: mov z0.b, #127 |
| 252 |
// CHECK-ENCODING: [0xe0,0xcf,0x38,0x25] |
| 253 |
// CHECK-ERROR: instruction requires: sve or sme |
| 254 |
// CHECK-UNKNOWN: 2538cfe0 <unknown> |
| 255 |
|
| 256 |
dup z0.h, #-33024 |
| 257 |
// CHECK-INST: mov z0.h, #32512 |
| 258 |
// CHECK-ENCODING: [0xe0,0xef,0x78,0x25] |
| 259 |
// CHECK-ERROR: instruction requires: sve or sme |
| 260 |
// CHECK-UNKNOWN: 2578efe0 <unknown> |
| 261 |
|
| 262 |
dup z0.h, #-129, lsl #8 |
| 263 |
// CHECK-INST: mov z0.h, #32512 |
| 264 |
// CHECK-ENCODING: [0xe0,0xef,0x78,0x25] |
| 265 |
// CHECK-ERROR: instruction requires: sve or sme |
| 266 |
// CHECK-UNKNOWN: 2578efe0 <unknown> |