aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-07-06 09:21:40 +0200
committerJan Beulich <jbeulich@suse.com>2022-07-06 09:21:40 +0200
commit3ce2ebcf888ef86974be57f7c0ea973538317d11 (patch)
treeb6e55fae539b0dbdad5607ff0b1f06d219c5ce13 /gas/testsuite
parentd92c7521f9b01841f27a16502819081e992dd0f5 (diff)
downloadgdb-3ce2ebcf888ef86974be57f7c0ea973538317d11.zip
gdb-3ce2ebcf888ef86974be57f7c0ea973538317d11.tar.gz
gdb-3ce2ebcf888ef86974be57f7c0ea973538317d11.tar.bz2
x86: permit "default" with .arch
So far there was no way to reset the architecture to that assembly would start with in the absence of any overrides (command line or directives). Note that for Intel MCU "default" is merely an alias of "iamcu". While there also zap a stray @item from the doc section, as noticed when inspecting the generated output (which still has some quirks, but those aren't easy to address without re-flowing almost the entire section).
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/arch-dflt.l19
-rw-r--r--gas/testsuite/gas/i386/arch-dflt.s14
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
3 files changed, 34 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/arch-dflt.l b/gas/testsuite/gas/i386/arch-dflt.l
new file mode 100644
index 0000000..d0953b1
--- /dev/null
+++ b/gas/testsuite/gas/i386/arch-dflt.l
@@ -0,0 +1,19 @@
+.*: Assembler messages:
+.*:3: Error:.*`cmovl'.*
+.*:9: Error:.*`cmovg'.*
+GAS LISTING .*
+
+
+[ ]*[0-9]*[ ]+\.text
+[ ]*[0-9]*[ ]+start:
+[ ]*[0-9]*[ ]+cmovl %eax, %ecx
+[ ]*[0-9]*[ ]*
+[ ]*[0-9]*[ ]+\.arch default
+[ ]*[0-9]*[ ]+\?\?\?\? 0F4DC8[ ]+cmovnl %eax, %ecx
+[ ]*[0-9]*[ ]*
+[ ]*[0-9]*[ ]+\.arch generic32
+[ ]*[0-9]*[ ]+cmovg %eax, %ecx
+[ ]*[0-9]*[ ]*
+[ ]*[0-9]*[ ]+\.arch default
+[ ]*[0-9]*[ ]+\?\?\?\? 0F4EC8[ ]+cmovng %eax, %ecx
+#pass
diff --git a/gas/testsuite/gas/i386/arch-dflt.s b/gas/testsuite/gas/i386/arch-dflt.s
new file mode 100644
index 0000000..718bf6f
--- /dev/null
+++ b/gas/testsuite/gas/i386/arch-dflt.s
@@ -0,0 +1,14 @@
+ .text
+start:
+ cmovl %eax, %ecx
+
+ .arch default
+ cmovnl %eax, %ecx
+
+ .arch generic32
+ cmovg %eax, %ecx
+
+ .arch default
+ cmovng %eax, %ecx
+
+ .end
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index ebb1b49..de4eb1c 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -205,6 +205,7 @@ if [gas_32_check] then {
run_dump_test "arch-12"
run_dump_test "arch-13"
run_dump_test "arch-14"
+ run_list_test "arch-dflt" "-march=generic32 -al"
run_dump_test "8087"
run_dump_test "287"
run_dump_test "387"