| 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: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %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 |
// Test instruction variants that aren't legal in streaming mode. |
| 13 |
|
| 14 |
ld1w { z0.s }, p0/z, [x0, z0.s, uxtw] |
| 15 |
// CHECK-INST: ld1w { z0.s }, p0/z, [x0, z0.s, uxtw] |
| 16 |
// CHECK-ENCODING: [0x00,0x40,0x00,0x85] |
| 17 |
// CHECK-ERROR: instruction requires: sve |
| 18 |
// CHECK-UNKNOWN: 85004000 <unknown> |
| 19 |
|
| 20 |
ld1w { z0.s }, p0/z, [x0, z0.s, sxtw] |
| 21 |
// CHECK-INST: ld1w { z0.s }, p0/z, [x0, z0.s, sxtw] |
| 22 |
// CHECK-ENCODING: [0x00,0x40,0x40,0x85] |
| 23 |
// CHECK-ERROR: instruction requires: sve |
| 24 |
// CHECK-UNKNOWN: 85404000 <unknown> |
| 25 |
|
| 26 |
ld1w { z31.s }, p7/z, [sp, z31.s, uxtw #2] |
| 27 |
// CHECK-INST: ld1w { z31.s }, p7/z, [sp, z31.s, uxtw #2] |
| 28 |
// CHECK-ENCODING: [0xff,0x5f,0x3f,0x85] |
| 29 |
// CHECK-ERROR: instruction requires: sve |
| 30 |
// CHECK-UNKNOWN: 853f5fff <unknown> |
| 31 |
|
| 32 |
ld1w { z31.s }, p7/z, [sp, z31.s, sxtw #2] |
| 33 |
// CHECK-INST: ld1w { z31.s }, p7/z, [sp, z31.s, sxtw #2] |
| 34 |
// CHECK-ENCODING: [0xff,0x5f,0x7f,0x85] |
| 35 |
// CHECK-ERROR: instruction requires: sve |
| 36 |
// CHECK-UNKNOWN: 857f5fff <unknown> |
| 37 |
|
| 38 |
ld1w { z31.d }, p7/z, [sp, z31.d] |
| 39 |
// CHECK-INST: ld1w { z31.d }, p7/z, [sp, z31.d] |
| 40 |
// CHECK-ENCODING: [0xff,0xdf,0x5f,0xc5] |
| 41 |
// CHECK-ERROR: instruction requires: sve |
| 42 |
// CHECK-UNKNOWN: c55fdfff <unknown> |
| 43 |
|
| 44 |
ld1w { z23.d }, p3/z, [x13, z8.d, lsl #2] |
| 45 |
// CHECK-INST: ld1w { z23.d }, p3/z, [x13, z8.d, lsl #2] |
| 46 |
// CHECK-ENCODING: [0xb7,0xcd,0x68,0xc5] |
| 47 |
// CHECK-ERROR: instruction requires: sve |
| 48 |
// CHECK-UNKNOWN: c568cdb7 <unknown> |
| 49 |
|
| 50 |
ld1w { z21.d }, p5/z, [x10, z21.d, uxtw] |
| 51 |
// CHECK-INST: ld1w { z21.d }, p5/z, [x10, z21.d, uxtw] |
| 52 |
// CHECK-ENCODING: [0x55,0x55,0x15,0xc5] |
| 53 |
// CHECK-ERROR: instruction requires: sve |
| 54 |
// CHECK-UNKNOWN: c5155555 <unknown> |
| 55 |
|
| 56 |
ld1w { z21.d }, p5/z, [x10, z21.d, sxtw] |
| 57 |
// CHECK-INST: ld1w { z21.d }, p5/z, [x10, z21.d, sxtw] |
| 58 |
// CHECK-ENCODING: [0x55,0x55,0x55,0xc5] |
| 59 |
// CHECK-ERROR: instruction requires: sve |
| 60 |
// CHECK-UNKNOWN: c5555555 <unknown> |
| 61 |
|
| 62 |
ld1w { z0.d }, p0/z, [x0, z0.d, uxtw #2] |
| 63 |
// CHECK-INST: ld1w { z0.d }, p0/z, [x0, z0.d, uxtw #2] |
| 64 |
// CHECK-ENCODING: [0x00,0x40,0x20,0xc5] |
| 65 |
// CHECK-ERROR: instruction requires: sve |
| 66 |
// CHECK-UNKNOWN: c5204000 <unknown> |
| 67 |
|
| 68 |
ld1w { z0.d }, p0/z, [x0, z0.d, sxtw #2] |
| 69 |
// CHECK-INST: ld1w { z0.d }, p0/z, [x0, z0.d, sxtw #2] |
| 70 |
// CHECK-ENCODING: [0x00,0x40,0x60,0xc5] |
| 71 |
// CHECK-ERROR: instruction requires: sve |
| 72 |
// CHECK-UNKNOWN: c5604000 <unknown> |
| 73 |
|
| 74 |
ld1w { z31.s }, p7/z, [z31.s, #124] |
| 75 |
// CHECK-INST: ld1w { z31.s }, p7/z, [z31.s, #124] |
| 76 |
// CHECK-ENCODING: [0xff,0xdf,0x3f,0x85] |
| 77 |
// CHECK-ERROR: instruction requires: sve |
| 78 |
// CHECK-UNKNOWN: 853fdfff <unknown> |
| 79 |
|
| 80 |
ld1w { z0.s }, p0/z, [z0.s] |
| 81 |
// CHECK-INST: ld1w { z0.s }, p0/z, [z0.s] |
| 82 |
// CHECK-ENCODING: [0x00,0xc0,0x20,0x85] |
| 83 |
// CHECK-ERROR: instruction requires: sve |
| 84 |
// CHECK-UNKNOWN: 8520c000 <unknown> |
| 85 |
|
| 86 |
ld1w { z31.d }, p7/z, [z31.d, #124] |
| 87 |
// CHECK-INST: ld1w { z31.d }, p7/z, [z31.d, #124] |
| 88 |
// CHECK-ENCODING: [0xff,0xdf,0x3f,0xc5] |
| 89 |
// CHECK-ERROR: instruction requires: sve |
| 90 |
// CHECK-UNKNOWN: c53fdfff <unknown> |
| 91 |
|
| 92 |
ld1w { z0.d }, p0/z, [z0.d] |
| 93 |
// CHECK-INST: ld1w { z0.d }, p0/z, [z0.d] |
| 94 |
// CHECK-ENCODING: [0x00,0xc0,0x20,0xc5] |
| 95 |
// CHECK-ERROR: instruction requires: sve |
| 96 |
// CHECK-UNKNOWN: c520c000 <unknown> |