From 4f3e9537c47ce65086cb86587a5fa9be4dc41392 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Mon, 11 May 2020 09:45:42 +0930 Subject: [PATCH] Power10 Set boolean extension opcodes/ * ppc-opc.c (powerpc_opcodes) : New mnemonics. gas/ * testsuite/gas/ppc/set_bool.d, * testsuite/gas/ppc/set_bool.s: New test. * testsuite/gas/ppc/ppc.exp: Run it. --- gas/ChangeLog | 6 ++++++ gas/testsuite/gas/ppc/ppc.exp | 1 + gas/testsuite/gas/ppc/set_bool.d | 14 ++++++++++++++ gas/testsuite/gas/ppc/set_bool.s | 6 ++++++ opcodes/ChangeLog | 5 +++++ opcodes/ppc-opc.c | 8 ++++++++ 6 files changed, 40 insertions(+) create mode 100644 gas/testsuite/gas/ppc/set_bool.d create mode 100644 gas/testsuite/gas/ppc/set_bool.s diff --git a/gas/ChangeLog b/gas/ChangeLog index 11a20f5a068..a7fbadc683e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2020-05-11 Peter Bergner + + * testsuite/gas/ppc/set_bool.d, + * testsuite/gas/ppc/set_bool.s: New test. + * testsuite/gas/ppc/ppc.exp: Run it. + 2020-05-11 Alan Modra * testsuite/gas/ppc/bitmanip.d, diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index 0e53a4caa33..e1c7bdefb09 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -141,3 +141,4 @@ run_dump_test "outerprod" run_dump_test "maskmanip" run_dump_test "genpcv" run_dump_test "bitmanip" +run_dump_test "set_bool" diff --git a/gas/testsuite/gas/ppc/set_bool.d b/gas/testsuite/gas/ppc/set_bool.d new file mode 100644 index 00000000000..6bf1ed6c6fe --- /dev/null +++ b/gas/testsuite/gas/ppc/set_bool.d @@ -0,0 +1,14 @@ +#as: -mpower10 +#objdump: -dr -Mpower10 +#name: set bool + +.* + + +Disassembly of section \.text: + +0+00 <_start>: +.*: (7d 41 03 00|00 03 41 7d) setbc r10,gt +.*: (7d 62 03 40|40 03 62 7d) setbcr r11,eq +.*: (7d 83 03 80|80 03 83 7d) setnbc r12,so +.*: (7d a0 03 c0|c0 03 a0 7d) setnbcr r13,lt diff --git a/gas/testsuite/gas/ppc/set_bool.s b/gas/testsuite/gas/ppc/set_bool.s new file mode 100644 index 00000000000..95f28814b4b --- /dev/null +++ b/gas/testsuite/gas/ppc/set_bool.s @@ -0,0 +1,6 @@ + .text +_start: + setbc 10,1 + setbcr 11,2 + setnbc 12,3 + setnbcr 13,0 diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index c53e18f7b7d..e5cf925e1cd 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2020-05-11 Peter Bergner + + * ppc-opc.c (powerpc_opcodes) : New + mnemonics. + 2020-05-11 Alan Modra * ppc-opc.c (UIM8, P_U8XX4_MASK): Define. diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c index b8c841cc14d..e15fcf5ea68 100644 --- a/opcodes/ppc-opc.c +++ b/opcodes/ppc-opc.c @@ -6770,6 +6770,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { {"popcntw", X(31,378), XRB_MASK, POWER7|PPCA2, 0, {RA, RS}}, +{"setbc", X(31,384), XRB_MASK, POWER10, 0, {RT, BI}}, + {"mtdcrx", X(31,387), X_MASK, BOOKE|PPCA2|PPC476, TITAN, {RA, RS}}, {"mtdcrx.", XRC(31,387,1), X_MASK, PPCA2, 0, {RA, RS}}, @@ -6804,6 +6806,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { {"sthepx", X(31,415), X_MASK, E500MC|PPCA2, 0, {RS, RA0, RB}}, +{"setbcr", X(31,416), XRB_MASK, POWER10, 0, {RT, BI}}, + {"mtdcrux", X(31,419), X_MASK, PPC464|PPC476, 0, {RA, RS}}, {"stvexhx", X(31,421), X_MASK, E6500, 0, {VS, RA0, RB}}, @@ -6841,6 +6845,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { {"mr.", XRC(31,444,1), X_MASK, COM, 0, {RA, RSB}}, {"or.", XRC(31,444,1), X_MASK, COM, 0, {RA, RS, RB}}, +{"setnbc", X(31,448), XRB_MASK, POWER10, 0, {RT, BI}}, + {"mtexisr", XSPR(31,451, 64), XSPR_MASK, PPC403, 0, {RS}}, {"mtexier", XSPR(31,451, 66), XSPR_MASK, PPC403, 0, {RS}}, {"mtbr0", XSPR(31,451,128), XSPR_MASK, PPC403, 0, {RS}}, @@ -7083,6 +7089,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { {"nand", XRC(31,476,0), X_MASK, COM, 0, {RA, RS, RB}}, {"nand.", XRC(31,476,1), X_MASK, COM, 0, {RA, RS, RB}}, +{"setnbcr", X(31,480), XRB_MASK, POWER10, 0, {RT, BI}}, + {"dsn", X(31,483), XRT_MASK, E500MC, 0, {RA, RB}}, {"dcread", X(31,486), X_MASK, PPC403|PPC440, PPCA2, {RT, RA0, RB}}, -- 2.30.2