aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-04-26 08:48:56 +0200
committerJan Beulich <jbeulich@suse.com>2018-04-26 08:48:56 +0200
commit59ef5df41e8a2addac4c74bb838fe8295cc79ebf (patch)
tree42051518164fa26aa716d64e4db439fa9cb38acc /gas
parent6e041cf4b0b00e85bee85bee98c411f16bd15747 (diff)
downloadgdb-59ef5df41e8a2addac4c74bb838fe8295cc79ebf.zip
gdb-59ef5df41e8a2addac4c74bb838fe8295cc79ebf.tar.gz
gdb-59ef5df41e8a2addac4c74bb838fe8295cc79ebf.tar.bz2
x86: CpuXSAVE is a prereq for various other features
All of AVX, LWP, MPX, and PKU require XSAVE, and hence it as well as XRSTOR should be enabled when enabling these ISA extensions. Leverage these implications to shorten some of the cpu_flag_init[] entries.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/i386/xsave-intel.d12
-rw-r--r--gas/testsuite/gas/i386/xsave.d12
-rw-r--r--gas/testsuite/gas/i386/xsave.s25
4 files changed, 56 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 18c2f65..7981f81 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2018-04-26 Jan Beulich <jbeulich@suse.com>
+ * testsuite/gas/i386/xsave.s: Add AVX, LWP, MPX, and PKU
+ dependency tests.
+ * testsuite/gas/i386/xsave.d,
+ testsuite/gas/i386/xsave-intel.d: Adjust expecations.
+
+2018-04-26 Jan Beulich <jbeulich@suse.com>
+
* config/tc-i386.c (parse_real_register): Re-write {,x,y,z}mm
and mask register handling.
* testsuite/gas/i386/avx512f-ymm.s, testsuite/gas/i386/avx512f-ymm.d,
diff --git a/gas/testsuite/gas/i386/xsave-intel.d b/gas/testsuite/gas/i386/xsave-intel.d
index fc40a67..c43e33a 100644
--- a/gas/testsuite/gas/i386/xsave-intel.d
+++ b/gas/testsuite/gas/i386/xsave-intel.d
@@ -16,4 +16,16 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 0f ae 29 xrstor \[ecx\]
[ ]*[a-f0-9]+: 0f ae 21 xsave \[ecx\]
[ ]*[a-f0-9]+: 0f ae 31 xsaveopt \[ecx\]
+[a-f0-9]+ <avx>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \[eax\]
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \[eax\]
+[a-f0-9]+ <lwp>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \[eax\]
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \[eax\]
+[a-f0-9]+ <mpx>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \[eax\]
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \[eax\]
+[a-f0-9]+ <pku>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \[eax\]
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \[eax\]
#pass
diff --git a/gas/testsuite/gas/i386/xsave.d b/gas/testsuite/gas/i386/xsave.d
index 2abb8ad..d9cf2da 100644
--- a/gas/testsuite/gas/i386/xsave.d
+++ b/gas/testsuite/gas/i386/xsave.d
@@ -14,4 +14,16 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 0f ae 29 xrstor \(%ecx\)
[ ]*[a-f0-9]+: 0f ae 21 xsave \(%ecx\)
[ ]*[a-f0-9]+: 0f ae 31 xsaveopt \(%ecx\)
+[a-f0-9]+ <avx>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \(%eax\)
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \(%eax\)
+[a-f0-9]+ <lwp>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \(%eax\)
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \(%eax\)
+[a-f0-9]+ <mpx>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \(%eax\)
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \(%eax\)
+[a-f0-9]+ <pku>:
+[ ]*[a-f0-9]+: 0f ae 20 xsave \(%eax\)
+[ ]*[a-f0-9]+: 0f ae 28 xrstor \(%eax\)
#pass
diff --git a/gas/testsuite/gas/i386/xsave.s b/gas/testsuite/gas/i386/xsave.s
index 37c7d50..1a9848b 100644
--- a/gas/testsuite/gas/i386/xsave.s
+++ b/gas/testsuite/gas/i386/xsave.s
@@ -11,3 +11,28 @@ _start:
xrstor [ecx]
xsave [ecx]
xsaveopt [ecx]
+
+ .att_syntax prefix
+avx:
+ .arch generic32
+ .arch .avx
+ xsave (%eax)
+ xrstor (%eax)
+
+lwp:
+ .arch generic32
+ .arch .lwp
+ xsave (%eax)
+ xrstor (%eax)
+
+mpx:
+ .arch generic32
+ .arch .mpx
+ xsave (%eax)
+ xrstor (%eax)
+
+pku:
+ .arch generic32
+ .arch .ospke
+ xsave (%eax)
+ xrstor (%eax)