This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] x86: Add NOTRACK prefix support
On Tue, May 23, 2017 at 2:21 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi H.J.
>
>> For register indirect branches, NOTRACK prefix (0x3e), which is also
>> the DS segment register prefix, can be used to ignore the CET indirect
>> branch track.
>>
>> I will check it in shortly.
>
> The new test triggered some new failures for non-ELF based x86 targets:
>
> Checking Binutils in: i386-darwin ... GAS i386 notrackbad
Does i386-darwin assembler really work? I got
FAIL: i386 opcodes
FAIL: i386 opcodes (Intel disassembly)
FAIL: i386 opcodes (w/ suffix)
FAIL: i386 intel
FAIL: i386 sub
FAIL: .bundle_align_mode diagnostics
FAIL: i386 MPX
FAIL: Check -madd-bnd-prefix
FAIL: x86_64
FAIL: x86-64 (Intel mode)
FAIL: x86-64 pcrel
FAIL: x86-64 relax 1
FAIL: x86-64 immed
FAIL: x86-64 RTM insns
FAIL: x86-64 RTM insns (Intel disassembly)
FAIL: x86-64 MPX
FAIL: Check -madd-bnd-prefix (x86-64)
FAIL: gas/mach-o/dysymtab-1
FAIL: gas/mach-o/dysymtab-2
FAIL: gas/mach-o/dysymtab-3
If yes, someone should fix those. Otherwise, we should disable i386-darwin
assembler, similar to x86_64 darwin.
> Checking Binutils in: x86_64-pc-cygwin ... GAS i386 notrackbad, i386 x86-64-notrackbad
> Checking Binutils in: i386-pc-go32 ... GAS i386 notrackbad
> Checking Binutils in: i686-pc-cygwin ... GAS i386 notrackbad
> Checking Binutils in: i686-pc-mingw32 ... GAS i386 notrackbad
> Checking Binutils in: mingw32-pe ... GAS i386 notrackbad
>
> Would you mind updating the tests please ?
>
I checked in this patch.
--
H.J.
From 6e92fed5946111a76064feb8a2a184d224deae1a Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 23 May 2017 06:49:35 -0700
Subject: [PATCH] x86: Update notrackbad tests for non-ELF targets
* gas/testsuite/gas/i386/notrackbad.l: Updated for non-ELF
targets.
* gas/testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
---
gas/ChangeLog | 6 ++++++
gas/testsuite/gas/i386/notrackbad.l | 11 ++++++-----
gas/testsuite/gas/i386/x86-64-notrackbad.l | 11 ++++++-----
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d332c1e..2e7bb8d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/testsuite/gas/i386/notrackbad.l: Updated for non-ELF
+ targets.
+ * gas/testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
+
2017-05-23 Claudiu Zissulescu <claziss@synopsys.com>
* config/tc-arc.c (md_apply_fix): Use as_bad_where.
diff --git a/gas/testsuite/gas/i386/notrackbad.l b/gas/testsuite/gas/i386/notrackbad.l
index b092ab2..0f8cf7d 100644
--- a/gas/testsuite/gas/i386/notrackbad.l
+++ b/gas/testsuite/gas/i386/notrackbad.l
@@ -23,14 +23,14 @@ GAS LISTING .*
[ ]*3[ ]+\.allow_index_reg
[ ]*4[ ]+\.text
[ ]*5[ ]+_start:
-[ ]*6[ ]+\?\?\?\? E8FCFFFF notrack call foo
+[ ]*6[ ]+\?\?\?\? [0-9A-F]* notrack call foo
\*\*\*\* Error: expecting register indirect branch instruction after `notrack'
\*\*\*\* Warning: skipping prefixes on this instruction
-[ ]*6[ ]+FF
-[ ]*7[ ]+\?\?\?\? E9FCFFFF notrack jmp foo
+[ ]*6[ ]+[0-9A-F]*
+[ ]*7[ ]+\?\?\?\? [0-9A-F]* notrack jmp foo
\*\*\*\* Error: expecting register indirect branch instruction after `notrack'
\*\*\*\* Warning: skipping prefixes on this instruction
-[ ]*7[ ]+FF
+[ ]*7[ ]+[0-9A-F]*
[ ]*8[ ]+
[ ]*9[ ]+\?\?\?\? 3EFF10 notrack call \*\(%eax\)
\*\*\*\* Error: expecting register indirect branch instruction after `notrack'
@@ -49,4 +49,5 @@ GAS LISTING .*
[ ]*19[ ]+fs notrack call eax
[ ]*20[ ]+notrack fs call eax
[ ]*21[ ]+notrack bnd call eax
-[ ]*22[ ]+notrack data16 call eax
+[ ]*22.*[ ]+notrack data16 call eax
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-notrackbad.l b/gas/testsuite/gas/i386/x86-64-notrackbad.l
index a72e37d..f76c7e5 100644
--- a/gas/testsuite/gas/i386/x86-64-notrackbad.l
+++ b/gas/testsuite/gas/i386/x86-64-notrackbad.l
@@ -23,14 +23,14 @@ GAS LISTING .*
[ ]*3[ ]+\.allow_index_reg
[ ]*4[ ]+\.text
[ ]*5[ ]+_start:
-[ ]*6[ ]+\?\?\?\? E8000000 notrack call foo
+[ ]*6[ ]+\?\?\?\? [0-9A-F]* notrack call foo
\*\*\*\* Error: expecting register indirect branch instruction after `notrack'
\*\*\*\* Warning: skipping prefixes on this instruction
-[ ]*6[ ]+00
-[ ]*7[ ]+\?\?\?\? E9000000 notrack jmp foo
+[ ]*6[ ]+[0-9A-F]*
+[ ]*7[ ]+\?\?\?\? [0-9A-F]* notrack jmp foo
\*\*\*\* Error: expecting register indirect branch instruction after `notrack'
\*\*\*\* Warning: skipping prefixes on this instruction
-[ ]*7[ ]+00
+[ ]*7[ ]+[0-9A-F]*
[ ]*8[ ]+
[ ]*9[ ]+\?\?\?\? 3EFF10 notrack call \*\(%rax\)
\*\*\*\* Error: expecting register indirect branch instruction after `notrack'
@@ -49,4 +49,5 @@ GAS LISTING .*
[ ]*19[ ]+fs notrack call rax
[ ]*20[ ]+notrack fs call rax
[ ]*21[ ]+notrack bnd call rax
-[ ]*22[ ]+notrack data16 call rax
+[ ]*22.*[ ]+notrack data16 call rax
+#pass
--
2.9.4