aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIgor Tsimbalist <igor.v.tsimbalist@intel.com>2018-01-17 19:45:52 +0300
committerIgor Tsimbalist <igor.v.tsimbalist@intel.com>2018-01-17 19:48:28 +0300
commitd777820bf5abea433c36e956b53b299502e0f708 (patch)
tree16f28c3084e70a09de9fae5527b26d06a4a761fa /gas
parent4bfce1283654832d83a01b700e61518233c8bbda (diff)
downloadgdb-d777820bf5abea433c36e956b53b299502e0f708.zip
gdb-d777820bf5abea433c36e956b53b299502e0f708.tar.gz
gdb-d777820bf5abea433c36e956b53b299502e0f708.tar.bz2
Replace CET bit with IBT and SHSTK bits.
The latest specification for Intel CET technology defined two new bits instead of previously used CET bit. These are IBT and SHSTK bits. The patch replaces CET bit with IBT and SHSTK bits. gas/ * config/tc-i386.c (cpu_arch): Delete .cet. Add .ibt, .shstk. (cpu_noarch): Add noibt, noshstk. (parse_insn): Change cpucet to cpuibt. * doc/c-i386.texi: Delete .cet. Add .ibt, .shstk. * testsuite/gas/i386/cet-ibt-inval.l: New test. * testsuite/gas/i386/cet-ibt-inval.s: Likewise. * testsuite/gas/i386/cet-shstk-inval.l: Likewise. * testsuite/gas/i386/cet-shstk-inval.s: Likewise. * testsuite/gas/i386/x86-64-cet-ibt-inval.l: Likewise. * testsuite/gas/i386/x86-64-cet-ibt-inval.s: Likewise. * testsuite/gas/i386/x86-64-cet-shstk-inval.l: Likewise. * testsuite/gas/i386/x86-64-cet-shstk-inval.s: Likewise. opcodes/ * i386-gen.c (cpu_flag_init): Delete CPU_CET_FLAGS, CpuCET. Add CPU_IBT_FLAGS, CPU_SHSTK_FLAGS, CPY_ANY_IBT_FLAGS, CPU_ANY_SHSTK_FLAGS, CpuIBT, CpuSHSTK. (cpu_flags): Add CpuIBT, CpuSHSTK. * i386-opc.h (enum): Add CpuIBT, CpuSHSTK. (i386_cpu_flags): Add cpuibt, cpushstk. * i386-opc.tbl: Change CpuCET to CpuSHSTK and CpuIBT. * i386-init.h: Regenerate. * i386-tbl.h: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog15
-rw-r--r--gas/config/tc-i386.c10
-rw-r--r--gas/doc/c-i386.texi6
-rw-r--r--gas/testsuite/gas/i386/cet-ibt-inval.l3
-rw-r--r--gas/testsuite/gas/i386/cet-ibt-inval.s7
-rw-r--r--gas/testsuite/gas/i386/cet-shstk-inval.l3
-rw-r--r--gas/testsuite/gas/i386/cet-shstk-inval.s7
-rw-r--r--gas/testsuite/gas/i386/i386.exp4
-rw-r--r--gas/testsuite/gas/i386/x86-64-cet-ibt-inval.l3
-rw-r--r--gas/testsuite/gas/i386/x86-64-cet-ibt-inval.s7
-rw-r--r--gas/testsuite/gas/i386/x86-64-cet-shstk-inval.l3
-rw-r--r--gas/testsuite/gas/i386/x86-64-cet-shstk-inval.s7
12 files changed, 69 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 875d265..04c922b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,18 @@
+2018-01-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+
+ * config/tc-i386.c (cpu_arch): Delete .cet. Add .ibt, .shstk.
+ (cpu_noarch): Add noibt, noshstk.
+ (parse_insn): Change cpucet to cpuibt.
+ * doc/c-i386.texi: Delete .cet. Add .ibt, .shstk.
+ * testsuite/gas/i386/cet-ibt-inval.l: New test.
+ * testsuite/gas/i386/cet-ibt-inval.s: Likewise.
+ * testsuite/gas/i386/cet-shstk-inval.l: Likewise.
+ * testsuite/gas/i386/cet-shstk-inval.s: Likewise.
+ * testsuite/gas/i386/x86-64-cet-ibt-inval.l: Likewise.
+ * testsuite/gas/i386/x86-64-cet-ibt-inval.s: Likewise.
+ * testsuite/gas/i386/x86-64-cet-shstk-inval.l: Likewise.
+ * testsuite/gas/i386/x86-64-cet-shstk-inval.s: Likewise.
+
2018-01-16 Nick Clifton <nickc@redhat.com>
* po/fr.po: Updated French translation.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 5cd83da..cd69321 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -997,8 +997,10 @@ static const arch_entry cpu_arch[] =
CPU_RDPID_FLAGS, 0 },
{ STRING_COMMA_LEN (".ptwrite"), PROCESSOR_UNKNOWN,
CPU_PTWRITE_FLAGS, 0 },
- { STRING_COMMA_LEN (".cet"), PROCESSOR_UNKNOWN,
- CPU_CET_FLAGS, 0 },
+ { STRING_COMMA_LEN (".ibt"), PROCESSOR_UNKNOWN,
+ CPU_IBT_FLAGS, 0 },
+ { STRING_COMMA_LEN (".shstk"), PROCESSOR_UNKNOWN,
+ CPU_SHSTK_FLAGS, 0 },
{ STRING_COMMA_LEN (".gfni"), PROCESSOR_UNKNOWN,
CPU_GFNI_FLAGS, 0 },
{ STRING_COMMA_LEN (".vaes"), PROCESSOR_UNKNOWN,
@@ -1038,6 +1040,8 @@ static const noarch_entry cpu_noarch[] =
{ STRING_COMMA_LEN ("noavx512_vbmi2"), CPU_ANY_AVX512_VBMI2_FLAGS },
{ STRING_COMMA_LEN ("noavx512_vnni"), CPU_ANY_AVX512_VNNI_FLAGS },
{ STRING_COMMA_LEN ("noavx512_bitalg"), CPU_ANY_AVX512_BITALG_FLAGS },
+ { STRING_COMMA_LEN ("noibt"), CPU_ANY_IBT_FLAGS },
+ { STRING_COMMA_LEN ("noshstk"), CPU_ANY_SHSTK_FLAGS },
};
#ifdef I386COFF
@@ -4048,7 +4052,7 @@ parse_insn (char *line, char *mnemonic)
case PREFIX_EXIST:
return NULL;
case PREFIX_DS:
- if (current_templates->start->cpu_flags.bitfield.cpucet)
+ if (current_templates->start->cpu_flags.bitfield.cpuibt)
i.notrack_prefix = current_templates->start->name;
break;
case PREFIX_REP:
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index e500e7c..73d6bb1 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -1239,12 +1239,12 @@ supported on the CPU specified. The choices for @var{cpu_type} are:
@item @samp{.avx512vbmi} @tab @samp{.avx512_4fmaps} @tab @samp{.avx512_4vnniw}
@item @samp{.avx512_vpopcntdq} @tab @samp{.avx512_vbmi2} @tab @samp{.avx512_vnni}
@item @samp{.avx512_bitalg}
-@item @samp{.clwb} @tab @samp{.rdpid} @tab @samp{.ptwrite} @tab @item @samp{.cet}
+@item @samp{.clwb} @tab @samp{.rdpid} @tab @samp{.ptwrite} @tab @item @samp{.ibt}
+@item @samp{.shstk} @tab @samp{.gfni} @tab @samp{.vaes} @tab @samp{.vpclmulqdq}
@item @samp{.3dnow} @tab @samp{.3dnowa} @tab @samp{.sse4a} @tab @samp{.sse5}
@item @samp{.syscall} @tab @samp{.rdtscp} @tab @samp{.svme} @tab @samp{.abm}
@item @samp{.lwp} @tab @samp{.fma4} @tab @samp{.xop} @tab @samp{.cx16}
-@item @samp{.padlock} @tab @samp{.clzero} @tab @samp{.mwaitx} @tab @samp{.gfni}
-@item @samp{.vaes} @tab @samp{.vpclmulqdq}
+@item @samp{.padlock} @tab @samp{.clzero} @tab @samp{.mwaitx}
@end multitable
Apart from the warning, there are only two other effects on
diff --git a/gas/testsuite/gas/i386/cet-ibt-inval.l b/gas/testsuite/gas/i386/cet-ibt-inval.l
new file mode 100644
index 0000000..d646e36
--- /dev/null
+++ b/gas/testsuite/gas/i386/cet-ibt-inval.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:6: Error: `endbr32' is not supported on `i386.noibt'
+.*:7: Error: `endbr64' is not supported on `i386.noibt'
diff --git a/gas/testsuite/gas/i386/cet-ibt-inval.s b/gas/testsuite/gas/i386/cet-ibt-inval.s
new file mode 100644
index 0000000..33a6f77
--- /dev/null
+++ b/gas/testsuite/gas/i386/cet-ibt-inval.s
@@ -0,0 +1,7 @@
+ .arch .ibt
+ endbr32
+ endbr64
+
+ .arch .noibt
+ endbr32
+ endbr64
diff --git a/gas/testsuite/gas/i386/cet-shstk-inval.l b/gas/testsuite/gas/i386/cet-shstk-inval.l
new file mode 100644
index 0000000..892b72c
--- /dev/null
+++ b/gas/testsuite/gas/i386/cet-shstk-inval.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:6: Error: `incsspd' is not supported on `i386.noshstk'
+.*:7: Error: `rdsspd' is not supported on `i386.noshstk'
diff --git a/gas/testsuite/gas/i386/cet-shstk-inval.s b/gas/testsuite/gas/i386/cet-shstk-inval.s
new file mode 100644
index 0000000..53bae24
--- /dev/null
+++ b/gas/testsuite/gas/i386/cet-shstk-inval.s
@@ -0,0 +1,7 @@
+ .arch .shstk
+ incsspd %ecx
+ rdsspd %ecx
+
+ .arch .noshstk
+ incsspd %ecx
+ rdsspd %ecx
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 184c65e..b81cc20 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -418,6 +418,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "fpu-bad"
run_dump_test "cet"
run_dump_test "cet-intel"
+ run_list_test "cet-ibt-inval"
+ run_list_test "cet-shstk-inval"
run_dump_test "pseudos"
run_dump_test "notrack"
run_dump_test "notrack-intel"
@@ -886,6 +888,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-opcode-bad"
run_dump_test "x86-64-cet"
run_dump_test "x86-64-cet-intel"
+ run_list_test "x86-64-cet-ibt-inval"
+ run_list_test "x86-64-cet-shstk-inval"
run_dump_test "x86-64-pseudos"
run_dump_test "x86-64-notrack"
run_dump_test "x86-64-notrack-intel"
diff --git a/gas/testsuite/gas/i386/x86-64-cet-ibt-inval.l b/gas/testsuite/gas/i386/x86-64-cet-ibt-inval.l
new file mode 100644
index 0000000..1353527
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-cet-ibt-inval.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:6: Error: `endbr32' is not supported on `x86_64.noibt'
+.*:7: Error: `endbr64' is not supported on `x86_64.noibt'
diff --git a/gas/testsuite/gas/i386/x86-64-cet-ibt-inval.s b/gas/testsuite/gas/i386/x86-64-cet-ibt-inval.s
new file mode 100644
index 0000000..33a6f77
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-cet-ibt-inval.s
@@ -0,0 +1,7 @@
+ .arch .ibt
+ endbr32
+ endbr64
+
+ .arch .noibt
+ endbr32
+ endbr64
diff --git a/gas/testsuite/gas/i386/x86-64-cet-shstk-inval.l b/gas/testsuite/gas/i386/x86-64-cet-shstk-inval.l
new file mode 100644
index 0000000..84178b2
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-cet-shstk-inval.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:6: Error: `incsspd' is not supported on `x86_64.noshstk'
+.*:7: Error: `rdsspd' is not supported on `x86_64.noshstk'
diff --git a/gas/testsuite/gas/i386/x86-64-cet-shstk-inval.s b/gas/testsuite/gas/i386/x86-64-cet-shstk-inval.s
new file mode 100644
index 0000000..53bae24
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-cet-shstk-inval.s
@@ -0,0 +1,7 @@
+ .arch .shstk
+ incsspd %ecx
+ rdsspd %ecx
+
+ .arch .noshstk
+ incsspd %ecx
+ rdsspd %ecx