public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] testsuite: Add cheri_capability_any effective target
@ 2022-05-06 14:42 Matthew Malcomson
  0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-05-06 14:42 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:15a07806b6b87d642e01dac15c6f8225d541882f

commit 15a07806b6b87d642e01dac15c6f8225d541882f
Author: Alex Coplan <alex.coplan@arm.com>
Date:   Tue May 3 12:15:46 2022 +0100

    testsuite: Add cheri_capability_any effective target
    
    As of Stam's recent patch, we only define __CHERI__ and friends for real
    capability targets (not fakecap). This allows us to define an effective
    target that only matches for hybrid and purecap (not fakecap).
    
    Apply the filter to a couple of tests that should no longer be run on
    fakecap with the recent macro changes.

Diff:
---
 gcc/testsuite/gcc.target/aarch64/morello/predefines.c | 2 +-
 gcc/testsuite/lib/target-supports.exp                 | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/morello/predefines.c b/gcc/testsuite/gcc.target/aarch64/morello/predefines.c
index 2da0ba1cd96..d7e2b667121 100644
--- a/gcc/testsuite/gcc.target/aarch64/morello/predefines.c
+++ b/gcc/testsuite/gcc.target/aarch64/morello/predefines.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target cheri_capability_any } } */
 
 /* Declare twice to ensure that the types are the same (error otherwise).  */
 __INTPTR_TYPE__ x(int);
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 544d597710b..f9d2c149c70 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3580,6 +3580,14 @@ proc check_effective_target_cheri_capability_pure { } {
   }]
 }
 
+proc check_effective_target_cheri_capability_any { } {
+  return [check_no_compiler_messages cheri_capability_any assembly {
+  #if !defined (__CHERI__)
+  #error foo
+  #endif
+  }]
+}
+
 # Return the size in bits of an SVE vector, or 0 if the size is variable.
 proc aarch64_sve_bits { } {
     return [check_cached_effective_target aarch64_sve_bits {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-06 14:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 14:42 [gcc(refs/vendors/ARM/heads/morello)] testsuite: Add cheri_capability_any effective target Matthew Malcomson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).