aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-03-26 11:43:19 +0100
committerJan Beulich <jbeulich@suse.com>2021-03-26 11:43:19 +0100
commitc3344b626d4c593f81a840be521d9ad47d37f979 (patch)
treed9b3c47d13a07f29a60c796023b5194e8a2a97dd /gas
parent574d27ede49e565bc4d951ae547eeee7ae9f74bf (diff)
downloadgdb-c3344b626d4c593f81a840be521d9ad47d37f979.zip
gdb-c3344b626d4c593f81a840be521d9ad47d37f979.tar.gz
gdb-c3344b626d4c593f81a840be521d9ad47d37f979.tar.bz2
x86-64: don't accept supposedly disabled MOVQ forms
While all of MMX, SSE, and SSE2 are included in "generic64", they can be individually disabled. There are two MOVQ forms lacking respective attributes. While the MMX one would get refused anyway (due to MMX registers not recognized with .nommx), the assembler did happily accept the SSE2 form. Add respective CPU settings to both, paralleling what the MOVD counterparts have.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/x86-64-nosse2.l15
-rw-r--r--gas/testsuite/gas/i386/x86-64-nosse2.s9
4 files changed, 31 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f6c350d..4f6bcf7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2021-03-26 Jan Beulich <jbeulich@suse.com>
+
+ * testsuite/gas/i386/x86-64-nosse2.s,
+ testsuite/gas/i386/x86-64-nosse2.l: New.
+ * testsuite/gas/i386/i386.exp: Run new test.
+
2021-03-25 Abid Qadeer <abidh@codesourcery.com>
* testsuite/gas/nios2/brn.d: New.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 2282f52..e1dab45 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -826,6 +826,7 @@ if [gas_64_check] then {
run_list_test "noreg-intel64" "-I${srcdir}/$subdir -mintel64"
run_list_test "movx64" "-al"
run_list_test "cvtsi2sX"
+ run_list_test "x86-64-nosse2" "-al"
run_dump_test "x86-64-sse4_1"
run_dump_test "x86-64-sse4_1-intel"
run_dump_test "x86-64-sse4_2"
diff --git a/gas/testsuite/gas/i386/x86-64-nosse2.l b/gas/testsuite/gas/i386/x86-64-nosse2.l
new file mode 100644
index 0000000..2404dc3
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-nosse2.l
@@ -0,0 +1,15 @@
+.*: Assembler messages:
+.*:6: Error: .*paddb.*
+.*:7: Error: .*movq.*
+.*:8: Error: .*movq.*
+GAS LISTING .*
+#...
+[ ]*1[ ]+\# Test \.arch \.nosse2
+[ ]*2[ ]+\.text
+[ ]*3[ ]+\.arch generic64
+[ ]*4[ ]+\.arch \.nosse2
+[ ]*5[ ]+\?\?\?\? 0F58C0 addps %xmm0, %xmm0
+[ ]*6[ ]+paddb %xmm0, %xmm0
+[ ]*7[ ]+movq %xmm0, %rax
+[ ]*8[ ]+movq %rax, %xmm0
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-nosse2.s b/gas/testsuite/gas/i386/x86-64-nosse2.s
new file mode 100644
index 0000000..b151ac2
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-nosse2.s
@@ -0,0 +1,9 @@
+# Test .arch .nosse2
+ .text
+ .arch generic64
+ .arch .nosse2
+ addps %xmm0, %xmm0
+ paddb %xmm0, %xmm0
+ movq %xmm0, %rax
+ movq %rax, %xmm0
+ .p2align 4