diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-06-01 08:39:54 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-06-01 08:39:54 +0200 |
commit | 44846f29ab3a5fdab229cb63d9cd42323ed85767 (patch) | |
tree | 0de4b8a702d455786f47e07a30a283cf821efb65 /gas/config | |
parent | 4787f4a5860864337c4f1261713b9462b79ea16a (diff) | |
download | gdb-44846f29ab3a5fdab229cb63d9cd42323ed85767.zip gdb-44846f29ab3a5fdab229cb63d9cd42323ed85767.tar.gz gdb-44846f29ab3a5fdab229cb63d9cd42323ed85767.tar.bz2 |
x86: relax redundant REX prefix check
All REX bits can be specified via individual prefixes. Redundancy should
only be reported on a per-bit basis.
Note that I originally had further checks added to the test case,
checking the effect also on PDEP. I had to strip those, because my patch
to correctly handle those
(https://sourceware.org/ml/binutils/2017-02/msg00280.html) was rejected.
I continue to think that there should not be any new prefix introduced
to handle the VEX case - whether the encoding of an insn requires VEX et
al should not be of immediate interest to the programmer.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 07a4e11..2d20f1c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2330,8 +2330,9 @@ add_prefix (unsigned int prefix) && flag_code == CODE_64BIT) { if ((i.prefix[REX_PREFIX] & prefix & REX_W) - || ((i.prefix[REX_PREFIX] & (REX_R | REX_X | REX_B)) - && (prefix & (REX_R | REX_X | REX_B)))) + || (i.prefix[REX_PREFIX] & prefix & REX_R) + || (i.prefix[REX_PREFIX] & prefix & REX_X) + || (i.prefix[REX_PREFIX] & prefix & REX_B)) ret = PREFIX_EXIST; q = REX_PREFIX; } |