x86: Add -mvexwig=[0|1] option to assembler
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 17 Sep 2018 16:26:18 +0000 (09:26 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 17 Sep 2018 16:26:29 +0000 (09:26 -0700)
commit03751133023c5623cf60f8d3222cb79a376331f9
tree0ae561fd6f959782ff846f94f20465ee0d47a3a1
parentec6f095abc396e60f46e1b4724d0eb2e4d18213d
x86: Add -mvexwig=[0|1] option to assembler

Add -mvexwig=[0|1] option to x86 assembler to control how the assembler
should encode the VEX.W bit in WIG VEX instructions.

* gas/NEWS: Mention -mvexwig=[0|1] option.
* config/tc-i386.c (vexwig): New.
(build_vex_prefix): Set the VEX.W bit for -mvexwig=1 for WIG
VEX instructions.
(OPTION_MVEXWIG): New.
(md_longopts): Add -mvexwig=.
(md_parse_option): Handle OPTION_MVEXWIG.
(md_show_usage): Show -mvexwig=[0|1].
* doc/c-i386.texi: Document -mvexwig=[0|1].
* testsuite/gas/i386/avx-wig.d: New file.
* testsuite/gas/i386/avx-wig.s: Likewise.
* testsuite/gas/i386/avx2-wig.d: Likewise.
* testsuite/gas/i386/avx2-wig.s: Likewise.
* testsuite/gas/i386/x86-64-avx-wig.d: Likewise.
* testsuite/gas/i386/x86-64-avx-wig.s: Likewise.
* testsuite/gas/i386/x86-64-avx2-wig.d: Likewise.
* testsuite/gas/i386/x86-64-avx2-wig.s: Likewise.
* testsuite/gas/i386/i386.exp: Run avx-wig, avx2-wig,
x86-64-avx-wig and x86-64-avx2-wig.
13 files changed:
gas/ChangeLog
gas/NEWS
gas/config/tc-i386.c
gas/doc/c-i386.texi
gas/testsuite/gas/i386/avx-wig.d [new file with mode: 0644]
gas/testsuite/gas/i386/avx-wig.s [new file with mode: 0644]
gas/testsuite/gas/i386/avx2-wig.d [new file with mode: 0644]
gas/testsuite/gas/i386/avx2-wig.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/x86-64-avx-wig.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-avx-wig.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-avx2-wig.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-avx2-wig.s [new file with mode: 0644]