|
From: <sv...@va...> - 2012-07-06 21:59:13
|
philippe 2012-07-06 22:59:03 +0100 (Fri, 06 Jul 2012)
New Revision: 12719
Log:
fix 303116 - Add support for the POWER instruction popcntb (Valgrind side)
patch from ca...@us...
Modified files:
trunk/NEWS
trunk/none/tests/ppc32/jm-insns.c
trunk/none/tests/ppc32/jm-int.stdout.exp
trunk/none/tests/ppc64/jm-int.stdout.exp
Modified: trunk/none/tests/ppc32/jm-insns.c (+19 -1)
===================================================================
--- trunk/none/tests/ppc32/jm-insns.c 2012-07-06 22:42:14 +01:00 (rev 12718)
+++ trunk/none/tests/ppc32/jm-insns.c 2012-07-06 22:59:03 +01:00 (rev 12719)
@@ -360,6 +360,7 @@
PPC_COMPARE = 0x00000300,
PPC_CROP = 0x00000400,
PPC_LDST = 0x00000500,
+ PPC_POPCNT = 0x00000600,
PPC_TYPE = 0x00000F00,
/* Family */
PPC_INTEGER = 0x00010000,
@@ -1686,6 +1687,17 @@
{ NULL, NULL, },
};
+static void
+tests_popcnt_one(void)
+{
+ __asm__ __volatile__ ("popcntb 17, 14");
+}
+
+static test_t tests_popcnt_ops_one[] = {
+ { &tests_popcnt_one , " popcntb", },
+ { NULL, NULL, },
+};
+
#if !defined (NO_FLOAT)
static void test_fsel (void)
{
@@ -3934,6 +3946,11 @@
"PPC integer store insns with three register args",
0x0001050b,
},
+ {
+ tests_popcnt_ops_one ,
+ "PPC integer population count with one register args, no flags",
+ 0x00010601,
+ },
#if !defined (NO_FLOAT)
{
tests_fa_ops_three ,
@@ -7344,7 +7361,8 @@
if ((type == PPC_ARITH && !seln_flags.arith) ||
(type == PPC_LOGICAL && !seln_flags.logical) ||
(type == PPC_COMPARE && !seln_flags.compare) ||
- (type == PPC_LDST && !seln_flags.ldst))
+ (type == PPC_LDST && !seln_flags.ldst) ||
+ (type == PPC_POPCNT && !seln_flags.arith))
continue;
/* Check instruction family */
family = all_tests[i].flags & PPC_FAMILY;
Modified: trunk/none/tests/ppc32/jm-int.stdout.exp (+6 -1)
===================================================================
--- trunk/none/tests/ppc32/jm-int.stdout.exp 2012-07-06 22:42:14 +01:00 (rev 12718)
+++ trunk/none/tests/ppc32/jm-int.stdout.exp 2012-07-06 22:59:03 +01:00 (rev 12719)
@@ -1596,4 +1596,9 @@
stwux 000f423f, 4 => 000f423f, 4 (00000000 00000000)
stwux ffffffff, 8 => ffffffff, 8 (00000000 00000000)
-All done. Tested 154 different instructions
+PPC integer population count with one register args, no flags:
+ popcntb 00000000 => 00000000 (00000000 00000000)
+ popcntb 000f423f => 00040206 (00000000 00000000)
+ popcntb ffffffff => 08080808 (00000000 00000000)
+
+All done. Tested 155 different instructions
Modified: trunk/none/tests/ppc64/jm-int.stdout.exp (+6 -1)
===================================================================
--- trunk/none/tests/ppc64/jm-int.stdout.exp 2012-07-06 22:42:14 +01:00 (rev 12718)
+++ trunk/none/tests/ppc64/jm-int.stdout.exp 2012-07-06 22:59:03 +01:00 (rev 12719)
@@ -4705,4 +4705,9 @@
stdux 0000001cbe991def, 8 => 0000001cbe991def, 8 (00000000 00000000)
stdux ffffffffffffffff, 16 => ffffffffffffffff, 16 (00000000 00000000)
-All done. Tested 203 different instructions
+PPC integer population count with one register args, no flags:
+ popcntb 0000000000000000 => 0000000000000000 (00000000 00000000)
+ popcntb 0000001cbe991def => 0000000306040407 (00000000 00000000)
+ popcntb ffffffffffffffff => 0808080808080808 (00000000 00000000)
+
+All done. Tested 204 different instructions
Modified: trunk/NEWS (+1 -0)
===================================================================
--- trunk/NEWS 2012-07-06 22:42:14 +01:00 (rev 12718)
+++ trunk/NEWS 2012-07-06 22:59:03 +01:00 (rev 12719)
@@ -224,6 +224,7 @@
== 273475 (canonical avx)
302709 valgrind for ARM needs extra tls support for android emulator under Linux
302918 Enable testing of the vmaddfp and vnsubfp instructions in the testsuite
+303116 Add support for the POWER instruction popcntb
Release 3.7.0 (5 November 2011)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|