public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] x86: extend FPU test coverage for AT&T / Intel mnemonic differences
@ 2022-11-30  8:07 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2022-11-30  8:07 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3df781c5a459249fcb49e20ee36bdcd7bf111f0c

commit 3df781c5a459249fcb49e20ee36bdcd7bf111f0c
Author: Jan Beulich <jbeulich@suse.com>
Date:   Wed Nov 30 09:05:57 2022 +0100

    x86: extend FPU test coverage for AT&T / Intel mnemonic differences
    
    Before touching the templates, let's ensure we actually cover things:
    For one FSUB{,R} and FDIV{,R} would better be tested with operands in
    both possible orders. And then -mmnemonic=intel wasn't tested at all.

Diff:
---
 gas/testsuite/gas/i386/compat-intel.d  |  4 ++++
 gas/testsuite/gas/i386/compat-intel2.d | 31 +++++++++++++++++++++++++++++++
 gas/testsuite/gas/i386/compat.d        |  4 ++++
 gas/testsuite/gas/i386/compat.s        |  4 ++++
 gas/testsuite/gas/i386/i386.exp        |  1 +
 5 files changed, 44 insertions(+)

diff --git a/gas/testsuite/gas/i386/compat-intel.d b/gas/testsuite/gas/i386/compat-intel.d
index d9404f8684e..cbe3c192cb9 100644
--- a/gas/testsuite/gas/i386/compat-intel.d
+++ b/gas/testsuite/gas/i386/compat-intel.d
@@ -9,18 +9,22 @@ Disassembly of section .text:
 
 0+ <.text>:
 [ 	]*[a-f0-9]+:	dc e3                	fsubr  st\(3\),st
+[ 	]*[a-f0-9]+:	d8 e3                	fsub   st,st\(3\)
 [ 	]*[a-f0-9]+:	de e1                	fsubrp st\(1\),st
 [ 	]*[a-f0-9]+:	de e3                	fsubrp st\(3\),st
 [ 	]*[a-f0-9]+:	de e3                	fsubrp st\(3\),st
 [ 	]*[a-f0-9]+:	dc eb                	fsub   st\(3\),st
+[ 	]*[a-f0-9]+:	d8 eb                	fsubr  st,st\(3\)
 [ 	]*[a-f0-9]+:	de e9                	fsubp  st\(1\),st
 [ 	]*[a-f0-9]+:	de eb                	fsubp  st\(3\),st
 [ 	]*[a-f0-9]+:	de eb                	fsubp  st\(3\),st
 [ 	]*[a-f0-9]+:	dc f3                	fdivr  st\(3\),st
+[ 	]*[a-f0-9]+:	d8 f3                	fdiv   st,st\(3\)
 [ 	]*[a-f0-9]+:	de f1                	fdivrp st\(1\),st
 [ 	]*[a-f0-9]+:	de f3                	fdivrp st\(3\),st
 [ 	]*[a-f0-9]+:	de f3                	fdivrp st\(3\),st
 [ 	]*[a-f0-9]+:	dc fb                	fdiv   st\(3\),st
+[ 	]*[a-f0-9]+:	d8 fb                	fdivr  st,st\(3\)
 [ 	]*[a-f0-9]+:	de f9                	fdivp  st\(1\),st
 [ 	]*[a-f0-9]+:	de fb                	fdivp  st\(3\),st
 [ 	]*[a-f0-9]+:	de fb                	fdivp  st\(3\),st
