1// RUN: llvm-mc -triple=arm64 -mattr=+neon -show-encoding < %s | FileCheck %s 2 3// Check that the assembler can handle the documented syntax for AArch64 4 5 6//------------------------------------------------------------------------------ 7// Element reverse 8//------------------------------------------------------------------------------ 9 rev64 v0.16b, v31.16b 10 rev64 v2.8h, v4.8h 11 rev64 v6.4s, v8.4s 12 rev64 v1.8b, v9.8b 13 rev64 v13.4h, v21.4h 14 rev64 v4.2s, v0.2s 15 16// CHECK: rev64 v0.16b, v31.16b // encoding: [0xe0,0x0b,0x20,0x4e] 17// CHECK: rev64 v2.8h, v4.8h // encoding: [0x82,0x08,0x60,0x4e] 18// CHECK: rev64 v6.4s, v8.4s // encoding: [0x06,0x09,0xa0,0x4e] 19// CHECK: rev64 v1.8b, v9.8b // encoding: [0x21,0x09,0x20,0x0e] 20// CHECK: rev64 v13.4h, v21.4h // encoding: [0xad,0x0a,0x60,0x0e] 21// CHECK: rev64 v4.2s, v0.2s // encoding: [0x04,0x08,0xa0,0x0e] 22 23 rev32 v30.16b, v31.16b 24 rev32 v4.8h, v7.8h 25 rev32 v21.8b, v1.8b 26 rev32 v0.4h, v9.4h 27 28// CHECK: rev32 v30.16b, v31.16b // encoding: [0xfe,0x0b,0x20,0x6e] 29// CHECK: rev32 v4.8h, v7.8h // encoding: [0xe4,0x08,0x60,0x6e] 30// CHECK: rev32 v21.8b, v1.8b // encoding: [0x35,0x08,0x20,0x2e] 31// CHECK: rev32 v0.4h, v9.4h // encoding: [0x20,0x09,0x60,0x2e] 32 33 rev16 v30.16b, v31.16b 34 rev16 v21.8b, v1.8b 35 36// CHECK: rev16 v30.16b, v31.16b // encoding: [0xfe,0x1b,0x20,0x4e] 37// CHECK: rev16 v21.8b, v1.8b // encoding: [0x35,0x18,0x20,0x0e] 38 39//------------------------------------------------------------------------------ 40// Signed integer pairwise add long 41//------------------------------------------------------------------------------ 42 43 saddlp v3.8h, v21.16b 44 saddlp v8.4h, v5.8b 45 saddlp v9.4s, v1.8h 46 saddlp v0.2s, v1.4h 47 saddlp v12.2d, v4.4s 48 saddlp v17.1d, v28.2s 49 50// CHECK: saddlp v3.8h, v21.16b // encoding: [0xa3,0x2a,0x20,0x4e] 51// CHECK: saddlp v8.4h, v5.8b // encoding: [0xa8,0x28,0x20,0x0e] 52// CHECK: saddlp v9.4s, v1.8h // encoding: [0x29,0x28,0x60,0x4e] 53// CHECK: saddlp v0.2s, v1.4h // encoding: [0x20,0x28,0x60,0x0e] 54// CHECK: saddlp v12.2d, v4.4s // encoding: [0x8c,0x28,0xa0,0x4e] 55// CHECK: saddlp v17.1d, v28.2s // encoding: [0x91,0x2b,0xa0,0x0e] 56 57//------------------------------------------------------------------------------ 58// Unsigned integer pairwise add long 59//------------------------------------------------------------------------------ 60 61 uaddlp v3.8h, v21.16b 62 uaddlp v8.4h, v5.8b 63 uaddlp v9.4s, v1.8h 64 uaddlp v0.2s, v1.4h 65 uaddlp v12.2d, v4.4s 66 uaddlp v17.1d, v28.2s 67 68// CHECK: uaddlp v3.8h, v21.16b // encoding: [0xa3,0x2a,0x20,0x6e] 69// CHECK: uaddlp v8.4h, v5.8b // encoding: [0xa8,0x28,0x20,0x2e] 70// CHECK: uaddlp v9.4s, v1.8h // encoding: [0x29,0x28,0x60,0x6e] 71// CHECK: uaddlp v0.2s, v1.4h // encoding: [0x20,0x28,0x60,0x2e] 72// CHECK: uaddlp v12.2d, v4.4s // encoding: [0x8c,0x28,0xa0,0x6e] 73// CHECK: uaddlp v17.1d, v28.2s // encoding: [0x91,0x2b,0xa0,0x2e] 74 75//------------------------------------------------------------------------------ 76// Signed integer pairwise add and accumulate long 77//------------------------------------------------------------------------------ 78 79 sadalp v3.8h, v21.16b 80 sadalp v8.4h, v5.8b 81 sadalp v9.4s, v1.8h 82 sadalp v0.2s, v1.4h 83 sadalp v12.2d, v4.4s 84 sadalp v17.1d, v28.2s 85 86// CHECK: sadalp v3.8h, v21.16b // encoding: [0xa3,0x6a,0x20,0x4e] 87// CHECK: sadalp v8.4h, v5.8b // encoding: [0xa8,0x68,0x20,0x0e] 88// CHECK: sadalp v9.4s, v1.8h // encoding: [0x29,0x68,0x60,0x4e] 89// CHECK: sadalp v0.2s, v1.4h // encoding: [0x20,0x68,0x60,0x0e] 90// CHECK: sadalp v12.2d, v4.4s // encoding: [0x8c,0x68,0xa0,0x4e] 91// CHECK: sadalp v17.1d, v28.2s // encoding: [0x91,0x6b,0xa0,0x0e] 92 93//------------------------------------------------------------------------------ 94// Unsigned integer pairwise add and accumulate long 95//------------------------------------------------------------------------------ 96 97 uadalp v3.8h, v21.16b 98 uadalp v8.4h, v5.8b 99 uadalp v9.4s, v1.8h 100 uadalp v0.2s, v1.4h 101 uadalp v12.2d, v4.4s 102 uadalp v17.1d, v28.2s 103 104// CHECK: uadalp v3.8h, v21.16b // encoding: [0xa3,0x6a,0x20,0x6e] 105// CHECK: uadalp v8.4h, v5.8b // encoding: [0xa8,0x68,0x20,0x2e] 106// CHECK: uadalp v9.4s, v1.8h // encoding: [0x29,0x68,0x60,0x6e] 107// CHECK: uadalp v0.2s, v1.4h // encoding: [0x20,0x68,0x60,0x2e] 108// CHECK: uadalp v12.2d, v4.4s // encoding: [0x8c,0x68,0xa0,0x6e] 109// CHECK: uadalp v17.1d, v28.2s // encoding: [0x91,0x6b,0xa0,0x2e] 110 111//------------------------------------------------------------------------------ 112// Signed integer saturating accumulate of unsigned value 113//------------------------------------------------------------------------------ 114 115 suqadd v0.16b, v31.16b 116 suqadd v2.8h, v4.8h 117 suqadd v6.4s, v8.4s 118 suqadd v6.2d, v8.2d 119 suqadd v1.8b, v9.8b 120 suqadd v13.4h, v21.4h 121 suqadd v4.2s, v0.2s 122 123// CHECK: suqadd v0.16b, v31.16b // encoding: [0xe0,0x3b,0x20,0x4e] 124// CHECK: suqadd v2.8h, v4.8h // encoding: [0x82,0x38,0x60,0x4e] 125// CHECK: suqadd v6.4s, v8.4s // encoding: [0x06,0x39,0xa0,0x4e] 126// CHECK: suqadd v6.2d, v8.2d // encoding: [0x06,0x39,0xe0,0x4e] 127// CHECK: suqadd v1.8b, v9.8b // encoding: [0x21,0x39,0x20,0x0e] 128// CHECK: suqadd v13.4h, v21.4h // encoding: [0xad,0x3a,0x60,0x0e] 129// CHECK: suqadd v4.2s, v0.2s // encoding: [0x04,0x38,0xa0,0x0e] 130 131//------------------------------------------------------------------------------ 132// Unsigned integer saturating accumulate of signed value 133//------------------------------------------------------------------------------ 134 135 usqadd v0.16b, v31.16b 136 usqadd v2.8h, v4.8h 137 usqadd v6.4s, v8.4s 138 usqadd v6.2d, v8.2d 139 usqadd v1.8b, v9.8b 140 usqadd v13.4h, v21.4h 141 usqadd v4.2s, v0.2s 142 143// CHECK: usqadd v0.16b, v31.16b // encoding: [0xe0,0x3b,0x20,0x6e] 144// CHECK: usqadd v2.8h, v4.8h // encoding: [0x82,0x38,0x60,0x6e] 145// CHECK: usqadd v6.4s, v8.4s // encoding: [0x06,0x39,0xa0,0x6e] 146// CHECK: usqadd v6.2d, v8.2d // encoding: [0x06,0x39,0xe0,0x6e] 147// CHECK: usqadd v1.8b, v9.8b // encoding: [0x21,0x39,0x20,0x2e] 148// CHECK: usqadd v13.4h, v21.4h // encoding: [0xad,0x3a,0x60,0x2e] 149// CHECK: usqadd v4.2s, v0.2s // encoding: [0x04,0x38,0xa0,0x2e] 150 151//------------------------------------------------------------------------------ 152// Integer saturating absolute 153//------------------------------------------------------------------------------ 154 155 sqabs v0.16b, v31.16b 156 sqabs v2.8h, v4.8h 157 sqabs v6.4s, v8.4s 158 sqabs v6.2d, v8.2d 159 sqabs v1.8b, v9.8b 160 sqabs v13.4h, v21.4h 161 sqabs v4.2s, v0.2s 162 163// CHECK: sqabs v0.16b, v31.16b // encoding: [0xe0,0x7b,0x20,0x4e] 164// CHECK: sqabs v2.8h, v4.8h // encoding: [0x82,0x78,0x60,0x4e] 165// CHECK: sqabs v6.4s, v8.4s // encoding: [0x06,0x79,0xa0,0x4e] 166// CHECK: sqabs v6.2d, v8.2d // encoding: [0x06,0x79,0xe0,0x4e] 167// CHECK: sqabs v1.8b, v9.8b // encoding: [0x21,0x79,0x20,0x0e] 168// CHECK: sqabs v13.4h, v21.4h // encoding: [0xad,0x7a,0x60,0x0e] 169// CHECK: sqabs v4.2s, v0.2s // encoding: [0x04,0x78,0xa0,0x0e] 170 171//------------------------------------------------------------------------------ 172// Signed integer saturating negate 173//------------------------------------------------------------------------------ 174 175 sqneg v0.16b, v31.16b 176 sqneg v2.8h, v4.8h 177 sqneg v6.4s, v8.4s 178 sqneg v6.2d, v8.2d 179 sqneg v1.8b, v9.8b 180 sqneg v13.4h, v21.4h 181 sqneg v4.2s, v0.2s 182 183// CHECK: sqneg v0.16b, v31.16b // encoding: [0xe0,0x7b,0x20,0x6e] 184// CHECK: sqneg v2.8h, v4.8h // encoding: [0x82,0x78,0x60,0x6e] 185// CHECK: sqneg v6.4s, v8.4s // encoding: [0x06,0x79,0xa0,0x6e] 186// CHECK: sqneg v6.2d, v8.2d // encoding: [0x06,0x79,0xe0,0x6e] 187// CHECK: sqneg v1.8b, v9.8b // encoding: [0x21,0x79,0x20,0x2e] 188// CHECK: sqneg v13.4h, v21.4h // encoding: [0xad,0x7a,0x60,0x2e] 189// CHECK: sqneg v4.2s, v0.2s // encoding: [0x04,0x78,0xa0,0x2e] 190 191//------------------------------------------------------------------------------ 192// Integer absolute 193//------------------------------------------------------------------------------ 194 195 abs v0.16b, v31.16b 196 abs v2.8h, v4.8h 197 abs v6.4s, v8.4s 198 abs v6.2d, v8.2d 199 abs v1.8b, v9.8b 200 abs v13.4h, v21.4h 201 abs v4.2s, v0.2s 202 203// CHECK: abs v0.16b, v31.16b // encoding: [0xe0,0xbb,0x20,0x4e] 204// CHECK: abs v2.8h, v4.8h // encoding: [0x82,0xb8,0x60,0x4e] 205// CHECK: abs v6.4s, v8.4s // encoding: [0x06,0xb9,0xa0,0x4e] 206// CHECK: abs v6.2d, v8.2d // encoding: [0x06,0xb9,0xe0,0x4e] 207// CHECK: abs v1.8b, v9.8b // encoding: [0x21,0xb9,0x20,0x0e] 208// CHECK: abs v13.4h, v21.4h // encoding: [0xad,0xba,0x60,0x0e] 209// CHECK: abs v4.2s, v0.2s // encoding: [0x04,0xb8,0xa0,0x0e] 210 211//------------------------------------------------------------------------------ 212// Integer negate 213//------------------------------------------------------------------------------ 214 215 neg v0.16b, v31.16b 216 neg v2.8h, v4.8h 217 neg v6.4s, v8.4s 218 neg v6.2d, v8.2d 219 neg v1.8b, v9.8b 220 neg v13.4h, v21.4h 221 neg v4.2s, v0.2s 222 223// CHECK: neg v0.16b, v31.16b // encoding: [0xe0,0xbb,0x20,0x6e] 224// CHECK: neg v2.8h, v4.8h // encoding: [0x82,0xb8,0x60,0x6e] 225// CHECK: neg v6.4s, v8.4s // encoding: [0x06,0xb9,0xa0,0x6e] 226// CHECK: neg v6.2d, v8.2d // encoding: [0x06,0xb9,0xe0,0x6e] 227// CHECK: neg v1.8b, v9.8b // encoding: [0x21,0xb9,0x20,0x2e] 228// CHECK: neg v13.4h, v21.4h // encoding: [0xad,0xba,0x60,0x2e] 229// CHECK: neg v4.2s, v0.2s // encoding: [0x04,0xb8,0xa0,0x2e] 230 231//------------------------------------------------------------------------------ 232// Integer count leading sign bits 233//------------------------------------------------------------------------------ 234 235 cls v0.16b, v31.16b 236 cls v2.8h, v4.8h 237 cls v6.4s, v8.4s 238 cls v1.8b, v9.8b 239 cls v13.4h, v21.4h 240 cls v4.2s, v0.2s 241 242// CHECK: cls v0.16b, v31.16b // encoding: [0xe0,0x4b,0x20,0x4e] 243// CHECK: cls v2.8h, v4.8h // encoding: [0x82,0x48,0x60,0x4e] 244// CHECK: cls v6.4s, v8.4s // encoding: [0x06,0x49,0xa0,0x4e] 245// CHECK: cls v1.8b, v9.8b // encoding: [0x21,0x49,0x20,0x0e] 246// CHECK: cls v13.4h, v21.4h // encoding: [0xad,0x4a,0x60,0x0e] 247// CHECK: cls v4.2s, v0.2s // encoding: [0x04,0x48,0xa0,0x0e] 248 249//------------------------------------------------------------------------------ 250// Integer count leading zeros 251//------------------------------------------------------------------------------ 252 253 clz v0.16b, v31.16b 254 clz v2.8h, v4.8h 255 clz v6.4s, v8.4s 256 clz v1.8b, v9.8b 257 clz v13.4h, v21.4h 258 clz v4.2s, v0.2s 259 260// CHECK: clz v0.16b, v31.16b // encoding: [0xe0,0x4b,0x20,0x6e] 261// CHECK: clz v2.8h, v4.8h // encoding: [0x82,0x48,0x60,0x6e] 262// CHECK: clz v6.4s, v8.4s // encoding: [0x06,0x49,0xa0,0x6e] 263// CHECK: clz v1.8b, v9.8b // encoding: [0x21,0x49,0x20,0x2e] 264// CHECK: clz v13.4h, v21.4h // encoding: [0xad,0x4a,0x60,0x2e] 265// CHECK: clz v4.2s, v0.2s // encoding: [0x04,0x48,0xa0,0x2e] 266 267//------------------------------------------------------------------------------ 268// Population count 269//------------------------------------------------------------------------------ 270 271 cnt v0.16b, v31.16b 272 cnt v1.8b, v9.8b 273 274// CHECK: cnt v0.16b, v31.16b // encoding: [0xe0,0x5b,0x20,0x4e] 275// CHECK: cnt v1.8b, v9.8b // encoding: [0x21,0x59,0x20,0x0e] 276 277//------------------------------------------------------------------------------ 278// Bitwise NOT 279//------------------------------------------------------------------------------ 280 281 not v0.16b, v31.16b 282 not v1.8b, v9.8b 283 284// CHECK: {{mvn|not}} v0.16b, v31.16b // encoding: [0xe0,0x5b,0x20,0x6e] 285// CHECK: {{mvn|not}} v1.8b, v9.8b // encoding: [0x21,0x59,0x20,0x2e] 286 287//------------------------------------------------------------------------------ 288// Bitwise reverse 289//------------------------------------------------------------------------------ 290 291 rbit v0.16b, v31.16b 292 rbit v1.8b, v9.8b 293 294// CHECK: rbit v0.16b, v31.16b // encoding: [0xe0,0x5b,0x60,0x6e] 295// CHECK: rbit v1.8b, v9.8b // encoding: [0x21,0x59,0x60,0x2e] 296 297//------------------------------------------------------------------------------ 298// Floating-point absolute 299//------------------------------------------------------------------------------ 300 301 fabs v6.4s, v8.4s 302 fabs v6.2d, v8.2d 303 fabs v4.2s, v0.2s 304 305// CHECK: fabs v6.4s, v8.4s // encoding: [0x06,0xf9,0xa0,0x4e] 306// CHECK: fabs v6.2d, v8.2d // encoding: [0x06,0xf9,0xe0,0x4e] 307// CHECK: fabs v4.2s, v0.2s // encoding: [0x04,0xf8,0xa0,0x0e] 308 309//------------------------------------------------------------------------------ 310// Floating-point negate 311//------------------------------------------------------------------------------ 312 313 fneg v6.4s, v8.4s 314 fneg v6.2d, v8.2d 315 fneg v4.2s, v0.2s 316 317// CHECK: fneg v6.4s, v8.4s // encoding: [0x06,0xf9,0xa0,0x6e] 318// CHECK: fneg v6.2d, v8.2d // encoding: [0x06,0xf9,0xe0,0x6e] 319// CHECK: fneg v4.2s, v0.2s // encoding: [0x04,0xf8,0xa0,0x2e] 320 321//------------------------------------------------------------------------------ 322// Integer extract and narrow 323//------------------------------------------------------------------------------ 324 325 xtn2 v0.16b, v31.8h 326 xtn2 v2.8h, v4.4s 327 xtn2 v6.4s, v8.2d 328 xtn v1.8b, v9.8h 329 xtn v13.4h, v21.4s 330 xtn v4.2s, v0.2d 331 332// CHECK: xtn2 v0.16b, v31.8h // encoding: [0xe0,0x2b,0x21,0x4e] 333// CHECK: xtn2 v2.8h, v4.4s // encoding: [0x82,0x28,0x61,0x4e] 334// CHECK: xtn2 v6.4s, v8.2d // encoding: [0x06,0x29,0xa1,0x4e] 335// CHECK: xtn v1.8b, v9.8h // encoding: [0x21,0x29,0x21,0x0e] 336// CHECK: xtn v13.4h, v21.4s // encoding: [0xad,0x2a,0x61,0x0e] 337// CHECK: xtn v4.2s, v0.2d // encoding: [0x04,0x28,0xa1,0x0e] 338 339//------------------------------------------------------------------------------ 340// Signed integer saturating extract and unsigned narrow 341//------------------------------------------------------------------------------ 342 343 sqxtun2 v0.16b, v31.8h 344 sqxtun2 v2.8h, v4.4s 345 sqxtun2 v6.4s, v8.2d 346 sqxtun v1.8b, v9.8h 347 sqxtun v13.4h, v21.4s 348 sqxtun v4.2s, v0.2d 349 350// CHECK: sqxtun2 v0.16b, v31.8h // encoding: [0xe0,0x2b,0x21,0x6e] 351// CHECK: sqxtun2 v2.8h, v4.4s // encoding: [0x82,0x28,0x61,0x6e] 352// CHECK: sqxtun2 v6.4s, v8.2d // encoding: [0x06,0x29,0xa1,0x6e] 353// CHECK: sqxtun v1.8b, v9.8h // encoding: [0x21,0x29,0x21,0x2e] 354// CHECK: sqxtun v13.4h, v21.4s // encoding: [0xad,0x2a,0x61,0x2e] 355// CHECK: sqxtun v4.2s, v0.2d // encoding: [0x04,0x28,0xa1,0x2e] 356 357//------------------------------------------------------------------------------ 358// Signed integer saturating extract and narrow 359//------------------------------------------------------------------------------ 360 361 sqxtn2 v0.16b, v31.8h 362 sqxtn2 v2.8h, v4.4s 363 sqxtn2 v6.4s, v8.2d 364 sqxtn v1.8b, v9.8h 365 sqxtn v13.4h, v21.4s 366 sqxtn v4.2s, v0.2d 367 368// CHECK: sqxtn2 v0.16b, v31.8h // encoding: [0xe0,0x4b,0x21,0x4e] 369// CHECK: sqxtn2 v2.8h, v4.4s // encoding: [0x82,0x48,0x61,0x4e] 370// CHECK: sqxtn2 v6.4s, v8.2d // encoding: [0x06,0x49,0xa1,0x4e] 371// CHECK: sqxtn v1.8b, v9.8h // encoding: [0x21,0x49,0x21,0x0e] 372// CHECK: sqxtn v13.4h, v21.4s // encoding: [0xad,0x4a,0x61,0x0e] 373// CHECK: sqxtn v4.2s, v0.2d // encoding: [0x04,0x48,0xa1,0x0e] 374 375//------------------------------------------------------------------------------ 376// Unsigned integer saturating extract and narrow 377//------------------------------------------------------------------------------ 378 379 uqxtn2 v0.16b, v31.8h 380 uqxtn2 v2.8h, v4.4s 381 uqxtn2 v6.4s, v8.2d 382 uqxtn v1.8b, v9.8h 383 uqxtn v13.4h, v21.4s 384 uqxtn v4.2s, v0.2d 385 386// CHECK: uqxtn2 v0.16b, v31.8h // encoding: [0xe0,0x4b,0x21,0x6e] 387// CHECK: uqxtn2 v2.8h, v4.4s // encoding: [0x82,0x48,0x61,0x6e] 388// CHECK: uqxtn2 v6.4s, v8.2d // encoding: [0x06,0x49,0xa1,0x6e] 389// CHECK: uqxtn v1.8b, v9.8h // encoding: [0x21,0x49,0x21,0x2e] 390// CHECK: uqxtn v13.4h, v21.4s // encoding: [0xad,0x4a,0x61,0x2e] 391// CHECK: uqxtn v4.2s, v0.2d // encoding: [0x04,0x48,0xa1,0x2e] 392 393//------------------------------------------------------------------------------ 394// Integer shift left long 395//------------------------------------------------------------------------------ 396 397 shll2 v2.8h, v4.16b, #8 398 shll2 v6.4s, v8.8h, #16 399 shll2 v6.2d, v8.4s, #32 400 shll v2.8h, v4.8b, #8 401 shll v6.4s, v8.4h, #16 402 shll v6.2d, v8.2s, #32 403 404// CHECK: shll2 v2.8h, v4.16b, #8 // encoding: [0x82,0x38,0x21,0x6e] 405// CHECK: shll2 v6.4s, v8.8h, #16 // encoding: [0x06,0x39,0x61,0x6e] 406// CHECK: shll2 v6.2d, v8.4s, #32 // encoding: [0x06,0x39,0xa1,0x6e] 407// CHECK: shll v2.8h, v4.8b, #8 // encoding: [0x82,0x38,0x21,0x2e] 408// CHECK: shll v6.4s, v8.4h, #16 // encoding: [0x06,0x39,0x61,0x2e] 409// CHECK: shll v6.2d, v8.2s, #32 // encoding: [0x06,0x39,0xa1,0x2e] 410 411//------------------------------------------------------------------------------ 412// Floating-point convert downsize 413//------------------------------------------------------------------------------ 414 415 fcvtn2 v2.8h, v4.4s 416 fcvtn2 v6.4s, v8.2d 417 fcvtn v13.4h, v21.4s 418 fcvtn v4.2s, v0.2d 419 420// CHECK: fcvtn2 v2.8h, v4.4s // encoding: [0x82,0x68,0x21,0x4e] 421// CHECK: fcvtn2 v6.4s, v8.2d // encoding: [0x06,0x69,0x61,0x4e] 422// CHECK: fcvtn v13.4h, v21.4s // encoding: [0xad,0x6a,0x21,0x0e] 423// CHECK: fcvtn v4.2s, v0.2d // encoding: [0x04,0x68,0x61,0x0e] 424 425//------------------------------------------------------------------------------ 426// Floating-point convert downsize with inexact 427//------------------------------------------------------------------------------ 428 429 fcvtxn2 v6.4s, v8.2d 430 fcvtxn v4.2s, v0.2d 431 432// CHECK: fcvtxn2 v6.4s, v8.2d // encoding: [0x06,0x69,0x61,0x6e] 433// CHECK: fcvtxn v4.2s, v0.2d // encoding: [0x04,0x68,0x61,0x2e] 434 435//------------------------------------------------------------------------------ 436// Floating-point convert upsize 437//------------------------------------------------------------------------------ 438 439 fcvtl v9.4s, v1.4h 440 fcvtl v0.2d, v1.2s 441 fcvtl2 v12.4s, v4.8h 442 fcvtl2 v17.2d, v28.4s 443 444// CHECK: fcvtl v9.4s, v1.4h // encoding: [0x29,0x78,0x21,0x0e] 445// CHECK: fcvtl v0.2d, v1.2s // encoding: [0x20,0x78,0x61,0x0e] 446// CHECK: fcvtl2 v12.4s, v4.8h // encoding: [0x8c,0x78,0x21,0x4e] 447// CHECK: fcvtl2 v17.2d, v28.4s // encoding: [0x91,0x7b,0x61,0x4e] 448 449//------------------------------------------------------------------------------ 450// Floating-point round to integral 451//------------------------------------------------------------------------------ 452 453 frintn v6.4s, v8.4s 454 frintn v6.2d, v8.2d 455 frintn v4.2s, v0.2s 456 457// CHECK: frintn v6.4s, v8.4s // encoding: [0x06,0x89,0x21,0x4e] 458// CHECK: frintn v6.2d, v8.2d // encoding: [0x06,0x89,0x61,0x4e] 459// CHECK: frintn v4.2s, v0.2s // encoding: [0x04,0x88,0x21,0x0e] 460 461 frinta v6.4s, v8.4s 462 frinta v6.2d, v8.2d 463 frinta v4.2s, v0.2s 464 465// CHECK: frinta v6.4s, v8.4s // encoding: [0x06,0x89,0x21,0x6e] 466// CHECK: frinta v6.2d, v8.2d // encoding: [0x06,0x89,0x61,0x6e] 467// CHECK: frinta v4.2s, v0.2s // encoding: [0x04,0x88,0x21,0x2e] 468 469 frintp v6.4s, v8.4s 470 frintp v6.2d, v8.2d 471 frintp v4.2s, v0.2s 472 473// CHECK: frintp v6.4s, v8.4s // encoding: [0x06,0x89,0xa1,0x4e] 474// CHECK: frintp v6.2d, v8.2d // encoding: [0x06,0x89,0xe1,0x4e] 475// CHECK: frintp v4.2s, v0.2s // encoding: [0x04,0x88,0xa1,0x0e] 476 477 frintm v6.4s, v8.4s 478 frintm v6.2d, v8.2d 479 frintm v4.2s, v0.2s 480 481// CHECK: frintm v6.4s, v8.4s // encoding: [0x06,0x99,0x21,0x4e] 482// CHECK: frintm v6.2d, v8.2d // encoding: [0x06,0x99,0x61,0x4e] 483// CHECK: frintm v4.2s, v0.2s // encoding: [0x04,0x98,0x21,0x0e] 484 485 frintx v6.4s, v8.4s 486 frintx v6.2d, v8.2d 487 frintx v4.2s, v0.2s 488 489// CHECK: frintx v6.4s, v8.4s // encoding: [0x06,0x99,0x21,0x6e] 490// CHECK: frintx v6.2d, v8.2d // encoding: [0x06,0x99,0x61,0x6e] 491// CHECK: frintx v4.2s, v0.2s // encoding: [0x04,0x98,0x21,0x2e] 492 493 frintz v6.4s, v8.4s 494 frintz v6.2d, v8.2d 495 frintz v4.2s, v0.2s 496 497// CHECK: frintz v6.4s, v8.4s // encoding: [0x06,0x99,0xa1,0x4e] 498// CHECK: frintz v6.2d, v8.2d // encoding: [0x06,0x99,0xe1,0x4e] 499// CHECK: frintz v4.2s, v0.2s // encoding: [0x04,0x98,0xa1,0x0e] 500 501 frinti v6.4s, v8.4s 502 frinti v6.2d, v8.2d 503 frinti v4.2s, v0.2s 504 505// CHECK: frinti v6.4s, v8.4s // encoding: [0x06,0x99,0xa1,0x6e] 506// CHECK: frinti v6.2d, v8.2d // encoding: [0x06,0x99,0xe1,0x6e] 507// CHECK: frinti v4.2s, v0.2s // encoding: [0x04,0x98,0xa1,0x2e] 508 509//------------------------------------------------------------------------------ 510// Floating-point convert to integer 511//------------------------------------------------------------------------------ 512 513 fcvtns v6.4s, v8.4s 514 fcvtns v6.2d, v8.2d 515 fcvtns v4.2s, v0.2s 516 517// CHECK: fcvtns v6.4s, v8.4s // encoding: [0x06,0xa9,0x21,0x4e] 518// CHECK: fcvtns v6.2d, v8.2d // encoding: [0x06,0xa9,0x61,0x4e] 519// CHECK: fcvtns v4.2s, v0.2s // encoding: [0x04,0xa8,0x21,0x0e] 520 521 fcvtnu v6.4s, v8.4s 522 fcvtnu v6.2d, v8.2d 523 fcvtnu v4.2s, v0.2s 524 525// CHECK: fcvtnu v6.4s, v8.4s // encoding: [0x06,0xa9,0x21,0x6e] 526// CHECK: fcvtnu v6.2d, v8.2d // encoding: [0x06,0xa9,0x61,0x6e] 527// CHECK: fcvtnu v4.2s, v0.2s // encoding: [0x04,0xa8,0x21,0x2e] 528 529 fcvtps v6.4s, v8.4s 530 fcvtps v6.2d, v8.2d 531 fcvtps v4.2s, v0.2s 532 533// CHECK: fcvtps v6.4s, v8.4s // encoding: [0x06,0xa9,0xa1,0x4e] 534// CHECK: fcvtps v6.2d, v8.2d // encoding: [0x06,0xa9,0xe1,0x4e] 535// CHECK: fcvtps v4.2s, v0.2s // encoding: [0x04,0xa8,0xa1,0x0e] 536 537 fcvtpu v6.4s, v8.4s 538 fcvtpu v6.2d, v8.2d 539 fcvtpu v4.2s, v0.2s 540 541// CHECK: fcvtpu v6.4s, v8.4s // encoding: [0x06,0xa9,0xa1,0x6e] 542// CHECK: fcvtpu v6.2d, v8.2d // encoding: [0x06,0xa9,0xe1,0x6e] 543// CHECK: fcvtpu v4.2s, v0.2s // encoding: [0x04,0xa8,0xa1,0x2e] 544 545 fcvtms v6.4s, v8.4s 546 fcvtms v6.2d, v8.2d 547 fcvtms v4.2s, v0.2s 548 549// CHECK: fcvtms v6.4s, v8.4s // encoding: [0x06,0xb9,0x21,0x4e] 550// CHECK: fcvtms v6.2d, v8.2d // encoding: [0x06,0xb9,0x61,0x4e] 551// CHECK: fcvtms v4.2s, v0.2s // encoding: [0x04,0xb8,0x21,0x0e] 552 553 fcvtmu v6.4s, v8.4s 554 fcvtmu v6.2d, v8.2d 555 fcvtmu v4.2s, v0.2s 556 557// CHECK: fcvtmu v6.4s, v8.4s // encoding: [0x06,0xb9,0x21,0x6e] 558// CHECK: fcvtmu v6.2d, v8.2d // encoding: [0x06,0xb9,0x61,0x6e] 559// CHECK: fcvtmu v4.2s, v0.2s // encoding: [0x04,0xb8,0x21,0x2e] 560 561 fcvtzs v6.4s, v8.4s 562 fcvtzs v6.2d, v8.2d 563 fcvtzs v4.2s, v0.2s 564 565// CHECK: fcvtzs v6.4s, v8.4s // encoding: [0x06,0xb9,0xa1,0x4e] 566// CHECK: fcvtzs v6.2d, v8.2d // encoding: [0x06,0xb9,0xe1,0x4e] 567// CHECK: fcvtzs v4.2s, v0.2s // encoding: [0x04,0xb8,0xa1,0x0e] 568 569 570 fcvtzu v6.4s, v8.4s 571 fcvtzu v6.2d, v8.2d 572 fcvtzu v4.2s, v0.2s 573 574// CHECK: fcvtzu v6.4s, v8.4s // encoding: [0x06,0xb9,0xa1,0x6e] 575// CHECK: fcvtzu v6.2d, v8.2d // encoding: [0x06,0xb9,0xe1,0x6e] 576// CHECK: fcvtzu v4.2s, v0.2s // encoding: [0x04,0xb8,0xa1,0x2e] 577 578 fcvtas v6.4s, v8.4s 579 fcvtas v6.2d, v8.2d 580 fcvtas v4.2s, v0.2s 581 582// CHECK: fcvtas v6.4s, v8.4s // encoding: [0x06,0xc9,0x21,0x4e] 583// CHECK: fcvtas v6.2d, v8.2d // encoding: [0x06,0xc9,0x61,0x4e] 584// CHECK: fcvtas v4.2s, v0.2s // encoding: [0x04,0xc8,0x21,0x0e] 585 586 fcvtau v6.4s, v8.4s 587 fcvtau v6.2d, v8.2d 588 fcvtau v4.2s, v0.2s 589 590// CHECK: fcvtau v6.4s, v8.4s // encoding: [0x06,0xc9,0x21,0x6e] 591// CHECK: fcvtau v6.2d, v8.2d // encoding: [0x06,0xc9,0x61,0x6e] 592// CHECK: fcvtau v4.2s, v0.2s // encoding: [0x04,0xc8,0x21,0x2e] 593 594 urecpe v6.4s, v8.4s 595 urecpe v4.2s, v0.2s 596 597// CHECK: urecpe v6.4s, v8.4s // encoding: [0x06,0xc9,0xa1,0x4e] 598// CHECK: urecpe v4.2s, v0.2s // encoding: [0x04,0xc8,0xa1,0x0e] 599 600 ursqrte v6.4s, v8.4s 601 ursqrte v4.2s, v0.2s 602 603// CHECK: ursqrte v6.4s, v8.4s // encoding: [0x06,0xc9,0xa1,0x6e] 604// CHECK: ursqrte v4.2s, v0.2s // encoding: [0x04,0xc8,0xa1,0x2e] 605 606 scvtf v6.4s, v8.4s 607 scvtf v6.2d, v8.2d 608 scvtf v4.2s, v0.2s 609 610// CHECK: scvtf v6.4s, v8.4s // encoding: [0x06,0xd9,0x21,0x4e] 611// CHECK: scvtf v6.2d, v8.2d // encoding: [0x06,0xd9,0x61,0x4e] 612// CHECK: scvtf v4.2s, v0.2s // encoding: [0x04,0xd8,0x21,0x0e] 613 614 ucvtf v6.4s, v8.4s 615 ucvtf v6.2d, v8.2d 616 ucvtf v4.2s, v0.2s 617 618// CHECK: ucvtf v6.4s, v8.4s // encoding: [0x06,0xd9,0x21,0x6e] 619// CHECK: ucvtf v6.2d, v8.2d // encoding: [0x06,0xd9,0x61,0x6e] 620// CHECK: ucvtf v4.2s, v0.2s // encoding: [0x04,0xd8,0x21,0x2e] 621 622 frecpe v6.4s, v8.4s 623 frecpe v6.2d, v8.2d 624 frecpe v4.2s, v0.2s 625 626// CHECK: frecpe v6.4s, v8.4s // encoding: [0x06,0xd9,0xa1,0x4e] 627// CHECK: frecpe v6.2d, v8.2d // encoding: [0x06,0xd9,0xe1,0x4e] 628// CHECK: frecpe v4.2s, v0.2s // encoding: [0x04,0xd8,0xa1,0x0e] 629 630 frsqrte v6.4s, v8.4s 631 frsqrte v6.2d, v8.2d 632 frsqrte v4.2s, v0.2s 633 634// CHECK: frsqrte v6.4s, v8.4s // encoding: [0x06,0xd9,0xa1,0x6e] 635// CHECK: frsqrte v6.2d, v8.2d // encoding: [0x06,0xd9,0xe1,0x6e] 636// CHECK: frsqrte v4.2s, v0.2s // encoding: [0x04,0xd8,0xa1,0x2e] 637 638 fsqrt v6.4s, v8.4s 639 fsqrt v6.2d, v8.2d 640 fsqrt v4.2s, v0.2s 641 642// CHECK: fsqrt v6.4s, v8.4s // encoding: [0x06,0xf9,0xa1,0x6e] 643// CHECK: fsqrt v6.2d, v8.2d // encoding: [0x06,0xf9,0xe1,0x6e] 644// CHECK: fsqrt v4.2s, v0.2s // encoding: [0x04,0xf8,0xa1,0x2e] 645 646 647