aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobin Dapp <rdapp@ventanamicro.com>2024-08-30 14:35:08 +0200
committerRobin Dapp <rdapp@ventanamicro.com>2024-09-24 14:30:28 +0200
commite45537f56250f19cdf2ec09a744c6b11170c1001 (patch)
treecaea8cfe03ddecd9e389032b7db869416c5e7bdd /gcc
parent0c0d79c783f5c289651d76aa697b48d4505e169d (diff)
downloadgcc-e45537f56250f19cdf2ec09a744c6b11170c1001.zip
gcc-e45537f56250f19cdf2ec09a744c6b11170c1001.tar.gz
gcc-e45537f56250f19cdf2ec09a744c6b11170c1001.tar.bz2
RISC-V: Fix effective target check.
The return value is inverted in check_effective_target_rvv_zvl256b_ok and check_effective_target_rvv_zvl512b_ok. Fix this and also just use the current march. gcc/testsuite/ChangeLog: * lib/target-supports.exp: Fix effective target check.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/lib/target-supports.exp12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 8f2afe8..05a63c4 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1978,15 +1978,15 @@ proc check_effective_target_riscv_v { } {
proc check_effective_target_rvv_zvl256b_ok { } {
# Check if the target has a VLENB of 32.
- set gcc_march [regsub {[[:alnum:]]*} [riscv_get_arch] &v]
+ set gcc_march [riscv_get_arch]
return [check_runtime ${gcc_march}_exec {
int main()
{
int vlenb = 0;
asm ("csrr %0,vlenb" : "=r" (vlenb) : : );
if (vlenb == 32)
- return 1;
- return 0;
+ return 0;
+ return 1;
}
} "-march=${gcc_march}"]
}
@@ -1996,15 +1996,15 @@ proc check_effective_target_rvv_zvl256b_ok { } {
proc check_effective_target_rvv_zvl512b_ok { } {
# Check if the target has a VLENB of 64.
- set gcc_march [regsub {[[:alnum:]]*} [riscv_get_arch] &v]
+ set gcc_march [riscv_get_arch]
return [check_runtime ${gcc_march}_exec {
int main()
{
int vlenb = 0;
asm ("csrr %0,vlenb" : "=r" (vlenb) : : );
if (vlenb == 64)
- return 1;
- return 0;
+ return 0;
+ return 1;
}
} "-march=${gcc_march}"]
}