public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2180] Fix PR 106690: enable effective_target_bswap for RISCV targets with ZBB enabled by default
@ 2022-08-24 18:31 Andrew Pinski
0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2022-08-24 18:31 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:dec5faa2b2f0d311daa6defd4b4f3c1965748ddf
commit r13-2180-gdec5faa2b2f0d311daa6defd4b4f3c1965748ddf
Author: Andrew Pinski <apinski@marvell.com>
Date: Fri Aug 19 22:09:30 2022 +0000
Fix PR 106690: enable effective_target_bswap for RISCV targets with ZBB enabled by default
While looking for testcases to quickly test, I Noticed that
check_effective_target_bswap was not enabled for riscv when
ZBB is enabled. This patch checks if ZBB is enabled when
targeting RISCV* for bswap.
OK? Ran the testsuite for riscv32-linux-gnu both with and without ZBB enabled.
PR testsuite/106690
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_bswap):
Return true if riscv and ZBB ISA extension is enabled.
Diff:
---
gcc/testsuite/lib/target-supports.exp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 04a2a8e8659..0f1e1af31e9 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -8646,6 +8646,13 @@ proc check_effective_target_bswap { } {
|| [istarget powerpc*-*-*]
|| [istarget rs6000-*-*]
|| [istarget s390*-*-*]
+ || ([istarget riscv*-*-*]
+ && [check_no_compiler_messages_nocache riscv_zbb object {
+ #if __riscv_zbb <= 0
+ #error ZBB is not enabled
+ #endif
+ int i;
+ } ""])
|| ([istarget arm*-*-*]
&& [check_no_compiler_messages_nocache arm_v6_or_later object {
#if __ARM_ARCH < 6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-24 18:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 18:31 [gcc r13-2180] Fix PR 106690: enable effective_target_bswap for RISCV targets with ZBB enabled by default Andrew Pinski
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).