https://sourceware.org/bugzilla/show_bug.cgi?id=23314

            Bug ID: 23314
           Summary: Displacement values are mis-assembled for vmovdqu64
                    between registers and memory
           Product: binutils
           Version: 2.30
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: pierre.karp...@univ-grenoble-alpes.fr
  Target Milestone: ---

Detailed description
====================
When using vmovdqu64 to copy between a register and a memory location, the
displacement value of the address is incorrectly assembled when it is a
multiple of the register size.
This is illustrated by the following examples

Example 1 (xmm, incorrect):
vmovdqu64 0x10(,%rbx,8), %xmm0 is assembled to vmovdqu64 0x1(,%rbx,8),%xmm0

Example 2 (xmm, incorrect):
vmovdqu64 0x20(,%rbx,8), %xmm0 is assembled to vmovdqu64 0x2(,%rbx,8),%xmm0

Example 3 (xmm, correct):
vmovdqu64 0x11(,%rbx,8), %xmm0 is assembled to vmovdqu64 0x11(,%rbx,8),%xmm0

Example 4 (ymm, incorrect):
vmovdqu64 0x20(,%rbx,8), %ymm0 is assembled to vmovdqu64 0x1(,%rbx,8),%ymm0

Example 5 (ymm, correct):
vmovdqu64 0x10(,%rbx,8), %ymm0 is assembled to vmovdqu64 0x10(,%rbx,8),%ymm0

Example 6 (zmm, incorrect):
vmovdqu64 0x40(,%rbx,8), %zmm0 is assembled to vmovdqu64 0x1(,%rbx,8),%zmm0

Example 7 (zmm, correct):
vmovdqu64 0x41(,%rbx,8), %zmm0 is assembled to vmovdqu64 0x41(,%rbx,8),%zmm0

The same behaviour happens for the related instructions vmovdqa32, vmovdqa64,
vmovdqu8, vmovdqu16, vmovdqu32.

Steps to reproduce
==================
Assemble any of the above examples, and use objdump to see the produced result.


Build date and hardware
=======================
gas-2.30 on Linux 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018
x86_64 x86_64 x86_64 GNU/Linux

Additional Builds and Platforms
===============================
Does not occur with gas-2.29.1 on the same system.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to