From: Dmitry Selyutin Date: Sun, 28 May 2023 22:04:58 +0000 (+0300) Subject: ppc: support fdmadds instruction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c878cb908158dcb8bd1a5316fbfa1b745f2be797;p=binutils-gdb.git ppc: support fdmadds instruction --- diff --git a/gas/testsuite/gas/ppc/fdmadds.d b/gas/testsuite/gas/ppc/fdmadds.d new file mode 100644 index 00000000000..7c1eb561896 --- /dev/null +++ b/gas/testsuite/gas/ppc/fdmadds.d @@ -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 index 00000000000..fd504ad9447 --- /dev/null +++ b/gas/testsuite/gas/ppc/fdmadds.s @@ -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 diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index 18c7ba0d842..5da429e1a80 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -179,3 +179,4 @@ run_dump_test "ffmsubs" run_dump_test "ffmadds" run_dump_test "ffnmsubs" run_dump_test "ffnmadds" +run_dump_test "fdmadds" diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c index 63507983c66..d168258374f 100644 --- a/opcodes/ppc-opc.c +++ b/opcodes/ppc-opc.c @@ -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}},