Power10 Set boolean extension
authorPeter Bergner <bergner@linux.ibm.com>
Mon, 11 May 2020 00:15:42 +0000 (09:45 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 11 May 2020 11:38:37 +0000 (21:08 +0930)
opcodes/
* ppc-opc.c (powerpc_opcodes) <setbc, setbcr, setnbc, setnbcr>: 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
gas/testsuite/gas/ppc/ppc.exp
gas/testsuite/gas/ppc/set_bool.d [new file with mode: 0644]
gas/testsuite/gas/ppc/set_bool.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/ppc-opc.c

index 11a20f5a068feb2073d75209a29b2f42b9075bd5..a7fbadc683eafbf762943ca7758d78b8e60b514c 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-11  Peter Bergner  <bergner@linux.ibm.com>
+
+       * 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  <amodra@gmail.com>
 
        * testsuite/gas/ppc/bitmanip.d,
index 0e53a4caa335b05f442d402a8d25103292416b93..e1c7bdefb098a5bd4fdcf27b6b795e38aac95b11 100644 (file)
@@ -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 (file)
index 0000000..6bf1ed6
--- /dev/null
@@ -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 (file)
index 0000000..95f2881
--- /dev/null
@@ -0,0 +1,6 @@
+       .text
+_start:
+       setbc   10,1
+       setbcr  11,2
+       setnbc  12,3
+       setnbcr 13,0
index c53e18f7b7d66ef2573f076e42d03ee366db3585..e5cf925e1cdfb2358e808fbd38f4c92d33caadea 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-11  Peter Bergner  <bergner@linux.ibm.com>
+
+       * ppc-opc.c (powerpc_opcodes) <setbc, setbcr, setnbc, setnbcr>: New
+       mnemonics.
+
 2020-05-11  Alan Modra  <amodra@gmail.com>
 
        * ppc-opc.c (UIM8, P_U8XX4_MASK): Define.
index b8c841cc14da547f2c61d295b9a829ed525a174a..e15fcf5ea68bceeeb8d655e826d5a74e8893f55e 100644 (file)
@@ -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}},