Power10 test lsb by byte operation

Message ID 20200511113521.GH27573@bubble.grove.modra.org
State New
Headers show
Series
  • Power10 test lsb by byte operation
Related show

Commit Message

opcodes/
	* ppc-opc.c (powerpc_opcodes): Add xvtlsbb.
gas/
	* testsuite/gas/ppc/xvtlsbb.d,
	* testsuite/gas/ppc/xvtlsbb.s: New test.
	* testsuite/gas/ppc/ppc.exp: Run it.


-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp
index 127829f365..eaede428af 100644
--- a/gas/testsuite/gas/ppc/ppc.exp
+++ b/gas/testsuite/gas/ppc/ppc.exp
@@ -143,3 +143,4 @@  run_dump_test "genpcv"
 run_dump_test "bitmanip"
 run_dump_test "set_bool"
 run_dump_test "stringop"
+run_dump_test "xvtlsbb"
diff --git a/gas/testsuite/gas/ppc/xvtlsbb.d b/gas/testsuite/gas/ppc/xvtlsbb.d
new file mode 100644
index 0000000000..1627d7afc6
--- /dev/null
+++ b/gas/testsuite/gas/ppc/xvtlsbb.d
@@ -0,0 +1,17 @@ 
+#as: -mpower10
+#objdump: -dr -Mpower10
+
+.*
+
+
+Disassembly of section \.text:
+
+0+0 <_start>:
+.*:	(f0 02 ff 6e|6e ff 02 f0) 	xvtlsbb vs63
+.*:	(f0 82 07 6c|6c 07 82 f0) 	xvtlsbb cr1,vs0
+.*:	(f1 02 f7 6e|6e f7 02 f1) 	xvtlsbb cr2,vs62
+.*:	(f1 82 0f 6c|6c 0f 82 f1) 	xvtlsbb cr3,vs1
+.*:	(f2 02 ef 6e|6e ef 02 f2) 	xvtlsbb cr4,vs61
+.*:	(f2 82 17 6c|6c 17 82 f2) 	xvtlsbb cr5,vs2
+.*:	(f3 02 e7 6e|6e e7 02 f3) 	xvtlsbb cr6,vs60
+.*:	(f3 82 1f 6c|6c 1f 82 f3) 	xvtlsbb cr7,vs3
diff --git a/gas/testsuite/gas/ppc/xvtlsbb.s b/gas/testsuite/gas/ppc/xvtlsbb.s
new file mode 100644
index 0000000000..5cbe3ff352
--- /dev/null
+++ b/gas/testsuite/gas/ppc/xvtlsbb.s
@@ -0,0 +1,10 @@ 
+	.text
+_start:
+	xvtlsbb	0,63
+	xvtlsbb	1,0
+	xvtlsbb	2,62
+	xvtlsbb	3,1
+	xvtlsbb	4,61
+	xvtlsbb	5,2
+	xvtlsbb	6,60
+	xvtlsbb	7,3
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index efaa06cfc9..e853b9f743 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -8085,6 +8085,7 @@  const struct powerpc_opcode powerpc_opcodes[] = {
 {"xxgenpcvdm",	X(60,949),	XX1_MASK,    POWER10,	PPCVLE,		{XT6, VB, UIMM}},
 {"xvxexpdp",	XX2VA(60,475,0),XX2_MASK,    PPCVSX3,	PPCVLE,		{XT6, XB6}},
 {"xvxsigdp",	XX2VA(60,475,1),XX2_MASK,    PPCVSX3,	PPCVLE,		{XT6, XB6}},
+{"xvtlsbb",	XX2VA(60,475,2),XX2BF_MASK,  POWER10,	PPCVLE,		{OBF, XB6}},
 {"xxbrh",	XX2VA(60,475,7),XX2_MASK,    PPCVSX3,	PPCVLE,		{XT6, XB6}},
 {"xvxexpsp",	XX2VA(60,475,8),XX2_MASK,    PPCVSX3,	PPCVLE,		{XT6, XB6}},
 {"xvxsigsp",	XX2VA(60,475,9),XX2_MASK,    PPCVSX3,	PPCVLE,		{XT6, XB6}},