aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/fence-as-lock-add-no.d14
-rw-r--r--gas/testsuite/gas/i386/fence-as-lock-add-yes.d14
-rw-r--r--gas/testsuite/gas/i386/fence-as-lock-add.s6
-rw-r--r--gas/testsuite/gas/i386/i386.exp4
-rw-r--r--gas/testsuite/gas/i386/x86-64-fence-as-lock-add-no.d14
-rw-r--r--gas/testsuite/gas/i386/x86-64-fence-as-lock-add-yes.d14
6 files changed, 66 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/fence-as-lock-add-no.d b/gas/testsuite/gas/i386/fence-as-lock-add-no.d
new file mode 100644
index 0000000..2083066
--- /dev/null
+++ b/gas/testsuite/gas/i386/fence-as-lock-add-no.d
@@ -0,0 +1,14 @@
+#source: fence-as-lock-add.s
+#as: -mfence-as-lock-add=no
+#objdump: -dw
+#name: i386 fence as lock add = no
+
+.*: +file format .*i386.*
+
+Disassembly of section .text:
+
+0+ <main>:
+[ ]*[a-f0-9]+: 0f ae e8[ ]* lfence
+[ ]*[a-f0-9]+: 0f ae f0[ ]* mfence
+[ ]*[a-f0-9]+: 0f ae f8[ ]* sfence
+#pass
diff --git a/gas/testsuite/gas/i386/fence-as-lock-add-yes.d b/gas/testsuite/gas/i386/fence-as-lock-add-yes.d
new file mode 100644
index 0000000..4ee6300
--- /dev/null
+++ b/gas/testsuite/gas/i386/fence-as-lock-add-yes.d
@@ -0,0 +1,14 @@
+#source: fence-as-lock-add.s
+#as: -mfence-as-lock-add=yes
+#objdump: -dw
+#name: i386 fence as lock add = yes
+
+.*: +file format .*i386.*
+
+Disassembly of section .text:
+
+0+ <main>:
+[ ]*[a-f0-9]+: f0 83 04 24 00[ ]* lock addl \$0x0,\(%esp\)
+[ ]*[a-f0-9]+: f0 83 04 24 00[ ]* lock addl \$0x0,\(%esp\)
+[ ]*[a-f0-9]+: f0 83 04 24 00[ ]* lock addl \$0x0,\(%esp\)
+#pass
diff --git a/gas/testsuite/gas/i386/fence-as-lock-add.s b/gas/testsuite/gas/i386/fence-as-lock-add.s
new file mode 100644
index 0000000..5ecb1d9
--- /dev/null
+++ b/gas/testsuite/gas/i386/fence-as-lock-add.s
@@ -0,0 +1,6 @@
+ .text
+.globl main
+main:
+ lfence
+ mfence
+ sfence
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index e23a4e5..b9144c4 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -303,6 +303,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "avx512dq_vl"
run_dump_test "omit-lock-yes"
run_dump_test "omit-lock-no"
+ run_dump_test "fence-as-lock-add-yes"
+ run_dump_test "fence-as-lock-add-no"
run_dump_test "avx512dq-rcigrd-intel"
run_dump_test "avx512dq-rcigrd"
run_dump_test "avx512dq-rcigrne-intel"
@@ -731,6 +733,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-mwaitx-bdver4"
run_list_test "x86-64-mwaitx-reg"
run_dump_test "x86-64-ospke"
+ run_dump_test "x86-64-fence-as-lock-add-yes"
+ run_dump_test "x86-64-fence-as-lock-add-no"
if { ![istarget "*-*-aix*"]
&& ![istarget "*-*-beos*"]
diff --git a/gas/testsuite/gas/i386/x86-64-fence-as-lock-add-no.d b/gas/testsuite/gas/i386/x86-64-fence-as-lock-add-no.d
new file mode 100644
index 0000000..9277448
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-fence-as-lock-add-no.d
@@ -0,0 +1,14 @@
+#source: fence-as-lock-add.s
+#as: -mfence-as-lock-add=no
+#objdump: -dw
+#name: x86-64 fence as lock add = no
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <main>:
+[ ]*[a-f0-9]+: 0f ae e8[ ]* lfence
+[ ]*[a-f0-9]+: 0f ae f0[ ]* mfence
+[ ]*[a-f0-9]+: 0f ae f8[ ]* sfence
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-fence-as-lock-add-yes.d b/gas/testsuite/gas/i386/x86-64-fence-as-lock-add-yes.d
new file mode 100644
index 0000000..9451cd8
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-fence-as-lock-add-yes.d
@@ -0,0 +1,14 @@
+#source: fence-as-lock-add.s
+#as: -mfence-as-lock-add=yes
+#objdump: -dw
+#name: x86-64 fence as lock add = yes
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <main>:
+[ ]*[a-f0-9]+: f0 83 04 24 00[ ]* lock addl \$0x0,\(%rsp\)
+[ ]*[a-f0-9]+: f0 83 04 24 00[ ]* lock addl \$0x0,\(%rsp\)
+[ ]*[a-f0-9]+: f0 83 04 24 00[ ]* lock addl \$0x0,\(%rsp\)
+#pass