]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: fix power10_hw test
authorAaron Sawdey <acsawdey@linux.ibm.com>
Tue, 7 Jul 2020 17:48:56 +0000 (12:48 -0500)
committerAaron Sawdey <acsawdey@linux.ibm.com>
Fri, 10 Jul 2020 15:34:58 +0000 (10:34 -0500)
The code snippet for this test was returning 1 if power10
instructions executed correctly. It should return 0 if the
test passes.

2020-07-07  Aaron Sawdey  <acsawdey@linux.ibm.com>

gcc/testsuite/
* lib/target-supports.exp (check_power10_hw_available):
Return 0 for passing test.

(cherry picked from commit 7126583af5d29235584b51b3b05eeaba2adef024)

gcc/testsuite/lib/target-supports.exp

index ce7908be07323fc777c2e47dd75d60ba2df2d919..7b962d3cd3ebdd1cd789d093c65f877ccf5d42ef 100644 (file)
@@ -2227,7 +2227,9 @@ proc check_power10_hw_available { } {
                /* Set e first and use +r to check if pli actually works.  */
                long e = -1;
                asm ("pli %0,%1" : "+r" (e) : "n" (0x12345));
-               return (e == 0x12345);
+               if (e == 0x12345)
+                 return 0;
+               return 1;
            }
        } "-mcpu=power10"
     }]