Skip to content

Commit e2f9f57

Browse files
authored
Merge pull request #5432 from markdryan/markdyan/fix-rvv-detection
fix RVV 1.0 detection code
2 parents c31861e + 7fcad02 commit e2f9f57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver/others/detect_riscv64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ uint64_t detect_riscv64_rvv100(void)
6363
* RVV 1.0 and we return 0.
6464
*/
6565

66-
asm volatile("vsetvli x0, x0, e8, m1, ta, ma\n\t"
66+
asm volatile("vsetvli t0, x0, e8, m1, ta, ma\n\t"
6767
"csrr %0, vtype\n\t"
6868
"slt %0, x0, %0\n"
6969
: "=r" (rvv10_supported)
7070
:
71-
:);
71+
:"t0", "vtype");
7272

7373
return rvv10_supported;
7474
}

0 commit comments

Comments
 (0)