diff mbox series

rs6000: fix power10_hw test

Message ID 20200707175802.68706-1-acsawdey@linux.ibm.com
State New
Headers show
Series rs6000: fix power10_hw test | expand

Commit Message

Aaron Sawdey July 7, 2020, 5:58 p.m. UTC
The code snippet for this test was returning 1 if power10
instructions executed correctly. It should return 0 if the
test passes.

OK for trunk and backport to 10?

Thanks,
   Aaron

	* lib/target-supports.exp (check_power10_hw_available):
	Return 0 for passing test.
---
 gcc/testsuite/lib/target-supports.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4bdcaef1132..c1239535a4b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2226,7 +2226,7 @@  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);
+		return (e != 0x12345);
 	    }
 	} "-mcpu=power10"
     }]