diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-09-23 11:12:23 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-09-23 11:14:27 -0700 |
commit | 9e5e52835bb205850fb0fa6f0393ecd64b02b22f (patch) | |
tree | ecb5c7769eef2148002068ad1e66d657d197edbe /gas/config/tc-i386.c | |
parent | c4d9ceb6473237e614c66be97351109b9f260505 (diff) | |
download | gdb-9e5e52835bb205850fb0fa6f0393ecd64b02b22f.zip gdb-9e5e52835bb205850fb0fa6f0393ecd64b02b22f.tar.gz gdb-9e5e52835bb205850fb0fa6f0393ecd64b02b22f.tar.bz2 |
Disallow VEX/EVEX encoded instructions in 16-bit mode
gas/
PR gas/17421
* config/tc-i386.c (md_assemble): Disallow VEX/EVEX encoded
instructions in 16-bit mode.
gas/testsuite/
PR gas/17421
* gas/i386/i386.exp: Run inval-16.
* gas/i386/inval-16.l: New file.
* gas/i386/inval-16.s: Likewise.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index fa4ea11..68ca7e4 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -3633,11 +3633,20 @@ md_assemble (char *line) as_warn (_("translating to `%sp'"), i.tm.name); } - if (i.tm.opcode_modifier.vex) - build_vex_prefix (t); + if (i.tm.opcode_modifier.vex || i.tm.opcode_modifier.evex) + { + if (flag_code == CODE_16BIT) + { + as_bad (_("instruction `%s' isn't supported in 16-bit mode."), + i.tm.name); + return; + } - if (i.tm.opcode_modifier.evex) - build_evex_prefix (); + if (i.tm.opcode_modifier.vex) + build_vex_prefix (t); + else + build_evex_prefix (); + } /* Handle conversion of 'int $3' --> special int3 insn. XOP or FMA4 instructions may define INT_OPCODE as well, so avoid this corner |