288 lines · plain
1# RUN: llvm-mc -triple x86_64 -show-encoding %s | FileCheck %s2# RUN: not llvm-mc -triple i386 -show-encoding %s 2>&1 | FileCheck %s --check-prefix=ERROR3 4# ERROR-COUNT-94: error:5# ERROR-NOT: error:6# CHECK: {evex} shlb $123, %bl7# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc0,0xe3,0x7b]8 {evex} shlb $123, %bl9# CHECK: {nf} shlb $123, %bl10# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xc0,0xe3,0x7b]11 {nf} shlb $123, %bl12# CHECK: shlb $123, %bl, %bl13# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xc0,0xe3,0x7b]14 shlb $123, %bl, %bl15# CHECK: {nf} shlb $123, %bl, %bl16# CHECK: encoding: [0x62,0xf4,0x64,0x1c,0xc0,0xe3,0x7b]17 {nf} shlb $123, %bl, %bl18# CHECK: {evex} shlw $123, %dx19# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xc1,0xe2,0x7b]20 {evex} shlw $123, %dx21# CHECK: {nf} shlw $123, %dx22# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xc1,0xe2,0x7b]23 {nf} shlw $123, %dx24# CHECK: shlw $123, %dx, %dx25# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xc1,0xe2,0x7b]26 shlw $123, %dx, %dx27# CHECK: {nf} shlw $123, %dx, %dx28# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xc1,0xe2,0x7b]29 {nf} shlw $123, %dx, %dx30# CHECK: {evex} shll $123, %ecx31# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc1,0xe1,0x7b]32 {evex} shll $123, %ecx33# CHECK: {nf} shll $123, %ecx34# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xc1,0xe1,0x7b]35 {nf} shll $123, %ecx36# CHECK: shll $123, %ecx, %ecx37# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xc1,0xe1,0x7b]38 shll $123, %ecx, %ecx39# CHECK: {nf} shll $123, %ecx, %ecx40# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xc1,0xe1,0x7b]41 {nf} shll $123, %ecx, %ecx42# CHECK: {evex} shlq $123, %r943# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0xe1,0x7b]44 {evex} shlq $123, %r945# CHECK: {nf} shlq $123, %r946# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xc1,0xe1,0x7b]47 {nf} shlq $123, %r948# CHECK: shlq $123, %r9, %r949# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0xe1,0x7b]50 shlq $123, %r9, %r951# CHECK: {nf} shlq $123, %r9, %r952# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xc1,0xe1,0x7b]53 {nf} shlq $123, %r9, %r954# CHECK: {evex} shlb $123, 291(%r8,%rax,4)55# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]56 {evex} shlb $123, 291(%r8,%rax,4)57# CHECK: {nf} shlb $123, 291(%r8,%rax,4)58# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]59 {nf} shlb $123, 291(%r8,%rax,4)60# CHECK: shlb $123, 291(%r8,%rax,4), %bl61# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]62 shlb $123, 291(%r8,%rax,4), %bl63# CHECK: {nf} shlb $123, 291(%r8,%rax,4), %bl64# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]65 {nf} shlb $123, 291(%r8,%rax,4), %bl66# CHECK: {evex} shlw $123, 291(%r8,%rax,4)67# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]68 {evex} shlw $123, 291(%r8,%rax,4)69# CHECK: {nf} shlw $123, 291(%r8,%rax,4)70# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]71 {nf} shlw $123, 291(%r8,%rax,4)72# CHECK: shlw $123, 291(%r8,%rax,4), %dx73# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]74 shlw $123, 291(%r8,%rax,4), %dx75# CHECK: {nf} shlw $123, 291(%r8,%rax,4), %dx76# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]77 {nf} shlw $123, 291(%r8,%rax,4), %dx78# CHECK: {evex} shll $123, 291(%r8,%rax,4)79# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]80 {evex} shll $123, 291(%r8,%rax,4)81# CHECK: {nf} shll $123, 291(%r8,%rax,4)82# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]83 {nf} shll $123, 291(%r8,%rax,4)84# CHECK: shll $123, 291(%r8,%rax,4), %ecx85# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]86 shll $123, 291(%r8,%rax,4), %ecx87# CHECK: {nf} shll $123, 291(%r8,%rax,4), %ecx88# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]89 {nf} shll $123, 291(%r8,%rax,4), %ecx90# CHECK: {evex} shlq $123, 291(%r8,%rax,4)91# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]92 {evex} shlq $123, 291(%r8,%rax,4)93# CHECK: {nf} shlq $123, 291(%r8,%rax,4)94# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]95 {nf} shlq $123, 291(%r8,%rax,4)96# CHECK: shlq $123, 291(%r8,%rax,4), %r997# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]98 shlq $123, 291(%r8,%rax,4), %r999# CHECK: {nf} shlq $123, 291(%r8,%rax,4), %r9100# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]101 {nf} shlq $123, 291(%r8,%rax,4), %r9102# CHECK: {evex} shlb %bl103# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd0,0xe3]104 {evex} shlb %bl105# CHECK: {nf} shlb %bl106# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd0,0xe3]107 {nf} shlb %bl108# CHECK: {evex} shlb %cl, %bl109# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd2,0xe3]110 {evex} shlb %cl, %bl111# CHECK: {nf} shlb %cl, %bl112# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd2,0xe3]113 {nf} shlb %cl, %bl114# CHECK: shlb %cl, %bl, %bl115# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xd2,0xe3]116 shlb %cl, %bl, %bl117# CHECK: {nf} shlb %cl, %bl, %bl118# CHECK: encoding: [0x62,0xf4,0x64,0x1c,0xd2,0xe3]119 {nf} shlb %cl, %bl, %bl120# CHECK: {evex} shlw %cl, %dx121# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd3,0xe2]122 {evex} shlw %cl, %dx123# CHECK: {nf} shlw %cl, %dx124# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xd3,0xe2]125 {nf} shlw %cl, %dx126# CHECK: shlw %cl, %dx, %dx127# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd3,0xe2]128 shlw %cl, %dx, %dx129# CHECK: {nf} shlw %cl, %dx, %dx130# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xd3,0xe2]131 {nf} shlw %cl, %dx, %dx132# CHECK: {evex} shll %cl, %ecx133# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd3,0xe1]134 {evex} shll %cl, %ecx135# CHECK: {nf} shll %cl, %ecx136# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd3,0xe1]137 {nf} shll %cl, %ecx138# CHECK: shll %cl, %ecx, %ecx139# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd3,0xe1]140 shll %cl, %ecx, %ecx141# CHECK: {nf} shll %cl, %ecx, %ecx142# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xd3,0xe1]143 {nf} shll %cl, %ecx, %ecx144# CHECK: {evex} shlq %cl, %r9145# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0xe1]146 {evex} shlq %cl, %r9147# CHECK: {nf} shlq %cl, %r9148# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd3,0xe1]149 {nf} shlq %cl, %r9150# CHECK: shlq %cl, %r9, %r9151# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0xe1]152 shlq %cl, %r9, %r9153# CHECK: {nf} shlq %cl, %r9, %r9154# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd3,0xe1]155 {nf} shlq %cl, %r9, %r9156# CHECK: {evex} shlb %cl, 291(%r8,%rax,4)157# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]158 {evex} shlb %cl, 291(%r8,%rax,4)159# CHECK: {nf} shlb %cl, 291(%r8,%rax,4)160# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]161 {nf} shlb %cl, 291(%r8,%rax,4)162# CHECK: shlb %cl, 291(%r8,%rax,4), %bl163# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]164 shlb %cl, 291(%r8,%rax,4), %bl165# CHECK: {nf} shlb %cl, 291(%r8,%rax,4), %bl166# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]167 {nf} shlb %cl, 291(%r8,%rax,4), %bl168# CHECK: {evex} shlw %cl, 291(%r8,%rax,4)169# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]170 {evex} shlw %cl, 291(%r8,%rax,4)171# CHECK: {nf} shlw %cl, 291(%r8,%rax,4)172# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]173 {nf} shlw %cl, 291(%r8,%rax,4)174# CHECK: shlw %cl, 291(%r8,%rax,4), %dx175# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]176 shlw %cl, 291(%r8,%rax,4), %dx177# CHECK: {nf} shlw %cl, 291(%r8,%rax,4), %dx178# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]179 {nf} shlw %cl, 291(%r8,%rax,4), %dx180# CHECK: {evex} shll %cl, 291(%r8,%rax,4)181# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]182 {evex} shll %cl, 291(%r8,%rax,4)183# CHECK: {nf} shll %cl, 291(%r8,%rax,4)184# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]185 {nf} shll %cl, 291(%r8,%rax,4)186# CHECK: shll %cl, 291(%r8,%rax,4), %ecx187# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]188 shll %cl, 291(%r8,%rax,4), %ecx189# CHECK: {nf} shll %cl, 291(%r8,%rax,4), %ecx190# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]191 {nf} shll %cl, 291(%r8,%rax,4), %ecx192# CHECK: {evex} shlq %cl, 291(%r8,%rax,4)193# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]194 {evex} shlq %cl, 291(%r8,%rax,4)195# CHECK: {nf} shlq %cl, 291(%r8,%rax,4)196# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]197 {nf} shlq %cl, 291(%r8,%rax,4)198# CHECK: shlq %cl, 291(%r8,%rax,4), %r9199# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]200 shlq %cl, 291(%r8,%rax,4), %r9201# CHECK: {nf} shlq %cl, 291(%r8,%rax,4), %r9202# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]203 {nf} shlq %cl, 291(%r8,%rax,4), %r9204# CHECK: {evex} shlw %dx205# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd1,0xe2]206 {evex} shlw %dx207# CHECK: {nf} shlw %dx208# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xd1,0xe2]209 {nf} shlw %dx210# CHECK: shlw %dx, %dx211# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd1,0xe2]212 shlw %dx, %dx213# CHECK: {nf} shlw %dx, %dx214# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xd1,0xe2]215 {nf} shlw %dx, %dx216# CHECK: {evex} shll %ecx217# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd1,0xe1]218 {evex} shll %ecx219# CHECK: {nf} shll %ecx220# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd1,0xe1]221 {nf} shll %ecx222# CHECK: shll %ecx, %ecx223# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd1,0xe1]224 shll %ecx, %ecx225# CHECK: {nf} shll %ecx, %ecx226# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xd1,0xe1]227 {nf} shll %ecx, %ecx228# CHECK: {evex} shlq %r9229# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0xe1]230 {evex} shlq %r9231# CHECK: {nf} shlq %r9232# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd1,0xe1]233 {nf} shlq %r9234# CHECK: shlq %r9, %r9235# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0xe1]236 shlq %r9, %r9237# CHECK: {nf} shlq %r9, %r9238# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd1,0xe1]239 {nf} shlq %r9, %r9240# CHECK: {evex} shlb 291(%r8,%rax,4)241# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]242 {evex} shlb 291(%r8,%rax,4)243# CHECK: {nf} shlb 291(%r8,%rax,4)244# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]245 {nf} shlb 291(%r8,%rax,4)246# CHECK: shlb 291(%r8,%rax,4), %bl247# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]248 shlb 291(%r8,%rax,4), %bl249# CHECK: {nf} shlb 291(%r8,%rax,4), %bl250# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]251 {nf} shlb 291(%r8,%rax,4), %bl252# CHECK: {evex} shlw 291(%r8,%rax,4)253# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]254 {evex} shlw 291(%r8,%rax,4)255# CHECK: {nf} shlw 291(%r8,%rax,4)256# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]257 {nf} shlw 291(%r8,%rax,4)258# CHECK: shlw 291(%r8,%rax,4), %dx259# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]260 shlw 291(%r8,%rax,4), %dx261# CHECK: {nf} shlw 291(%r8,%rax,4), %dx262# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]263 {nf} shlw 291(%r8,%rax,4), %dx264# CHECK: {evex} shll 291(%r8,%rax,4)265# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]266 {evex} shll 291(%r8,%rax,4)267# CHECK: {nf} shll 291(%r8,%rax,4)268# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]269 {nf} shll 291(%r8,%rax,4)270# CHECK: shll 291(%r8,%rax,4), %ecx271# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]272 shll 291(%r8,%rax,4), %ecx273# CHECK: {nf} shll 291(%r8,%rax,4), %ecx274# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]275 {nf} shll 291(%r8,%rax,4), %ecx276# CHECK: {evex} shlq 291(%r8,%rax,4)277# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]278 {evex} shlq 291(%r8,%rax,4)279# CHECK: {nf} shlq 291(%r8,%rax,4)280# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]281 {nf} shlq 291(%r8,%rax,4)282# CHECK: shlq 291(%r8,%rax,4), %r9283# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]284 shlq 291(%r8,%rax,4), %r9285# CHECK: {nf} shlq 291(%r8,%rax,4), %r9286# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]287 {nf} shlq 291(%r8,%rax,4), %r9288