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 dup z0.b, w0 11 // CHECK-INST: mov z0.b, w0 12 // CHECK-ENCODING: [0x00,0x38,0x20,0x05] 13 // CHECK-ERROR: instruction requires: sve 14 // CHECK-UNKNOWN: 00 38 20 05 <unknown> 15 16 dup z0.h, w0 17 // CHECK-INST: mov z0.h, w0 18 // CHECK-ENCODING: [0x00,0x38,0x60,0x05] 19 // CHECK-ERROR: instruction requires: sve 20 // CHECK-UNKNOWN: 00 38 60 05 <unknown> 21 22 dup z0.s, w0 23 // CHECK-INST: mov z0.s, w0 24 // CHECK-ENCODING: [0x00,0x38,0xa0,0x05] 25 // CHECK-ERROR: instruction requires: sve 26 // CHECK-UNKNOWN: 00 38 a0 05 <unknown> 27 28 dup z0.d, x0 29 // CHECK-INST: mov z0.d, x0 30 // CHECK-ENCODING: [0x00,0x38,0xe0,0x05] 31 // CHECK-ERROR: instruction requires: sve 32 // CHECK-UNKNOWN: 00 38 e0 05 <unknown> 33 34 dup z31.h, wsp 35 // CHECK-INST: mov z31.h, wsp 36 // CHECK-ENCODING: [0xff,0x3b,0x60,0x05] 37 // CHECK-ERROR: instruction requires: sve 38 // CHECK-UNKNOWN: ff 3b 60 05 <unknown> 39 40 dup z31.s, wsp 41 // CHECK-INST: mov z31.s, wsp 42 // CHECK-ENCODING: [0xff,0x3b,0xa0,0x05] 43 // CHECK-ERROR: instruction requires: sve 44 // CHECK-UNKNOWN: ff 3b a0 05 <unknown> 45 46 dup z31.d, sp 47 // CHECK-INST: mov z31.d, sp 48 // CHECK-ENCODING: [0xff,0x3b,0xe0,0x05] 49 // CHECK-ERROR: instruction requires: sve 50 // CHECK-UNKNOWN: ff 3b e0 05 <unknown> 51 52 dup z31.b, wsp 53 // CHECK-INST: mov z31.b, wsp 54 // CHECK-ENCODING: [0xff,0x3b,0x20,0x05] 55 // CHECK-ERROR: instruction requires: sve 56 // CHECK-UNKNOWN: ff 3b 20 05 <unknown> 57 58 dup z5.b, #-128 59 // CHECK-INST: mov z5.b, #-128 60 // CHECK-ENCODING: [0x05,0xd0,0x38,0x25] 61 // CHECK-ERROR: instruction requires: sve 62 // CHECK-UNKNOWN: 05 d0 38 25 <unknown> 63 64 dup z5.b, #127 65 // CHECK-INST: mov z5.b, #127 66 // CHECK-ENCODING: [0xe5,0xcf,0x38,0x25] 67 // CHECK-ERROR: instruction requires: sve 68 // CHECK-UNKNOWN: e5 cf 38 25 <unknown> 69 70 dup z5.b, #255 71 // CHECK-INST: mov z5.b, #-1 72 // CHECK-ENCODING: [0xe5,0xdf,0x38,0x25] 73 // CHECK-ERROR: instruction requires: sve 74 // CHECK-UNKNOWN: e5 df 38 25 <unknown> 75 76 dup z21.h, #-128 77 // CHECK-INST: mov z21.h, #-128 78 // CHECK-ENCODING: [0x15,0xd0,0x78,0x25] 79 // CHECK-ERROR: instruction requires: sve 80 // CHECK-UNKNOWN: 15 d0 78 25 <unknown> 81 82 dup z21.h, #-128, lsl #8 83 // CHECK-INST: mov z21.h, #-32768 84 // CHECK-ENCODING: [0x15,0xf0,0x78,0x25] 85 // CHECK-ERROR: instruction requires: sve 86 // CHECK-UNKNOWN: 15 f0 78 25 <unknown> 87 88 dup z21.h, #-32768 89 // CHECK-INST: mov z21.h, #-32768 90 // CHECK-ENCODING: [0x15,0xf0,0x78,0x25] 91 // CHECK-ERROR: instruction requires: sve 92 // CHECK-UNKNOWN: 15 f0 78 25 <unknown> 93 94 dup z21.h, #127 95 // CHECK-INST: mov z21.h, #127 96 // CHECK-ENCODING: [0xf5,0xcf,0x78,0x25] 97 // CHECK-ERROR: instruction requires: sve 98 // CHECK-UNKNOWN: f5 cf 78 25 <unknown> 99 100 dup z21.h, #127, lsl #8 101 // CHECK-INST: mov z21.h, #32512 102 // CHECK-ENCODING: [0xf5,0xef,0x78,0x25] 103 // CHECK-ERROR: instruction requires: sve 104 // CHECK-UNKNOWN: f5 ef 78 25 <unknown> 105 106 dup z21.h, #32512 107 // CHECK-INST: mov z21.h, #32512 108 // CHECK-ENCODING: [0xf5,0xef,0x78,0x25] 109 // CHECK-ERROR: instruction requires: sve 110 // CHECK-UNKNOWN: f5 ef 78 25 <unknown> 111 112 dup z21.s, #-128 113 // CHECK-INST: mov z21.s, #-128 114 // CHECK-ENCODING: [0x15,0xd0,0xb8,0x25] 115 // CHECK-ERROR: instruction requires: sve 116 // CHECK-UNKNOWN: 15 d0 b8 25 <unknown> 117 118 dup z21.s, #-128, lsl #8 119 // CHECK-INST: mov z21.s, #-32768 120 // CHECK-ENCODING: [0x15,0xf0,0xb8,0x25] 121 // CHECK-ERROR: instruction requires: sve 122 // CHECK-UNKNOWN: 15 f0 b8 25 <unknown> 123 124 dup z21.s, #-32768 125 // CHECK-INST: mov z21.s, #-32768 126 // CHECK-ENCODING: [0x15,0xf0,0xb8,0x25] 127 // CHECK-ERROR: instruction requires: sve 128 // CHECK-UNKNOWN: 15 f0 b8 25 <unknown> 129 130 dup z21.s, #127 131 // CHECK-INST: mov z21.s, #127 132 // CHECK-ENCODING: [0xf5,0xcf,0xb8,0x25] 133 // CHECK-ERROR: instruction requires: sve 134 // CHECK-UNKNOWN: f5 cf b8 25 <unknown> 135 136 dup z21.s, #127, lsl #8 137 // CHECK-INST: mov z21.s, #32512 138 // CHECK-ENCODING: [0xf5,0xef,0xb8,0x25] 139 // CHECK-ERROR: instruction requires: sve 140 // CHECK-UNKNOWN: f5 ef b8 25 <unknown> 141 142 dup z21.s, #32512 143 // CHECK-INST: mov z21.s, #32512 144 // CHECK-ENCODING: [0xf5,0xef,0xb8,0x25] 145 // CHECK-ERROR: instruction requires: sve 146 // CHECK-UNKNOWN: f5 ef b8 25 <unknown> 147 148 dup z21.d, #-128 149 // CHECK-INST: mov z21.d, #-128 150 // CHECK-ENCODING: [0x15,0xd0,0xf8,0x25] 151 // CHECK-ERROR: instruction requires: sve 152 // CHECK-UNKNOWN: 15 d0 f8 25 <unknown> 153 154 dup z21.d, #-128, lsl #8 155 // CHECK-INST: mov z21.d, #-32768 156 // CHECK-ENCODING: [0x15,0xf0,0xf8,0x25] 157 // CHECK-ERROR: instruction requires: sve 158 // CHECK-UNKNOWN: 15 f0 f8 25 <unknown> 159 160 dup z21.d, #-32768 161 // CHECK-INST: mov z21.d, #-32768 162 // CHECK-ENCODING: [0x15,0xf0,0xf8,0x25] 163 // CHECK-ERROR: instruction requires: sve 164 // CHECK-UNKNOWN: 15 f0 f8 25 <unknown> 165 166 dup z21.d, #127 167 // CHECK-INST: mov z21.d, #127 168 // CHECK-ENCODING: [0xf5,0xcf,0xf8,0x25] 169 // CHECK-ERROR: instruction requires: sve 170 // CHECK-UNKNOWN: f5 cf f8 25 <unknown> 171 172 dup z21.d, #127, lsl #8 173 // CHECK-INST: mov z21.d, #32512 174 // CHECK-ENCODING: [0xf5,0xef,0xf8,0x25] 175 // CHECK-ERROR: instruction requires: sve 176 // CHECK-UNKNOWN: f5 ef f8 25 <unknown> 177 178 dup z21.d, #32512 179 // CHECK-INST: mov z21.d, #32512 180 // CHECK-ENCODING: [0xf5,0xef,0xf8,0x25] 181 // CHECK-ERROR: instruction requires: sve 182 // CHECK-UNKNOWN: f5 ef f8 25 <unknown> 183 184 dup z0.b, z0.b[0] 185 // CHECK-INST: mov z0.b, b0 186 // CHECK-ENCODING: [0x00,0x20,0x21,0x05] 187 // CHECK-ERROR: instruction requires: sve 188 // CHECK-UNKNOWN: 00 20 21 05 <unknown> 189 190 dup z0.h, z0.h[0] 191 // CHECK-INST: mov z0.h, h0 192 // CHECK-ENCODING: [0x00,0x20,0x22,0x05] 193 // CHECK-ERROR: instruction requires: sve 194 // CHECK-UNKNOWN: 00 20 22 05 <unknown> 195 196 dup z0.s, z0.s[0] 197 // CHECK-INST: mov z0.s, s0 198 // CHECK-ENCODING: [0x00,0x20,0x24,0x05] 199 // CHECK-ERROR: instruction requires: sve 200 // CHECK-UNKNOWN: 00 20 24 05 <unknown> 201 202 dup z0.d, z0.d[0] 203 // CHECK-INST: mov z0.d, d0 204 // CHECK-ENCODING: [0x00,0x20,0x28,0x05] 205 // CHECK-ERROR: instruction requires: sve 206 // CHECK-UNKNOWN: 00 20 28 05 <unknown> 207 208 dup z0.q, z0.q[0] 209 // CHECK-INST: mov z0.q, q0 210 // CHECK-ENCODING: [0x00,0x20,0x30,0x05] 211 // CHECK-ERROR: instruction requires: sve 212 // CHECK-UNKNOWN: 00 20 30 05 <unknown> 213 214 dup z31.b, z31.b[63] 215 // CHECK-INST: mov z31.b, z31.b[63] 216 // CHECK-ENCODING: [0xff,0x23,0xff,0x05] 217 // CHECK-ERROR: instruction requires: sve 218 // CHECK-UNKNOWN: ff 23 ff 05 <unknown> 219 220 dup z31.h, z31.h[31] 221 // CHECK-INST: mov z31.h, z31.h[31] 222 // CHECK-ENCODING: [0xff,0x23,0xfe,0x05] 223 // CHECK-ERROR: instruction requires: sve 224 // CHECK-UNKNOWN: ff 23 fe 05 <unknown> 225 226 dup z31.s, z31.s[15] 227 // CHECK-INST: mov z31.s, z31.s[15] 228 // CHECK-ENCODING: [0xff,0x23,0xfc,0x05] 229 // CHECK-ERROR: instruction requires: sve 230 // CHECK-UNKNOWN: ff 23 fc 05 <unknown> 231 232 dup z31.d, z31.d[7] 233 // CHECK-INST: mov z31.d, z31.d[7] 234 // CHECK-ENCODING: [0xff,0x23,0xf8,0x05] 235 // CHECK-ERROR: instruction requires: sve 236 // CHECK-UNKNOWN: ff 23 f8 05 <unknown> 237 238 dup z5.q, z17.q[3] 239 // CHECK-INST: mov z5.q, z17.q[3] 240 // CHECK-ENCODING: [0x25,0x22,0xf0,0x05] 241 // CHECK-ERROR: instruction requires: sve 242 // CHECK-UNKNOWN: 25 22 f0 05 <unknown> 243