From: Carl Love Date: Fri, 20 Sep 2013 17:32:06 +0000 (+0000) Subject: Add test-cases for Power ISA 2.06 insns: divdo/divdo. and divduo/divduo. X-Git-Tag: svn/VALGRIND_3_9_0~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d200127bf2955e441100829b3c807428f4e830;p=thirdparty%2Fvalgrind.git Add test-cases for Power ISA 2.06 insns: divdo/divdo. and divduo/divduo. The patch was supplied by Anmol P. Paralkar. Valgrind Bugzilla 325110 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13574 --- diff --git a/none/tests/ppc32/jm-insns.c b/none/tests/ppc32/jm-insns.c index 7cc9c7936b..cca565c2b9 100644 --- a/none/tests/ppc32/jm-insns.c +++ b/none/tests/ppc32/jm-insns.c @@ -555,6 +555,16 @@ static void test_divdu (void) { __asm__ __volatile__ ("divdu 17, 14, 15"); } + +static void test_divdo (void) +{ + __asm__ __volatile__ ("divdo 17, 14, 15"); +} + +static void test_divduo (void) +{ + __asm__ __volatile__ ("divduo 17, 14, 15"); +} #endif // #ifdef __powerpc64__ static test_t tests_ia_ops_two[] = { @@ -581,6 +591,8 @@ static test_t tests_ia_ops_two[] = { { &test_mulldo , " mulldo", }, { &test_divd , " divd", }, { &test_divdu , " divdu", }, + { &test_divdo , " divdo", }, + { &test_divduo , " divduo", }, #endif // #ifdef __powerpc64__ { NULL, NULL, }, }; @@ -695,6 +707,16 @@ static void test_divdu_ (void) { __asm__ __volatile__ ("divdu. 17, 14, 15"); } + +static void test_divdo_ (void) +{ + __asm__ __volatile__ ("divdo. 17, 14, 15"); +} + +static void test_divduo_ (void) +{ + __asm__ __volatile__ ("divduo. 17, 14, 15"); +} #endif // #ifdef __powerpc64__ static test_t tests_iar_ops_two[] = { @@ -721,6 +743,8 @@ static test_t tests_iar_ops_two[] = { { &test_mulldo_ , " mulldo.", }, { &test_divd_ , " divd.", }, { &test_divdu_ , " divdu.", }, + { &test_divdo_ , " divdo.", }, + { &test_divduo_ , " divduo.", }, #endif // #ifdef __powerpc64__ { NULL, NULL, }, }; diff --git a/none/tests/ppc64/jm-int.stdout.exp b/none/tests/ppc64/jm-int.stdout.exp index fc3ed10e63..e2b5418a39 100644 --- a/none/tests/ppc64/jm-int.stdout.exp +++ b/none/tests/ppc64/jm-int.stdout.exp @@ -207,6 +207,26 @@ PPC integer arith insns with two args: divdu ffffffffffffffff, 0000001cbe991def => 0000000008e7f283 (00000000 00000000) divdu ffffffffffffffff, ffffffffffffffff => 0000000000000001 (00000000 00000000) + divdo 0000000000000000, 0000000000000000 => 0000000000000000 (00000000 c0000000) + divdo 0000000000000000, 0000001cbe991def => 0000000000000000 (00000000 00000000) + divdo 0000000000000000, ffffffffffffffff => 0000000000000000 (00000000 00000000) + divdo 0000001cbe991def, 0000000000000000 => 0000000000000000 (00000000 c0000000) + divdo 0000001cbe991def, 0000001cbe991def => 0000000000000001 (00000000 00000000) + divdo 0000001cbe991def, ffffffffffffffff => ffffffe34166e211 (00000000 00000000) + divdo ffffffffffffffff, 0000000000000000 => 0000000000000000 (00000000 c0000000) + divdo ffffffffffffffff, 0000001cbe991def => 0000000000000000 (00000000 00000000) + divdo ffffffffffffffff, ffffffffffffffff => 0000000000000001 (00000000 00000000) + + divduo 0000000000000000, 0000000000000000 => 0000000000000000 (00000000 c0000000) + divduo 0000000000000000, 0000001cbe991def => 0000000000000000 (00000000 00000000) + divduo 0000000000000000, ffffffffffffffff => 0000000000000000 (00000000 00000000) + divduo 0000001cbe991def, 0000000000000000 => 0000000000000000 (00000000 c0000000) + divduo 0000001cbe991def, 0000001cbe991def => 0000000000000001 (00000000 00000000) + divduo 0000001cbe991def, ffffffffffffffff => 0000000000000000 (00000000 00000000) + divduo ffffffffffffffff, 0000000000000000 => 0000000000000000 (00000000 c0000000) + divduo ffffffffffffffff, 0000001cbe991def => 0000000008e7f283 (00000000 00000000) + divduo ffffffffffffffff, ffffffffffffffff => 0000000000000001 (00000000 00000000) + PPC integer arith insns with two args with flags update: add. 0000000000000000, 0000000000000000 => 0000000000000000 (20000000 00000000) add. 0000000000000000, 0000001cbe991def => 0000001cbe991def (40000000 00000000) @@ -416,6 +436,26 @@ PPC integer arith insns with two args with flags update: divdu. ffffffffffffffff, 0000001cbe991def => 0000000008e7f283 (40000000 00000000) divdu. ffffffffffffffff, ffffffffffffffff => 0000000000000001 (40000000 00000000) + divdo. 0000000000000000, 0000000000000000 => 0000000000000000 (30000000 c0000000) + divdo. 0000000000000000, 0000001cbe991def => 0000000000000000 (20000000 00000000) + divdo. 0000000000000000, ffffffffffffffff => 0000000000000000 (20000000 00000000) + divdo. 0000001cbe991def, 0000000000000000 => 0000000000000000 (30000000 c0000000) + divdo. 0000001cbe991def, 0000001cbe991def => 0000000000000001 (40000000 00000000) + divdo. 0000001cbe991def, ffffffffffffffff => ffffffe34166e211 (80000000 00000000) + divdo. ffffffffffffffff, 0000000000000000 => 0000000000000000 (30000000 c0000000) + divdo. ffffffffffffffff, 0000001cbe991def => 0000000000000000 (20000000 00000000) + divdo. ffffffffffffffff, ffffffffffffffff => 0000000000000001 (40000000 00000000) + + divduo. 0000000000000000, 0000000000000000 => 0000000000000000 (30000000 c0000000) + divduo. 0000000000000000, 0000001cbe991def => 0000000000000000 (20000000 00000000) + divduo. 0000000000000000, ffffffffffffffff => 0000000000000000 (20000000 00000000) + divduo. 0000001cbe991def, 0000000000000000 => 0000000000000000 (30000000 c0000000) + divduo. 0000001cbe991def, 0000001cbe991def => 0000000000000001 (40000000 00000000) + divduo. 0000001cbe991def, ffffffffffffffff => 0000000000000000 (20000000 00000000) + divduo. ffffffffffffffff, 0000000000000000 => 0000000000000000 (30000000 c0000000) + divduo. ffffffffffffffff, 0000001cbe991def => 0000000008e7f283 (40000000 00000000) + divduo. ffffffffffffffff, ffffffffffffffff => 0000000000000001 (40000000 00000000) + PPC integer arith insns with two args and carry: adde 0000000000000000, 0000000000000000 => 0000000000000000 (00000000 00000000) adde 0000000000000000, 0000001cbe991def => 0000001cbe991def (00000000 00000000) @@ -4730,4 +4770,4 @@ PPC integer population count with one register args, no flags: popcntb 0000001cbe991def => 0000000306040407 (00000000 00000000) popcntb ffffffffffffffff => 0808080808080808 (00000000 00000000) -All done. Tested 206 different instructions +All done. Tested 210 different instructions