From 399c6723c768c95449284f74237e39c40b93ac10 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 29 May 2023 01:04:55 +0300 Subject: [PATCH] ppc/svp64: support cprop instructions --- gas/testsuite/gas/ppc/cprop.d | 14 ++++++++++++++ gas/testsuite/gas/ppc/cprop.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/cprop.d create mode 100644 gas/testsuite/gas/ppc/cprop.s diff --git a/gas/testsuite/gas/ppc/cprop.d b/gas/testsuite/gas/ppc/cprop.d new file mode 100644 index 00000000000..de84b94a3c2 --- /dev/null +++ b/gas/testsuite/gas/ppc/cprop.d @@ -0,0 +1,14 @@ +#as: -mlibresoc +#objdump: -dr -Mlibresoc + +.*: file format .* + + +Disassembly of section \.text: +0+ <\.text>: +.*:\s+(5b e0 03 1c|1c 03 e0 5b)\s+cprop\s+r31,r0,r0 +.*:\s+(58 1f 03 1c|1c 03 1f 58)\s+cprop\s+r0,r31,r0 +.*:\s+(58 00 fb 1c|1c fb 00 58)\s+cprop\s+r0,r0,r31 +.*:\s+(5b e0 03 1d|1d 03 e0 5b)\s+cprop.\s+r31,r0,r0 +.*:\s+(58 1f 03 1d|1d 03 1f 58)\s+cprop.\s+r0,r31,r0 +.*:\s+(58 00 fb 1d|1d fb 00 58)\s+cprop.\s+r0,r0,r31 diff --git a/gas/testsuite/gas/ppc/cprop.s b/gas/testsuite/gas/ppc/cprop.s new file mode 100644 index 00000000000..223697fdbbf --- /dev/null +++ b/gas/testsuite/gas/ppc/cprop.s @@ -0,0 +1,6 @@ +cprop 31,0,0 +cprop 0,31,0 +cprop 0,0,31 +cprop. 31,0,0 +cprop. 0,31,0 +cprop. 0,0,31 diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index 370b126c3d2..7983b5e95e0 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -164,3 +164,4 @@ run_dump_test "svindex" run_dump_test "fmvis" run_dump_test "fishmv" run_dump_test "avgadd" +run_dump_test "cprop" diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c index 22125adbde8..f4b22ab18b4 100644 --- a/opcodes/ppc-opc.c +++ b/opcodes/ppc-opc.c @@ -7032,6 +7032,9 @@ const struct powerpc_opcode powerpc_opcodes[] = { {"svremap", SVRM(22,57), SVRM_MASK, SVP64, PPCVLE, {SVme, mi0, mi1, mi2, mo0, mo1, pst}}, +{"cprop", XRC(22,398,0), X_MASK, SVP64, PPCVLE, {RT, RA, RB}}, +{"cprop.", XRC(22,398,1), X_MASK, SVP64, PPCVLE, {RT, RA, RB}}, + {"avgadd", XRC(22,846,0), X_MASK, SVP64, PPCVLE, {RT, RA, RB}}, {"avgadd.", XRC(22,846,1), X_MASK, SVP64, PPCVLE, {RT, RA, RB}}, -- 2.30.2