diff --git a/gas/testsuite/gas/i386/compat-intel2.d b/gas/testsuite/gas/i386/compat-intel2.d
new file mode 100644
index 00000000000..035e0ca01e1
--- /dev/null
+++ b/gas/testsuite/gas/i386/compat-intel2.d
@@ -0,0 +1,31 @@
+#as: -mmnemonic=intel
+#objdump: -d -Mintel-mnemonic
+#name: i386 float Intel mnemonic (2)
+#source: compat.s
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <.text>:
+[ 	]*[a-f0-9]+:	dc eb                	fsub   st\(3\),st
+[ 	]*[a-f0-9]+:	d8 e3                	fsub   st,st\(3\)
+[ 	]*[a-f0-9]+:	de e9                	fsubp  st\(1\),st
+[ 	]*[a-f0-9]+:	de eb                	fsubp  st\(3\),st
+[ 	]*[a-f0-9]+:	de eb                	fsubp  st\(3\),st
+[ 	]*[a-f0-9]+:	dc e3                	fsubr  st\(3\),st
+[ 	]*[a-f0-9]+:	d8 eb                	fsubr  st,st\(3\)
+[ 	]*[a-f0-9]+:	de e1                	fsubrp st\(1\),st
+[ 	]*[a-f0-9]+:	de e3                	fsubrp st\(3\),st
+[ 	]*[a-f0-9]+:	de e3                	fsubrp st\(3\),st
+[ 	]*[a-f0-9]+:	dc fb                	fdiv   st\(3\),st
+[ 	]*[a-f0-9]+:	d8 f3                	fdiv   st,st\(3\)
+[ 	]*[a-f0-9]+:	de f9                	fdivp  st\(1\),st
+[ 	]*[a-f0-9]+:	de fb                	fdivp  st\(3\),st
+[ 	]*[a-f0-9]+:	de fb                	fdivp  st\(3\),st
+[ 	]*[a-f0-9]+:	dc f3                	fdivr  st\(3\),st
+[ 	]*[a-f0-9]+:	d8 fb                	fdivr  st,st\(3\)
+[ 	]*[a-f0-9]+:	de f1                	fdivrp st\(1\),st
+[ 	]*[a-f0-9]+:	de f3                	fdivrp st\(3\),st
+[ 	]*[a-f0-9]+:	de f3                	fdivrp st\(3\),st
+#pass
diff --git a/gas/testsuite/gas/i386/compat.d b/gas/testsuite/gas/i386/compat.d
index 575f2bb193a..e2884d8b141 100644
--- a/gas/testsuite/gas/i386/compat.d
+++ b/gas/testsuite/gas/i386/compat.d
@@ -8,18 +8,22 @@ Disassembly of section .text:
 
 0+ <.text>:
 [ 	]*[a-f0-9]+:	dc e3                	fsub   %st,%st\(3\)
+[ 	]*[a-f0-9]+:	d8 e3                	fsub   %st\(3\),%st
 [ 	]*[a-f0-9]+:	de e1                	fsubp  %st,%st\(1\)
 [ 	]*[a-f0-9]+:	de e3                	fsubp  %st,%st\(3\)
 [ 	]*[a-f0-9]+:	de e3                	fsubp  %st,%st\(3\)
 [ 	]*[a-f0-9]+:	dc eb                	fsubr  %st,%st\(3\)
+[ 	]*[a-f0-9]+:	d8 eb                	fsubr  %st\(3\),%st
 [ 	]*[a-f0-9]+:	de e9                	fsubrp %st,%st\(1\)
 [ 	]*[a-f0-9]+:	de eb                	fsubrp %st,%st\(3\)
 [ 	]*[a-f0-9]+:	de eb                	fsubrp %st,%st\(3\)
 [ 	]*[a-f0-9]+:	dc f3                	fdiv   %st,%st\(3\)
+[ 	]*[a-f0-9]+:	d8 f3                	fdiv   %st\(3\),%st
 [ 	]*[a-f0-9]+:	de f1                	fdivp  %st,%st\(1\)
 [ 	]*[a-f0-9]+:	de f3                	fdivp  %st,%st\(3\)
 [ 	]*[a-f0-9]+:	de f3                	fdivp  %st,%st\(3\)
 [ 	]*[a-f0-9]+:	dc fb                	fdivr  %st,%st\(3\)
+[ 	]*[a-f0-9]+:	d8 fb                	fdivr  %st\(3\),%st
 [ 	]*[a-f0-9]+:	de f9                	fdivrp %st,%st\(1\)
 [ 	]*[a-f0-9]+:	de fb                	fdivrp %st,%st\(3\)
 [ 	]*[a-f0-9]+:	de fb                	fdivrp %st,%st\(3\)
diff --git a/gas/testsuite/gas/i386/compat.s b/gas/testsuite/gas/i386/compat.s
index 17163115eda..2b4f06dc388 100644
--- a/gas/testsuite/gas/i386/compat.s
+++ b/gas/testsuite/gas/i386/compat.s
@@ -1,18 +1,22 @@
 # Check SYSV mnemonic instructions.
 	.text 
 	fsub	%st,%st(3)
+	fsub	%st(3),%st
 	fsubp
 	fsubp	%st(3)
 	fsubp	%st,%st(3)
 	fsubr	%st,%st(3)
+	fsubr	%st(3),%st
 	fsubrp
 	fsubrp	%st(3)
 	fsubrp	%st,%st(3)
 	fdiv	%st,%st(3)
+	fdiv	%st(3),%st
 	fdivp
 	fdivp	%st(3)
 	fdivp	%st,%st(3)
 	fdivr	%st,%st(3)
+	fdivr	%st(3),%st
 	fdivrp
 	fdivrp	%st(3)
 	fdivrp	%st,%st(3)
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index f989e56a578..42960075222 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -178,6 +178,7 @@ if [gas_32_check] then {
     run_dump_test "i386-intel"
     run_dump_test "compat"
     run_dump_test "compat-intel"
+    run_dump_test "compat-intel2"
     run_dump_test "arch-1"
     run_dump_test "arch-2"
     run_dump_test "arch-3"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-30  8:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30  8:07 [binutils-gdb] x86: extend FPU test coverage for AT&T / Intel mnemonic differences Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).