[committed] arm: testsuite: fix test for armv6t2 hardware

Message ID 20231115104854.1784462-1-rearnsha@arm.com
State Unresolved
Headers
Series [committed] arm: testsuite: fix test for armv6t2 hardware |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Richard Earnshaw Nov. 15, 2023, 10:48 a.m. UTC
  My previous patch series added a new function to check for armv6t2
compatible hardware.  But the test was not correctly implemented and
also did not follow the standard naming convention for Arm hw
compatibility tests.  Fix both of these issues.

gcc/testsuite:

	* lib/target-supports.exp (check_effective_target_arm_arch_v6t2_hw_ok):
	Rename to...
	(check_effective_target_arm_arch_v6t2_hw): ... this.  Fix checks.
	* gcc.target/arm/acle/data-intrinsics-armv6.c: Update pre-check.
	* gcc.target/arm/acle/data-intrinsics-rbit.c: Likewise.
---
 gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c | 2 +-
 gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c  | 2 +-
 gcc/testsuite/lib/target-supports.exp                     | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c
index 6dc8c55e2f9..c231fa4c1ae 100644
--- a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c
+++ b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c
@@ -1,5 +1,5 @@ 
 /* { dg-do run } */
-/* { dg-require-effective-target arm_arch_v6t2_hw_ok } */
+/* { dg-require-effective-target arm_arch_v6t2_hw } */
 /* { dg-add-options arm_arch_v6t2 } */
 
 #include "arm_acle.h"
diff --git a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c
index b01c4219a7e..ac358bce02d 100644
--- a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c
+++ b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c
@@ -1,6 +1,6 @@ 
 /* Test the ACLE data intrinsics existence for specific instruction.  */
 /* { dg-do run } */
-/* { dg-require-effective-target arm_arch_v6t2_hw_ok } */
+/* { dg-require-effective-target arm_arch_v6t2_hw } */
 /* { dg-additional-options "--save-temps -O1" } */
 /* { dg-add-options arm_arch_v6t2 } */
 /* { dg-final { check-function-bodies "**" "" "" } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 43a040e135c..b6a2e4fd096 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5607,9 +5607,9 @@  proc check_effective_target_arm_thumb1_cbz_ok {} {
 # Return 1 if this is an Arm target which supports the Armv6t2 extensions.
 # This can be either in Arm state or in Thumb state.
 
-proc check_effective_target_arm_arch_v6t2_hw_ok {} {
-    if [check_effective_target_arm_thumb1_ok] {
-	return [check_no_compiler_messages arm_movt object {
+proc check_effective_target_arm_arch_v6t2_hw {} {
+    if [check_effective_target_arm_arch_v6t2_ok] {
+	return [check_runtime arm_arch_v6t2 {
 	    int
 	    main (void)
 	    {