|
| 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 | +// ---------------------------------------------------------------------------// |
| 11 | +// Test 64-bit form (x0) and its aliases |
| 12 | +// ---------------------------------------------------------------------------// |
| 13 | + |
| 14 | +sqdecb x0 |
| 15 | +// CHECK-INST: sqdecb x0 |
| 16 | +// CHECK-ENCODING: [0xe0,0xfb,0x30,0x04] |
| 17 | +// CHECK-ERROR: instruction requires: sve |
| 18 | +// CHECK-UNKNOWN: e0 fb 30 04 <unknown> |
| 19 | + |
| 20 | +sqdecb x0, all |
| 21 | +// CHECK-INST: sqdecb x0 |
| 22 | +// CHECK-ENCODING: [0xe0,0xfb,0x30,0x04] |
| 23 | +// CHECK-ERROR: instruction requires: sve |
| 24 | +// CHECK-UNKNOWN: e0 fb 30 04 <unknown> |
| 25 | + |
| 26 | +sqdecb x0, all, mul #1 |
| 27 | +// CHECK-INST: sqdecb x0 |
| 28 | +// CHECK-ENCODING: [0xe0,0xfb,0x30,0x04] |
| 29 | +// CHECK-ERROR: instruction requires: sve |
| 30 | +// CHECK-UNKNOWN: e0 fb 30 04 <unknown> |
| 31 | + |
| 32 | +sqdecb x0, all, mul #16 |
| 33 | +// CHECK-INST: sqdecb x0, all, mul #16 |
| 34 | +// CHECK-ENCODING: [0xe0,0xfb,0x3f,0x04] |
| 35 | +// CHECK-ERROR: instruction requires: sve |
| 36 | +// CHECK-UNKNOWN: e0 fb 3f 04 <unknown> |
| 37 | + |
| 38 | + |
| 39 | +// ---------------------------------------------------------------------------// |
| 40 | +// Test all patterns for 64-bit form |
| 41 | +// ---------------------------------------------------------------------------// |
| 42 | + |
| 43 | +sqdecb x0, pow2 |
| 44 | +// CHECK-INST: sqdecb x0, pow2 |
| 45 | +// CHECK-ENCODING: [0x00,0xf8,0x30,0x04] |
| 46 | +// CHECK-ERROR: instruction requires: sve |
| 47 | +// CHECK-UNKNOWN: 00 f8 30 04 <unknown> |
| 48 | + |
| 49 | +sqdecb x0, vl1 |
| 50 | +// CHECK-INST: sqdecb x0, vl1 |
| 51 | +// CHECK-ENCODING: [0x20,0xf8,0x30,0x04] |
| 52 | +// CHECK-ERROR: instruction requires: sve |
| 53 | +// CHECK-UNKNOWN: 20 f8 30 04 <unknown> |
| 54 | + |
| 55 | +sqdecb x0, vl2 |
| 56 | +// CHECK-INST: sqdecb x0, vl2 |
| 57 | +// CHECK-ENCODING: [0x40,0xf8,0x30,0x04] |
| 58 | +// CHECK-ERROR: instruction requires: sve |
| 59 | +// CHECK-UNKNOWN: 40 f8 30 04 <unknown> |
| 60 | + |
| 61 | +sqdecb x0, vl3 |
| 62 | +// CHECK-INST: sqdecb x0, vl3 |
| 63 | +// CHECK-ENCODING: [0x60,0xf8,0x30,0x04] |
| 64 | +// CHECK-ERROR: instruction requires: sve |
| 65 | +// CHECK-UNKNOWN: 60 f8 30 04 <unknown> |
| 66 | + |
| 67 | +sqdecb x0, vl4 |
| 68 | +// CHECK-INST: sqdecb x0, vl4 |
| 69 | +// CHECK-ENCODING: [0x80,0xf8,0x30,0x04] |
| 70 | +// CHECK-ERROR: instruction requires: sve |
| 71 | +// CHECK-UNKNOWN: 80 f8 30 04 <unknown> |
| 72 | + |
| 73 | +sqdecb x0, vl5 |
| 74 | +// CHECK-INST: sqdecb x0, vl5 |
| 75 | +// CHECK-ENCODING: [0xa0,0xf8,0x30,0x04] |
| 76 | +// CHECK-ERROR: instruction requires: sve |
| 77 | +// CHECK-UNKNOWN: a0 f8 30 04 <unknown> |
| 78 | + |
| 79 | +sqdecb x0, vl6 |
| 80 | +// CHECK-INST: sqdecb x0, vl6 |
| 81 | +// CHECK-ENCODING: [0xc0,0xf8,0x30,0x04] |
| 82 | +// CHECK-ERROR: instruction requires: sve |
| 83 | +// CHECK-UNKNOWN: c0 f8 30 04 <unknown> |
| 84 | + |
| 85 | +sqdecb x0, vl7 |
| 86 | +// CHECK-INST: sqdecb x0, vl7 |
| 87 | +// CHECK-ENCODING: [0xe0,0xf8,0x30,0x04] |
| 88 | +// CHECK-ERROR: instruction requires: sve |
| 89 | +// CHECK-UNKNOWN: e0 f8 30 04 <unknown> |
| 90 | + |
| 91 | +sqdecb x0, vl8 |
| 92 | +// CHECK-INST: sqdecb x0, vl8 |
| 93 | +// CHECK-ENCODING: [0x00,0xf9,0x30,0x04] |
| 94 | +// CHECK-ERROR: instruction requires: sve |
| 95 | +// CHECK-UNKNOWN: 00 f9 30 04 <unknown> |
| 96 | + |
| 97 | +sqdecb x0, vl16 |
| 98 | +// CHECK-INST: sqdecb x0, vl16 |
| 99 | +// CHECK-ENCODING: [0x20,0xf9,0x30,0x04] |
| 100 | +// CHECK-ERROR: instruction requires: sve |
| 101 | +// CHECK-UNKNOWN: 20 f9 30 04 <unknown> |
| 102 | + |
| 103 | +sqdecb x0, vl32 |
| 104 | +// CHECK-INST: sqdecb x0, vl32 |
| 105 | +// CHECK-ENCODING: [0x40,0xf9,0x30,0x04] |
| 106 | +// CHECK-ERROR: instruction requires: sve |
| 107 | +// CHECK-UNKNOWN: 40 f9 30 04 <unknown> |
| 108 | + |
| 109 | +sqdecb x0, vl64 |
| 110 | +// CHECK-INST: sqdecb x0, vl64 |
| 111 | +// CHECK-ENCODING: [0x60,0xf9,0x30,0x04] |
| 112 | +// CHECK-ERROR: instruction requires: sve |
| 113 | +// CHECK-UNKNOWN: 60 f9 30 04 <unknown> |
| 114 | + |
| 115 | +sqdecb x0, vl128 |
| 116 | +// CHECK-INST: sqdecb x0, vl128 |
| 117 | +// CHECK-ENCODING: [0x80,0xf9,0x30,0x04] |
| 118 | +// CHECK-ERROR: instruction requires: sve |
| 119 | +// CHECK-UNKNOWN: 80 f9 30 04 <unknown> |
| 120 | + |
| 121 | +sqdecb x0, vl256 |
| 122 | +// CHECK-INST: sqdecb x0, vl256 |
| 123 | +// CHECK-ENCODING: [0xa0,0xf9,0x30,0x04] |
| 124 | +// CHECK-ERROR: instruction requires: sve |
| 125 | +// CHECK-UNKNOWN: a0 f9 30 04 <unknown> |
| 126 | + |
| 127 | +sqdecb x0, #14 |
| 128 | +// CHECK-INST: sqdecb x0, #14 |
| 129 | +// CHECK-ENCODING: [0xc0,0xf9,0x30,0x04] |
| 130 | +// CHECK-ERROR: instruction requires: sve |
| 131 | +// CHECK-UNKNOWN: c0 f9 30 04 <unknown> |
| 132 | + |
| 133 | +sqdecb x0, #15 |
| 134 | +// CHECK-INST: sqdecb x0, #15 |
| 135 | +// CHECK-ENCODING: [0xe0,0xf9,0x30,0x04] |
| 136 | +// CHECK-ERROR: instruction requires: sve |
| 137 | +// CHECK-UNKNOWN: e0 f9 30 04 <unknown> |
| 138 | + |
| 139 | +sqdecb x0, #16 |
| 140 | +// CHECK-INST: sqdecb x0, #16 |
| 141 | +// CHECK-ENCODING: [0x00,0xfa,0x30,0x04] |
| 142 | +// CHECK-ERROR: instruction requires: sve |
| 143 | +// CHECK-UNKNOWN: 00 fa 30 04 <unknown> |
| 144 | + |
| 145 | +sqdecb x0, #17 |
| 146 | +// CHECK-INST: sqdecb x0, #17 |
| 147 | +// CHECK-ENCODING: [0x20,0xfa,0x30,0x04] |
| 148 | +// CHECK-ERROR: instruction requires: sve |
| 149 | +// CHECK-UNKNOWN: 20 fa 30 04 <unknown> |
| 150 | + |
| 151 | +sqdecb x0, #18 |
| 152 | +// CHECK-INST: sqdecb x0, #18 |
| 153 | +// CHECK-ENCODING: [0x40,0xfa,0x30,0x04] |
| 154 | +// CHECK-ERROR: instruction requires: sve |
| 155 | +// CHECK-UNKNOWN: 40 fa 30 04 <unknown> |
| 156 | + |
| 157 | +sqdecb x0, #19 |
| 158 | +// CHECK-INST: sqdecb x0, #19 |
| 159 | +// CHECK-ENCODING: [0x60,0xfa,0x30,0x04] |
| 160 | +// CHECK-ERROR: instruction requires: sve |
| 161 | +// CHECK-UNKNOWN: 60 fa 30 04 <unknown> |
| 162 | + |
| 163 | +sqdecb x0, #20 |
| 164 | +// CHECK-INST: sqdecb x0, #20 |
| 165 | +// CHECK-ENCODING: [0x80,0xfa,0x30,0x04] |
| 166 | +// CHECK-ERROR: instruction requires: sve |
| 167 | +// CHECK-UNKNOWN: 80 fa 30 04 <unknown> |
| 168 | + |
| 169 | +sqdecb x0, #21 |
| 170 | +// CHECK-INST: sqdecb x0, #21 |
| 171 | +// CHECK-ENCODING: [0xa0,0xfa,0x30,0x04] |
| 172 | +// CHECK-ERROR: instruction requires: sve |
| 173 | +// CHECK-UNKNOWN: a0 fa 30 04 <unknown> |
| 174 | + |
| 175 | +sqdecb x0, #22 |
| 176 | +// CHECK-INST: sqdecb x0, #22 |
| 177 | +// CHECK-ENCODING: [0xc0,0xfa,0x30,0x04] |
| 178 | +// CHECK-ERROR: instruction requires: sve |
| 179 | +// CHECK-UNKNOWN: c0 fa 30 04 <unknown> |
| 180 | + |
| 181 | +sqdecb x0, #23 |
| 182 | +// CHECK-INST: sqdecb x0, #23 |
| 183 | +// CHECK-ENCODING: [0xe0,0xfa,0x30,0x04] |
| 184 | +// CHECK-ERROR: instruction requires: sve |
| 185 | +// CHECK-UNKNOWN: e0 fa 30 04 <unknown> |
| 186 | + |
| 187 | +sqdecb x0, #24 |
| 188 | +// CHECK-INST: sqdecb x0, #24 |
| 189 | +// CHECK-ENCODING: [0x00,0xfb,0x30,0x04] |
| 190 | +// CHECK-ERROR: instruction requires: sve |
| 191 | +// CHECK-UNKNOWN: 00 fb 30 04 <unknown> |
| 192 | + |
| 193 | +sqdecb x0, #25 |
| 194 | +// CHECK-INST: sqdecb x0, #25 |
| 195 | +// CHECK-ENCODING: [0x20,0xfb,0x30,0x04] |
| 196 | +// CHECK-ERROR: instruction requires: sve |
| 197 | +// CHECK-UNKNOWN: 20 fb 30 04 <unknown> |
| 198 | + |
| 199 | +sqdecb x0, #26 |
| 200 | +// CHECK-INST: sqdecb x0, #26 |
| 201 | +// CHECK-ENCODING: [0x40,0xfb,0x30,0x04] |
| 202 | +// CHECK-ERROR: instruction requires: sve |
| 203 | +// CHECK-UNKNOWN: 40 fb 30 04 <unknown> |
| 204 | + |
| 205 | +sqdecb x0, #27 |
| 206 | +// CHECK-INST: sqdecb x0, #27 |
| 207 | +// CHECK-ENCODING: [0x60,0xfb,0x30,0x04] |
| 208 | +// CHECK-ERROR: instruction requires: sve |
| 209 | +// CHECK-UNKNOWN: 60 fb 30 04 <unknown> |
| 210 | + |
| 211 | +sqdecb x0, #28 |
| 212 | +// CHECK-INST: sqdecb x0, #28 |
| 213 | +// CHECK-ENCODING: [0x80,0xfb,0x30,0x04] |
| 214 | +// CHECK-ERROR: instruction requires: sve |
| 215 | +// CHECK-UNKNOWN: 80 fb 30 04 <unknown> |
0 commit comments