]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add test-cases for Power ISA 2.06 insns: divdo/divdo. and divduo/divduo.
authorCarl Love <cel@us.ibm.com>
Fri, 20 Sep 2013 17:32:06 +0000 (17:32 +0000)
committerCarl Love <cel@us.ibm.com>
Fri, 20 Sep 2013 17:32:06 +0000 (17:32 +0000)
The patch was supplied by Anmol P. Paralkar.

Valgrind Bugzilla 325110

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13574

none/tests/ppc32/jm-insns.c
none/tests/ppc64/jm-int.stdout.exp

index 7cc9c7936b8cd8c43e471258d9a9d186898de115..cca565c2b9464697837effd5bd02675592f87d8e 100644 (file)
@@ -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,           },
 };
index fc3ed10e63f3ddc89bbf8f06388d297ef950c242..e2b5418a390f6fd4072d19abd9b6cf509609d543 100644 (file)
@@ -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