ppc: support fdmadds instruction
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 28 May 2023 22:04:58 +0000 (01:04 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 14 Nov 2023 19:53:37 +0000 (22:53 +0300)
gas/testsuite/gas/ppc/fdmadds.d [new file with mode: 0644]
gas/testsuite/gas/ppc/fdmadds.s [new file with mode: 0644]
gas/testsuite/gas/ppc/ppc.exp
opcodes/ppc-opc.c

diff --git a/gas/testsuite/gas/ppc/fdmadds.d b/gas/testsuite/gas/ppc/fdmadds.d
new file mode 100644 (file)
index 0000000..7c1eb56
--- /dev/null
@@ -0,0 +1,14 @@
+#as: -mlibresoc
+#objdump: -dr -Mlibresoc
+
+.*:     file format .*
+
+
+Disassembly of section \.text:
+0+ <\.text>:
+.*:\s+(ef e0 00 36|36 00 e0 ef)\s+fdmadds\s+f31,f0,f0
+.*:\s+(ec 1f 00 36|36 00 1f ec)\s+fdmadds\s+f0,f31,f0
+.*:\s+(ec 00 f8 36|36 f8 00 ec)\s+fdmadds\s+f0,f0,f31
+.*:\s+(ef e0 00 37|37 00 e0 ef)\s+fdmadds.\s+f31,f0,f0
+.*:\s+(ec 1f 00 37|37 00 1f ec)\s+fdmadds.\s+f0,f31,f0
+.*:\s+(ec 00 f8 37|37 f8 00 ec)\s+fdmadds.\s+f0,f0,f31
diff --git a/gas/testsuite/gas/ppc/fdmadds.s b/gas/testsuite/gas/ppc/fdmadds.s
new file mode 100644 (file)
index 0000000..fd504ad
--- /dev/null
@@ -0,0 +1,6 @@
+fdmadds 31,0,0
+fdmadds 0,31,0
+fdmadds 0,0,31
+fdmadds. 31,0,0
+fdmadds. 0,31,0
+fdmadds. 0,0,31
index 18c7ba0d842b9b7ef0f6c503223344bc8e8b8a3f..5da429e1a802139806f040e860cbe2223078081b 100644 (file)
@@ -179,3 +179,4 @@ run_dump_test "ffmsubs"
 run_dump_test "ffmadds"
 run_dump_test "ffnmsubs"
 run_dump_test "ffnmadds"
+run_dump_test "fdmadds"
index 63507983c669b264ff3a9d7b49e89d0851e8ecb8..d168258374fa3b6d683304c9c46c4a25bc2626bb 100644 (file)
@@ -9222,6 +9222,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 {"frsqrtes.",  A(59,26,1),   AFRAFRC_MASK,  POWER7,    PPCVLE,         {FRT, FRB}},
 {"frsqrtes.",  A(59,26,1),   AFRALFRC_MASK, POWER5,    POWER7|PPCVLE,  {FRT, FRB, A_L}},
 
+{"fdmadds",    A(59,27,0),     AFRC_MASK,   SFFS,      PPCVLE,         {FRT, FRA, FRB}},
+{"fdmadds.",   A(59,27,1),     AFRC_MASK,   SFFS,      PPCVLE,         {FRT, FRA, FRB}},
+
 {"fmsubs",     A(59,28,0),     A_MASK,      PPC,       PPCEFS|PPCVLE,  {FRT, FRA, FRC, FRB}},
 {"fmsubs.",    A(59,28,1),     A_MASK,      PPC,       PPCEFS|PPCVLE,  {FRT, FRA, FRC, FRB}},