From 0f486d34c69cc9a5530f93dcb353fcbd2ed6c0ef Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 29 May 2023 01:04:58 +0300 Subject: [PATCH] ppc: support fdmadds instruction --- gas/testsuite/gas/ppc/fdmadds.d | 14 ++++++++++++++ gas/testsuite/gas/ppc/fdmadds.s | 6 ++++++ gas/testsuite/gas/ppc/ppc.exp | 1 + opcodes/ppc-opc.c | 3 +++ 4 files changed, 24 insertions(+) create mode 100644 gas/testsuite/gas/ppc/fdmadds.d create mode 100644 gas/testsuite/gas/ppc/fdmadds.s 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}}, -- 2.30.2