1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287
|
# RUN: llvm-mc -triple x86_64 -show-encoding %s | FileCheck %s
# RUN: not llvm-mc -triple i386 -show-encoding %s 2>&1 | FileCheck %s --check-prefix=ERROR
# ERROR-COUNT-94: error:
# ERROR-NOT: error:
# CHECK: {evex} shrb $123, %bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc0,0xeb,0x7b]
{evex} shrb $123, %bl
# CHECK: {nf} shrb $123, %bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xc0,0xeb,0x7b]
{nf} shrb $123, %bl
# CHECK: shrb $123, %bl, %bl
# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xc0,0xeb,0x7b]
shrb $123, %bl, %bl
# CHECK: {nf} shrb $123, %bl, %bl
# CHECK: encoding: [0x62,0xf4,0x64,0x1c,0xc0,0xeb,0x7b]
{nf} shrb $123, %bl, %bl
# CHECK: {evex} shrw $123, %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xc1,0xea,0x7b]
{evex} shrw $123, %dx
# CHECK: {nf} shrw $123, %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xc1,0xea,0x7b]
{nf} shrw $123, %dx
# CHECK: shrw $123, %dx, %dx
# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xc1,0xea,0x7b]
shrw $123, %dx, %dx
# CHECK: {nf} shrw $123, %dx, %dx
# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xc1,0xea,0x7b]
{nf} shrw $123, %dx, %dx
# CHECK: {evex} shrl $123, %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc1,0xe9,0x7b]
{evex} shrl $123, %ecx
# CHECK: {nf} shrl $123, %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xc1,0xe9,0x7b]
{nf} shrl $123, %ecx
# CHECK: shrl $123, %ecx, %ecx
# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xc1,0xe9,0x7b]
shrl $123, %ecx, %ecx
# CHECK: {nf} shrl $123, %ecx, %ecx
# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xc1,0xe9,0x7b]
{nf} shrl $123, %ecx, %ecx
# CHECK: {evex} shrq $123, %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0xe9,0x7b]
{evex} shrq $123, %r9
# CHECK: {nf} shrq $123, %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xc1,0xe9,0x7b]
{nf} shrq $123, %r9
# CHECK: shrq $123, %r9, %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0xe9,0x7b]
shrq $123, %r9, %r9
# CHECK: {nf} shrq $123, %r9, %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xc1,0xe9,0x7b]
{nf} shrq $123, %r9, %r9
# CHECK: {evex} shrb $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc0,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} shrb $123, 291(%r8,%rax,4)
# CHECK: {nf} shrb $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xc0,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrb $123, 291(%r8,%rax,4)
# CHECK: shrb $123, 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xc0,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
shrb $123, 291(%r8,%rax,4), %bl
# CHECK: {nf} shrb $123, 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xc0,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrb $123, 291(%r8,%rax,4), %bl
# CHECK: {evex} shrw $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} shrw $123, 291(%r8,%rax,4)
# CHECK: {nf} shrw $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrw $123, 291(%r8,%rax,4)
# CHECK: shrw $123, 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
shrw $123, 291(%r8,%rax,4), %dx
# CHECK: {nf} shrw $123, 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrw $123, 291(%r8,%rax,4), %dx
# CHECK: {evex} shrl $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} shrl $123, 291(%r8,%rax,4)
# CHECK: {nf} shrl $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrl $123, 291(%r8,%rax,4)
# CHECK: shrl $123, 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
shrl $123, 291(%r8,%rax,4), %ecx
# CHECK: {nf} shrl $123, 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrl $123, 291(%r8,%rax,4), %ecx
# CHECK: {evex} shrq $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{evex} shrq $123, 291(%r8,%rax,4)
# CHECK: {nf} shrq $123, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrq $123, 291(%r8,%rax,4)
# CHECK: shrq $123, 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
shrq $123, 291(%r8,%rax,4), %r9
# CHECK: {nf} shrq $123, 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xc1,0xac,0x80,0x23,0x01,0x00,0x00,0x7b]
{nf} shrq $123, 291(%r8,%rax,4), %r9
# CHECK: {evex} shrb %bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd0,0xeb]
{evex} shrb %bl
# CHECK: {nf} shrb %bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd0,0xeb]
{nf} shrb %bl
# CHECK: {evex} shrb %cl, %bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd2,0xeb]
{evex} shrb %cl, %bl
# CHECK: {nf} shrb %cl, %bl
# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd2,0xeb]
{nf} shrb %cl, %bl
# CHECK: shrb %cl, %bl, %bl
# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xd2,0xeb]
shrb %cl, %bl, %bl
# CHECK: {nf} shrb %cl, %bl, %bl
# CHECK: encoding: [0x62,0xf4,0x64,0x1c,0xd2,0xeb]
{nf} shrb %cl, %bl, %bl
# CHECK: {evex} shrw %cl, %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd3,0xea]
{evex} shrw %cl, %dx
# CHECK: {nf} shrw %cl, %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xd3,0xea]
{nf} shrw %cl, %dx
# CHECK: shrw %cl, %dx, %dx
# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd3,0xea]
shrw %cl, %dx, %dx
# CHECK: {nf} shrw %cl, %dx, %dx
# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xd3,0xea]
{nf} shrw %cl, %dx, %dx
# CHECK: {evex} shrl %cl, %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd3,0xe9]
{evex} shrl %cl, %ecx
# CHECK: {nf} shrl %cl, %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd3,0xe9]
{nf} shrl %cl, %ecx
# CHECK: shrl %cl, %ecx, %ecx
# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd3,0xe9]
shrl %cl, %ecx, %ecx
# CHECK: {nf} shrl %cl, %ecx, %ecx
# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xd3,0xe9]
{nf} shrl %cl, %ecx, %ecx
# CHECK: {evex} shrq %cl, %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0xe9]
{evex} shrq %cl, %r9
# CHECK: {nf} shrq %cl, %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd3,0xe9]
{nf} shrq %cl, %r9
# CHECK: shrq %cl, %r9, %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0xe9]
shrq %cl, %r9, %r9
# CHECK: {nf} shrq %cl, %r9, %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd3,0xe9]
{nf} shrq %cl, %r9, %r9
# CHECK: {evex} shrb %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd2,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrb %cl, 291(%r8,%rax,4)
# CHECK: {nf} shrb %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd2,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrb %cl, 291(%r8,%rax,4)
# CHECK: shrb %cl, 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd2,0xac,0x80,0x23,0x01,0x00,0x00]
shrb %cl, 291(%r8,%rax,4), %bl
# CHECK: {nf} shrb %cl, 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xd2,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrb %cl, 291(%r8,%rax,4), %bl
# CHECK: {evex} shrw %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrw %cl, 291(%r8,%rax,4)
# CHECK: {nf} shrw %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrw %cl, 291(%r8,%rax,4)
# CHECK: shrw %cl, 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
shrw %cl, 291(%r8,%rax,4), %dx
# CHECK: {nf} shrw %cl, 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrw %cl, 291(%r8,%rax,4), %dx
# CHECK: {evex} shrl %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrl %cl, 291(%r8,%rax,4)
# CHECK: {nf} shrl %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrl %cl, 291(%r8,%rax,4)
# CHECK: shrl %cl, 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
shrl %cl, 291(%r8,%rax,4), %ecx
# CHECK: {nf} shrl %cl, 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrl %cl, 291(%r8,%rax,4), %ecx
# CHECK: {evex} shrq %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrq %cl, 291(%r8,%rax,4)
# CHECK: {nf} shrq %cl, 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrq %cl, 291(%r8,%rax,4)
# CHECK: shrq %cl, 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
shrq %cl, 291(%r8,%rax,4), %r9
# CHECK: {nf} shrq %cl, 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd3,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrq %cl, 291(%r8,%rax,4), %r9
# CHECK: {evex} shrw %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd1,0xea]
{evex} shrw %dx
# CHECK: {nf} shrw %dx
# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xd1,0xea]
{nf} shrw %dx
# CHECK: shrw %dx, %dx
# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd1,0xea]
shrw %dx, %dx
# CHECK: {nf} shrw %dx, %dx
# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xd1,0xea]
{nf} shrw %dx, %dx
# CHECK: {evex} shrl %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd1,0xe9]
{evex} shrl %ecx
# CHECK: {nf} shrl %ecx
# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd1,0xe9]
{nf} shrl %ecx
# CHECK: shrl %ecx, %ecx
# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd1,0xe9]
shrl %ecx, %ecx
# CHECK: {nf} shrl %ecx, %ecx
# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xd1,0xe9]
{nf} shrl %ecx, %ecx
# CHECK: {evex} shrq %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0xe9]
{evex} shrq %r9
# CHECK: {nf} shrq %r9
# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd1,0xe9]
{nf} shrq %r9
# CHECK: shrq %r9, %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0xe9]
shrq %r9, %r9
# CHECK: {nf} shrq %r9, %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd1,0xe9]
{nf} shrq %r9, %r9
# CHECK: {evex} shrb 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd0,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrb 291(%r8,%rax,4)
# CHECK: {nf} shrb 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd0,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrb 291(%r8,%rax,4)
# CHECK: shrb 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd0,0xac,0x80,0x23,0x01,0x00,0x00]
shrb 291(%r8,%rax,4), %bl
# CHECK: {nf} shrb 291(%r8,%rax,4), %bl
# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xd0,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrb 291(%r8,%rax,4), %bl
# CHECK: {evex} shrw 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrw 291(%r8,%rax,4)
# CHECK: {nf} shrw 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrw 291(%r8,%rax,4)
# CHECK: shrw 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
shrw 291(%r8,%rax,4), %dx
# CHECK: {nf} shrw 291(%r8,%rax,4), %dx
# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrw 291(%r8,%rax,4), %dx
# CHECK: {evex} shrl 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrl 291(%r8,%rax,4)
# CHECK: {nf} shrl 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrl 291(%r8,%rax,4)
# CHECK: shrl 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
shrl 291(%r8,%rax,4), %ecx
# CHECK: {nf} shrl 291(%r8,%rax,4), %ecx
# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrl 291(%r8,%rax,4), %ecx
# CHECK: {evex} shrq 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{evex} shrq 291(%r8,%rax,4)
# CHECK: {nf} shrq 291(%r8,%rax,4)
# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrq 291(%r8,%rax,4)
# CHECK: shrq 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
shrq 291(%r8,%rax,4), %r9
# CHECK: {nf} shrq 291(%r8,%rax,4), %r9
# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd1,0xac,0x80,0x23,0x01,0x00,0x00]
{nf} shrq 291(%r8,%rax,4), %r9
|