Skip to content

Commit

Permalink
Fix PR 106690: enable effective_target_bswap for RISCV targets with Z…
Browse files Browse the repository at this point in the history
…BB 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.
  • Loading branch information
apinski-cavium committed Aug 24, 2022
1 parent e5e6983 commit dec5faa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gcc/testsuite/lib/target-supports.exp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dec5faa

Please sign in to comment.