diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-04-26 08:49:41 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-04-26 08:49:41 +0200 |
commit | 1d3f82868db8881cd9ce79ad151fb0a7ebeb2c5a (patch) | |
tree | ee3c455995bb41865782217abed641a53569fdcf /gas/config | |
parent | 59ef5df41e8a2addac4c74bb838fe8295cc79ebf (diff) | |
download | gdb-1d3f82868db8881cd9ce79ad151fb0a7ebeb2c5a.zip gdb-1d3f82868db8881cd9ce79ad151fb0a7ebeb2c5a.tar.gz gdb-1d3f82868db8881cd9ce79ad151fb0a7ebeb2c5a.tar.bz2 |
x86: properly force / avoid forcing EVEX encoding
Pseudo prefixes are supposed to be a hint only - when the specific
encoding can't be used to encode an insn, silently override it. But
this overriding must only happen after the respective check, to
avoid forcing EVEX encoding because of something that isn't a valid
register name in the given context.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 723fc3e..a48cfc2 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -10180,17 +10180,15 @@ parse_real_register (char *reg_string, char **end_op) && (r->reg_num == RegEiz || r->reg_num == RegRiz)) return (const reg_entry *) NULL; - /* Upper 16 vector register is only available with VREX in 64bit - mode. */ - if ((r->reg_flags & RegVRex)) + /* Upper 16 vector registers are only available with VREX in 64bit + mode, and require EVEX encoding. */ + if (r->reg_flags & RegVRex) { - if (i.vec_encoding == vex_encoding_default) - i.vec_encoding = vex_encoding_evex; - if (!cpu_arch_flags.bitfield.cpuvrex - || i.vec_encoding != vex_encoding_evex || flag_code != CODE_64BIT) return (const reg_entry *) NULL; + + i.vec_encoding = vex_encoding_evex; } if (((r->reg_flags & (RegRex64 | RegRex)) |