aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2020-03-04 08:58:13 +0100
committerJan Beulich <jbeulich@suse.com>2020-03-04 08:58:13 +0100
commita847e32224d9a4297514a9a291c024c207eefdb9 (patch)
tree4b3249c7f20c260a86f95a95b67f2c7693ee54fe /gas
parent45830fd60e3c7b694dfa03f6fc1e7de431a3fcd1 (diff)
downloadfsf-binutils-gdb-a847e32224d9a4297514a9a291c024c207eefdb9.zip
fsf-binutils-gdb-a847e32224d9a4297514a9a291c024c207eefdb9.tar.gz
fsf-binutils-gdb-a847e32224d9a4297514a9a291c024c207eefdb9.tar.bz2
x86: support VMGEXIT
It has been publicly documented for quite some time, albeit not in the "General-Purpose and System Instructions" volume: https://www.amd.com/system/files/TechDocs/24593.pdf.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/config/tc-i386.c2
-rw-r--r--gas/doc/c-i386.texi3
-rw-r--r--gas/testsuite/gas/i386/arch-13-znver1.d2
-rw-r--r--gas/testsuite/gas/i386/arch-13-znver2.d2
-rw-r--r--gas/testsuite/gas/i386/arch-13.d3
-rw-r--r--gas/testsuite/gas/i386/arch-13.s3
7 files changed, 21 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ed717af..7a2dfe1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2020-03-04 Jan Beulich <jbeulich@suse.com>
+
+ * config/tc-i386.c (cpu_arch): Add .sev_es entry.
+ * doc/c-i386.texi: Mention sev_es.
+ * testsuite/gas/i386/arch-13.s: Add SEV-ES case.
+ * testsuite/gas/i386/arch-13.d: Extend -march=. Adjust
+ expectations.
+ * testsuite/gas/i386/arch-13-znver1.d,
+ testsuite/gas/i386/arch-13-znver2.d: Extend -march=.
+
2020-03-03 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (match_template): Replace ignoresize and
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index af0a1cb..7117aeb 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1188,6 +1188,8 @@ static const arch_entry cpu_arch[] =
CPU_RDPRU_FLAGS, 0 },
{ STRING_COMMA_LEN (".mcommit"), PROCESSOR_UNKNOWN,
CPU_MCOMMIT_FLAGS, 0 },
+ { STRING_COMMA_LEN (".sev_es"), PROCESSOR_UNKNOWN,
+ CPU_SEV_ES_FLAGS, 0 },
};
static const noarch_entry cpu_noarch[] =
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index 8c8e8d0..c536759 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -251,6 +251,7 @@ accept various extension mnemonics. For example,
@code{cldemote},
@code{rdpru},
@code{mcommit},
+@code{sev_es},
@code{lwp},
@code{fma4},
@code{xop},
@@ -1454,7 +1455,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are:
@item @samp{.syscall} @tab @samp{.rdtscp} @tab @samp{.svme}
@item @samp{.lwp} @tab @samp{.fma4} @tab @samp{.xop} @tab @samp{.cx16}
@item @samp{.padlock} @tab @samp{.clzero} @tab @samp{.mwaitx} @tab @samp{.rdpru}
-@item @samp{.mcommit}
+@item @samp{.mcommit} @tab @samp{.sev_es}
@end multitable
Apart from the warning, there are only two other effects on
diff --git a/gas/testsuite/gas/i386/arch-13-znver1.d b/gas/testsuite/gas/i386/arch-13-znver1.d
index df7ebf5..74acde5 100644
--- a/gas/testsuite/gas/i386/arch-13-znver1.d
+++ b/gas/testsuite/gas/i386/arch-13-znver1.d
@@ -1,5 +1,5 @@
#source: arch-13.s
-#as: -march=znver1+rdpid+clwb+wbnoinvd+rdpru+mcommit
+#as: -march=znver1+rdpid+clwb+wbnoinvd+rdpru+mcommit+sev_es
#objdump: -dw
#name: i386 arch 13 (znver1)
#dump: arch-13.d
diff --git a/gas/testsuite/gas/i386/arch-13-znver2.d b/gas/testsuite/gas/i386/arch-13-znver2.d
index c410305..6634447 100644
--- a/gas/testsuite/gas/i386/arch-13-znver2.d
+++ b/gas/testsuite/gas/i386/arch-13-znver2.d
@@ -1,5 +1,5 @@
#source: arch-13.s
-#as: -march=znver2
+#as: -march=znver2+sev_es
#objdump: -dw
#name: i386 arch 13 (znver2)
#dump: arch-13.d
diff --git a/gas/testsuite/gas/i386/arch-13.d b/gas/testsuite/gas/i386/arch-13.d
index 7e575bf..cbfc4a2 100644
--- a/gas/testsuite/gas/i386/arch-13.d
+++ b/gas/testsuite/gas/i386/arch-13.d
@@ -1,4 +1,4 @@
-#as: -march=i686+smap+adx+rdseed+clzero+xsavec+xsaves+clflushopt+mwaitx+rdpid+clwb+wbnoinvd+rdpru+mcommit
+#as: -march=i686+smap+adx+rdseed+clzero+xsavec+xsaves+clflushopt+mwaitx+rdpid+clwb+wbnoinvd+rdpru+mcommit+sev_es
#objdump: -dw
#name: i386 arch 13
@@ -28,5 +28,6 @@ Disassembly of section .text:
[ ]*[a-f0-9]+:[ ]*f3 0f 01 fa[ ]*mcommit[ ]*
[ ]*[a-f0-9]+:[ ]*f3 0f c7 f8[ ]*rdpid %eax
[ ]*[a-f0-9]+:[ ]*0f 01 fd[ ]*rdpru[ ]*
+[ ]*[a-f0-9]+:[ ]*f3 0f 01 d9[ ]*vmgexit[ ]*
[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]*
#pass
diff --git a/gas/testsuite/gas/i386/arch-13.s b/gas/testsuite/gas/i386/arch-13.s
index 1c20cfe..5372d85 100644
--- a/gas/testsuite/gas/i386/arch-13.s
+++ b/gas/testsuite/gas/i386/arch-13.s
@@ -38,5 +38,8 @@
# rdpru instruction
rdpru
+# vmgexit instruction
+ vmgexit
+
# wbnoinvd instruction
wbnoinvd