Skip to content

[X86] Incorrect shuffle comment decoding for vinsertps #117141

@omern1

Description

@omern1

Reproducer

; input.s
.intel_syntax
vinsertps xmm2,xmm2,dword ptr [r14+rdi*8+0x4C],0x0B0

Current behaviour

> llvm-mc -triple x86_64-unknown-unknown input.s

.text
vinsertps       $176, 76(%r14,%rdi,8), %xmm2, %xmm2 # xmm2 = xmm2[0,1,2],mem[2]

Note that shuffle comment says mem[2]. The part describing vinsertps operation in the Intel SDM says the following:

IF (SRC = REG) THEN COUNT_S := imm8[7:6] ELSE COUNT_S := 0

In input.s the source for the vinsertps is not a register therefore the source index in the comment should be 0 (mem[0]).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions