aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-21 08:28:30 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-21 08:28:43 -0700
commit9fef80d683d79934bacd3221f5252ce8c14ff5c0 (patch)
tree9d6a03c5bad5c175d3a2a5dd41034c45a6520956 /gas/config
parent7adc0a8174f1233f6d92edd0671c18c9870e64e7 (diff)
downloadgdb-9fef80d683d79934bacd3221f5252ce8c14ff5c0.zip
gdb-9fef80d683d79934bacd3221f5252ce8c14ff5c0.tar.gz
gdb-9fef80d683d79934bacd3221f5252ce8c14ff5c0.tar.bz2
x86: CET v2.0: Update NOTRACK prefix
Update NOTRACK prefix handling to support memory indirect branch for CET v2.0: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf gas/ * config/tc-i386.c (md_assemble): Update NOTRACK prefix check. * testsuite/gas/i386/notrack-intel.d: Updated. * testsuite/gas/i386/notrack.d: Likewise. * testsuite/gas/i386/notrackbad.l: Likewise. * testsuite/gas/i386/x86-64-notrack-intel.d: Likewise. * testsuite/gas/i386/x86-64-notrack.d: Likewise. * testsuite/gas/i386/x86-64-notrackbad.l: Likewise. * testsuite/gas/i386/notrack.s: Add NOTRACK prefix tests with memory indirect branch. * testsuite/gas/i386/x86-64-notrack.s: Likewise. * testsuite/gas/i386/notrackbad.s: Remove memory indirect branch with NOTRACK prefix. * testsuite/gas/i386/x86-64-notrackbad.s: Likewise. opcodes/ * i386-dis.c (reg_table): Swap indirEv with NOTRACK on "call{&|}" and "jmp{&|}". (NOTRACK_Fixup): Support memory indirect branch with NOTRACK prefix.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 6c1091e..456be9e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -3713,13 +3713,8 @@ md_assemble (char *line)
as_bad (_("expecting valid branch instruction after `bnd'"));
/* Check NOTRACK prefix. */
- if (i.notrack_prefix
- && (!i.tm.opcode_modifier.notrackprefixok
- || i.reg_operands != 1
- || i.disp_operands != 0
- || i.mem_operands != 0
- || i.imm_operands != 0))
- as_bad (_("expecting register indirect branch instruction after `notrack'"));
+ if (i.notrack_prefix && !i.tm.opcode_modifier.notrackprefixok)
+ as_bad (_("expecting indirect branch instruction after `notrack'"));
if (i.tm.cpu_flags.bitfield.cpumpx)
{