| 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 |
// --------------------------------------------------------------------------// |
| 13 |
// Index (immediate, immediate) |
| 14 |
|
| 15 |
index z0.b, #0, #0 |
| 16 |
// CHECK-INST: index z0.b, #0, #0 |
| 17 |
// CHECK-ENCODING: [0x00,0x40,0x20,0x04] |
| 18 |
// CHECK-ERROR: instruction requires: sve or sme |
| 19 |
// CHECK-UNKNOWN: 04204000 <unknown> |
| 20 |
|
| 21 |
index z31.b, #-1, #-1 |
| 22 |
// CHECK-INST: index z31.b, #-1, #-1 |
| 23 |
// CHECK-ENCODING: [0xff,0x43,0x3f,0x04] |
| 24 |
// CHECK-ERROR: instruction requires: sve or sme |
| 25 |
// CHECK-UNKNOWN: 043f43ff <unknown> |
| 26 |
|
| 27 |
index z0.h, #0, #0 |
| 28 |
// CHECK-INST: index z0.h, #0, #0 |
| 29 |
// CHECK-ENCODING: [0x00,0x40,0x60,0x04] |
| 30 |
// CHECK-ERROR: instruction requires: sve or sme |
| 31 |
// CHECK-UNKNOWN: 04604000 <unknown> |
| 32 |
|
| 33 |
index z31.h, #-1, #-1 |
| 34 |
// CHECK-INST: index z31.h, #-1, #-1 |
| 35 |
// CHECK-ENCODING: [0xff,0x43,0x7f,0x04] |
| 36 |
// CHECK-ERROR: instruction requires: sve or sme |
| 37 |
// CHECK-UNKNOWN: 047f43ff <unknown> |
| 38 |
|
| 39 |
index z0.s, #0, #0 |
| 40 |
// CHECK-INST: index z0.s, #0, #0 |
| 41 |
// CHECK-ENCODING: [0x00,0x40,0xa0,0x04] |
| 42 |
// CHECK-ERROR: instruction requires: sve or sme |
| 43 |
// CHECK-UNKNOWN: 04a04000 <unknown> |
| 44 |
|
| 45 |
index z31.s, #-1, #-1 |
| 46 |
// CHECK-INST: index z31.s, #-1, #-1 |
| 47 |
// CHECK-ENCODING: [0xff,0x43,0xbf,0x04] |
| 48 |
// CHECK-ERROR: instruction requires: sve or sme |
| 49 |
// CHECK-UNKNOWN: 04bf43ff <unknown> |
| 50 |
|
| 51 |
index z0.d, #0, #0 |
| 52 |
// CHECK-INST: index z0.d, #0, #0 |
| 53 |
// CHECK-ENCODING: [0x00,0x40,0xe0,0x04] |
| 54 |
// CHECK-ERROR: instruction requires: sve or sme |
| 55 |
// CHECK-UNKNOWN: 04e04000 <unknown> |
| 56 |
|
| 57 |
index z31.d, #-1, #-1 |
| 58 |
// CHECK-INST: index z31.d, #-1, #-1 |
| 59 |
// CHECK-ENCODING: [0xff,0x43,0xff,0x04] |
| 60 |
// CHECK-ERROR: instruction requires: sve or sme |
| 61 |
// CHECK-UNKNOWN: 04ff43ff <unknown> |
| 62 |
|
| 63 |
// --------------------------------------------------------------------------// |
| 64 |
// Index (immediate, scalar) |
| 65 |
|
| 66 |
index z31.b, #-1, wzr |
| 67 |
// CHECK-INST: index z31.b, #-1, wzr |
| 68 |
// CHECK-ENCODING: [0xff,0x4b,0x3f,0x04] |
| 69 |
// CHECK-ERROR: instruction requires: sve or sme |
| 70 |
// CHECK-UNKNOWN: 043f4bff <unknown> |
| 71 |
|
| 72 |
index z23.b, #13, w8 |
| 73 |
// CHECK-INST: index z23.b, #13, w8 |
| 74 |
// CHECK-ENCODING: [0xb7,0x49,0x28,0x04] |
| 75 |
// CHECK-ERROR: instruction requires: sve or sme |
| 76 |
// CHECK-UNKNOWN: 042849b7 <unknown> |
| 77 |
|
| 78 |
index z31.h, #-1, wzr |
| 79 |
// CHECK-INST: index z31.h, #-1, wzr |
| 80 |
// CHECK-ENCODING: [0xff,0x4b,0x7f,0x04] |
| 81 |
// CHECK-ERROR: instruction requires: sve or sme |
| 82 |
// CHECK-UNKNOWN: 047f4bff <unknown> |
| 83 |
|
| 84 |
index z23.h, #13, w8 |
| 85 |
// CHECK-INST: index z23.h, #13, w8 |
| 86 |
// CHECK-ENCODING: [0xb7,0x49,0x68,0x04] |
| 87 |
// CHECK-ERROR: instruction requires: sve or sme |
| 88 |
// CHECK-UNKNOWN: 046849b7 <unknown> |
| 89 |
|
| 90 |
index z31.s, #-1, wzr |
| 91 |
// CHECK-INST: index z31.s, #-1, wzr |
| 92 |
// CHECK-ENCODING: [0xff,0x4b,0xbf,0x04] |
| 93 |
// CHECK-ERROR: instruction requires: sve or sme |
| 94 |
// CHECK-UNKNOWN: 04bf4bff <unknown> |
| 95 |
|
| 96 |
index z23.s, #13, w8 |
| 97 |
// CHECK-INST: index z23.s, #13, w8 |
| 98 |
// CHECK-ENCODING: [0xb7,0x49,0xa8,0x04] |
| 99 |
// CHECK-ERROR: instruction requires: sve or sme |
| 100 |
// CHECK-UNKNOWN: 04a849b7 <unknown> |
| 101 |
|
| 102 |
index z31.d, #-1, xzr |
| 103 |
// CHECK-INST: index z31.d, #-1, xzr |
| 104 |
// CHECK-ENCODING: [0xff,0x4b,0xff,0x04] |
| 105 |
// CHECK-ERROR: instruction requires: sve or sme |
| 106 |
// CHECK-UNKNOWN: 04ff4bff <unknown> |
| 107 |
|
| 108 |
index z23.d, #13, x8 |
| 109 |
// CHECK-INST: index z23.d, #13, x8 |
| 110 |
// CHECK-ENCODING: [0xb7,0x49,0xe8,0x04] |
| 111 |
// CHECK-ERROR: instruction requires: sve or sme |
| 112 |
// CHECK-UNKNOWN: 04e849b7 <unknown> |
| 113 |
|
| 114 |
|
| 115 |
// --------------------------------------------------------------------------// |
| 116 |
// Index (scalar, immediate) |
| 117 |
|
| 118 |
index z31.b, wzr, #-1 |
| 119 |
// CHECK-INST: index z31.b, wzr, #-1 |
| 120 |
// CHECK-ENCODING: [0xff,0x47,0x3f,0x04] |
| 121 |
// CHECK-ERROR: instruction requires: sve or sme |
| 122 |
// CHECK-UNKNOWN: 043f47ff <unknown> |
| 123 |
|
| 124 |
index z23.b, w13, #8 |
| 125 |
// CHECK-INST: index z23.b, w13, #8 |
| 126 |
// CHECK-ENCODING: [0xb7,0x45,0x28,0x04] |
| 127 |
// CHECK-ERROR: instruction requires: sve or sme |
| 128 |
// CHECK-UNKNOWN: 042845b7 <unknown> |
| 129 |
|
| 130 |
index z31.h, wzr, #-1 |
| 131 |
// CHECK-INST: index z31.h, wzr, #-1 |
| 132 |
// CHECK-ENCODING: [0xff,0x47,0x7f,0x04] |
| 133 |
// CHECK-ERROR: instruction requires: sve or sme |
| 134 |
// CHECK-UNKNOWN: 047f47ff <unknown> |
| 135 |
|
| 136 |
index z23.h, w13, #8 |
| 137 |
// CHECK-INST: index z23.h, w13, #8 |
| 138 |
// CHECK-ENCODING: [0xb7,0x45,0x68,0x04] |
| 139 |
// CHECK-ERROR: instruction requires: sve or sme |
| 140 |
// CHECK-UNKNOWN: 046845b7 <unknown> |
| 141 |
|
| 142 |
index z31.s, wzr, #-1 |
| 143 |
// CHECK-INST: index z31.s, wzr, #-1 |
| 144 |
// CHECK-ENCODING: [0xff,0x47,0xbf,0x04] |
| 145 |
// CHECK-ERROR: instruction requires: sve or sme |
| 146 |
// CHECK-UNKNOWN: 04bf47ff <unknown> |
| 147 |
|
| 148 |
index z23.s, w13, #8 |
| 149 |
// CHECK-INST: index z23.s, w13, #8 |
| 150 |
// CHECK-ENCODING: [0xb7,0x45,0xa8,0x04] |
| 151 |
// CHECK-ERROR: instruction requires: sve or sme |
| 152 |
// CHECK-UNKNOWN: 04a845b7 <unknown> |
| 153 |
|
| 154 |
index z31.d, xzr, #-1 |
| 155 |
// CHECK-INST: index z31.d, xzr, #-1 |
| 156 |
// CHECK-ENCODING: [0xff,0x47,0xff,0x04] |
| 157 |
// CHECK-ERROR: instruction requires: sve or sme |
| 158 |
// CHECK-UNKNOWN: 04ff47ff <unknown> |
| 159 |
|
| 160 |
index z23.d, x13, #8 |
| 161 |
// CHECK-INST: index z23.d, x13, #8 |
| 162 |
// CHECK-ENCODING: [0xb7,0x45,0xe8,0x04] |
| 163 |
// CHECK-ERROR: instruction requires: sve or sme |
| 164 |
// CHECK-UNKNOWN: 04e845b7 <unknown> |
| 165 |
|
| 166 |
|
| 167 |
// --------------------------------------------------------------------------// |
| 168 |
// Index (scalar, scalar) |
| 169 |
|
| 170 |
index z31.b, wzr, wzr |
| 171 |
// CHECK-INST: index z31.b, wzr, wzr |
| 172 |
// CHECK-ENCODING: [0xff,0x4f,0x3f,0x04] |
| 173 |
// CHECK-ERROR: instruction requires: sve or sme |
| 174 |
// CHECK-UNKNOWN: 043f4fff <unknown> |
| 175 |
|
| 176 |
index z21.b, w10, w21 |
| 177 |
// CHECK-INST: index z21.b, w10, w21 |
| 178 |
// CHECK-ENCODING: [0x55,0x4d,0x35,0x04] |
| 179 |
// CHECK-ERROR: instruction requires: sve or sme |
| 180 |
// CHECK-UNKNOWN: 04354d55 <unknown> |
| 181 |
|
| 182 |
index z31.h, wzr, wzr |
| 183 |
// CHECK-INST: index z31.h, wzr, wzr |
| 184 |
// CHECK-ENCODING: [0xff,0x4f,0x7f,0x04] |
| 185 |
// CHECK-ERROR: instruction requires: sve or sme |
| 186 |
// CHECK-UNKNOWN: 047f4fff <unknown> |
| 187 |
|
| 188 |
index z0.h, w0, w0 |
| 189 |
// CHECK-INST: index z0.h, w0, w0 |
| 190 |
// CHECK-ENCODING: [0x00,0x4c,0x60,0x04] |
| 191 |
// CHECK-ERROR: instruction requires: sve or sme |
| 192 |
// CHECK-UNKNOWN: 04604c00 <unknown> |
| 193 |
|
| 194 |
index z31.s, wzr, wzr |
| 195 |
// CHECK-INST: index z31.s, wzr, wzr |
| 196 |
// CHECK-ENCODING: [0xff,0x4f,0xbf,0x04] |
| 197 |
// CHECK-ERROR: instruction requires: sve or sme |
| 198 |
// CHECK-UNKNOWN: 04bf4fff <unknown> |
| 199 |
|
| 200 |
index z21.s, w10, w21 |
| 201 |
// CHECK-INST: index z21.s, w10, w21 |
| 202 |
// CHECK-ENCODING: [0x55,0x4d,0xb5,0x04] |
| 203 |
// CHECK-ERROR: instruction requires: sve or sme |
| 204 |
// CHECK-UNKNOWN: 04b54d55 <unknown> |
| 205 |
|
| 206 |
index z31.d, xzr, xzr |
| 207 |
// CHECK-INST: index z31.d, xzr, xzr |
| 208 |
// CHECK-ENCODING: [0xff,0x4f,0xff,0x04] |
| 209 |
// CHECK-ERROR: instruction requires: sve or sme |
| 210 |
// CHECK-UNKNOWN: 04ff4fff <unknown> |
| 211 |
|
| 212 |
index z21.d, x10, x21 |
| 213 |
// CHECK-INST: index z21.d, x10, x21 |
| 214 |
// CHECK-ENCODING: [0x55,0x4d,0xf5,0x04] |
| 215 |
// CHECK-ERROR: instruction requires: sve or sme |
| 216 |
// CHECK-UNKNOWN: 04f54d55 <unknown> |