Bug 19909 - .d32 suffix is ignored for instructions with VEC_DISP8
Summary: .d32 suffix is ignored for instructions with VEC_DISP8
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.27
: P2 normal
Target Milestone: 2.27
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-05 03:35 UTC by H.J. Lu
Modified: 2016-04-15 13:26 UTC (History)
0 users

See Also:
Host:
Target: x86
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2016-04-05 03:35:24 UTC
[hjl@gnu-tools-1 gas]$ cat /tmp/x.s
vmovdqu64.d32 -0x40(%eax),%xmm3
[hjl@gnu-tools-1 gas]$ gcc -c /tmp/x.s
[hjl@gnu-tools-1 gas]$ objdump -dwr x.o

x.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <.text>:
   0:	67 62 f1 fe 08 6f 58 fc 	vmovdqu64 -0x40(%eax),%xmm3
[hjl@gnu-tools-1 gas]$
Comment 1 Sourceware Commits 2016-04-05 04:25:06 UTC
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5be33403c378ceb9487ad14a1309392dc03a1263

commit 5be33403c378ceb9487ad14a1309392dc03a1263
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Apr 4 21:19:27 2016 -0700

    Don't use vec_disp8 encoding with the .d32 suffix
    
    Since the .d32 suffix prefers 32-bit displacement in encoding, try
    vec_disp8 encoding only if i.disp_encoding != disp_encoding_32bit.
    
    	PR gas/19909
    	* config/tc-i386.c (check_VecOperands): Try vec_disp8 encoding
    	only if i.disp_encoding != disp_encoding_32bit.
    	* gas/testsuite/gas/i386/disp32.s: Add tests for vmovdqu64.d32.
    	* gas/testsuite/gas/i386/x86-64-disp32.s: Likewise.
    	* gas/testsuite/gas/i386/disp32.d: Updated.
    	* gas/testsuite/gas/i386/x86-64-disp32.d: Likewise.
Comment 2 Sourceware Commits 2016-04-15 13:00:24 UTC
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0796a6293fca5a6f4fd17e6ec38fb0db5dd3a36a

commit 0796a6293fca5a6f4fd17e6ec38fb0db5dd3a36a
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Apr 15 05:59:16 2016 -0700

    Add missing ChangeLog entry for PR gas/19909 fix
Comment 3 Sourceware Commits 2016-04-15 13:25:53 UTC
The binutils-2_26-branch branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cd59d24ee1480b5cce2fcb2ca21c7ea055c6d8e4

commit cd59d24ee1480b5cce2fcb2ca21c7ea055c6d8e4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Apr 15 06:01:31 2016 -0700

    Don't use vec_disp8 encoding with the .d32 suffix
    
    Since the .d32 suffix prefers 32-bit displacement in encoding, try
    vec_disp8 encoding only if i.disp_encoding != disp_encoding_32bit.
    
    Backport from master
    
    	PR gas/19909
    	* config/tc-i386.c (check_VecOperands): Try vec_disp8 encoding
    	only if i.disp_encoding != disp_encoding_32bit.
    	* gas/testsuite/gas/i386/disp32.s: Add tests for vmovdqu64.d32.
    	* gas/testsuite/gas/i386/x86-64-disp32.s: Likewise.
    	* gas/testsuite/gas/i386/disp32.d: Updated.
    	* gas/testsuite/gas/i386/x86-64-disp32.d: Likewise.
Comment 4 H.J. Lu 2016-04-15 13:26:30 UTC
Fixed for 2.27 and 2.26 branch.