ppc: support ffadds instruction
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 28 May 2023 22:04:58 +0000 (01:04 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Thu, 29 Feb 2024 16:55:21 +0000 (19:55 +0300)
gas/testsuite/gas/ppc/ffadds.d [new file with mode: 0644]
gas/testsuite/gas/ppc/ffadds.s [new file with mode: 0644]
gas/testsuite/gas/ppc/ppc.exp
opcodes/ppc-opc.c

diff --git a/gas/testsuite/gas/ppc/ffadds.d b/gas/testsuite/gas/ppc/ffadds.d
new file mode 100644 (file)
index 0000000..daac033
--- /dev/null
@@ -0,0 +1,14 @@
+#as: -mlibresoc
+#objdump: -dr -Mlibresoc
+
+.*:     file format .*
+
+
+Disassembly of section \.text:
+0+ <\.text>:
+.*:\s+(ef e0 07 c0|c0 07 e0 ef)\s+ffadds\s+f31,f0,f0
+.*:\s+(ec 1f 07 c0|c0 07 1f ec)\s+ffadds\s+f0,f31,f0
+.*:\s+(ec 00 ff c0|c0 ff 00 ec)\s+ffadds\s+f0,f0,f31
+.*:\s+(ef e0 07 c1|c1 07 e0 ef)\s+ffadds.\s+f31,f0,f0
+.*:\s+(ec 1f 07 c1|c1 07 1f ec)\s+ffadds.\s+f0,f31,f0
+.*:\s+(ec 00 ff c1|c1 ff 00 ec)\s+ffadds.\s+f0,f0,f31
diff --git a/gas/testsuite/gas/ppc/ffadds.s b/gas/testsuite/gas/ppc/ffadds.s
new file mode 100644 (file)
index 0000000..8529c62
--- /dev/null
@@ -0,0 +1,6 @@
+ffadds 31,0,0
+ffadds 0,31,0
+ffadds 0,0,31
+ffadds. 31,0,0
+ffadds. 0,31,0
+ffadds. 0,0,31
index 5da429e1a802139806f040e860cbe2223078081b..9cbfcc231e1843710eaa7c5b2343c609cfac0808 100644 (file)
@@ -180,3 +180,4 @@ run_dump_test "ffmadds"
 run_dump_test "ffnmsubs"
 run_dump_test "ffnmadds"
 run_dump_test "fdmadds"
+run_dump_test "ffmadds"
index d168258374fa3b6d683304c9c46c4a25bc2626bb..ab06775d9ff7344f4f1fd46773c8b481eb154afb 100644 (file)
@@ -9507,6 +9507,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 {"flog10s.",   XRC(59,973,1),  X_MASK, SFFS,   PPCVLE, {FRT, FRB}},
 {"fremainders",        XRC(59,975,0),  X_MASK, SFFS,   PPCVLE, {FRT, FRA, FRB}},
 {"fremainders.",       XRC(59,975,1),  X_MASK, SFFS,   PPCVLE, {FRT, FRA, FRB}},
+{"ffadds",     A(59,992,0),    AFRC_MASK,      SFFS,   PPCVLE,         {FRT, FRA, FRB}},
+{"ffadds.",    A(59,992,1),    AFRC_MASK,      SFFS,   PPCVLE,         {FRT, FRA, FRB}},
 {"fpowrs",     XRC(59,1004,0), X_MASK, SFFS,   PPCVLE, {FRT, FRA, FRB}},
 {"fpowrs.",    XRC(59,1004,1), X_MASK, SFFS,   PPCVLE, {FRT, FRA, FRB}},
 {"fpows",      XRC(59,1005,0), X_MASK, SFFS,   PPCVLE, {FRT, FRA, FRB}},