llvm.org GIT mirror llvm / 7cdce81
[X86] Properly disassemble gather/scatter instructions where xmm4/ymm4/zmm4 are used as the index. These encodings correspond to the cases in the normal encoding scheme where there is no index and our modrm reading code initially decodes it as such. The VSIB handling code tried to compensate for this, but failed to add the base needed to make later code do the right thing. Fixes PR37712. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334121 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 2 years ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
17721772
17731773 // If sibIndex was set to SIB_INDEX_NONE, index offset is 4.
17741774 if (insn->sibIndex == SIB_INDEX_NONE)
1775 insn->sibIndex = (SIBIndex)4;
1775 insn->sibIndex = (SIBIndex)(insn->sibIndexBase + 4);
17761776
17771777 // If EVEX.v2 is set this is one of the 16-31 registers.
17781778 if (insn->vectorExtensionType == TYPE_EVEX && insn->mode == MODE_64BIT &&
4646 # CHECK: vgatherdpd (%rsi,%ymm0,4), %zmm1 {%k2}
4747 0x62 0xf2 0xfd 0x4a 0x92 0x0c 0x86
4848
49 # CHECK: vgatherqps (%r13,%zmm4), %ymm5 {%k2}
50 0x62 0xd2 0x7d 0x4a 0x93 0x6c 0x25 0x00
51
4952 # CHECK: vpslld $16, %zmm21, %zmm22
5053 0x62 0xb1 0x4d 0x40 0x72 0xf5 0x10
5154