checkasm: aarch64: Print the SVE vector length, if available

This commit is contained in:
Martin Storsjö
2024-02-25 01:29:36 +02:00
parent e1f80dec00
commit fd60097eb2
2 changed files with 18 additions and 1 deletions
+10
View File
@@ -209,3 +209,13 @@ function checked_call, export=1
ldp x29, x30, [sp], #16
ret
endfunc
#if HAVE_SVE
ENABLE_SVE
function sve_length, export=1
cntb x0
lsl x0, x0, #3
ret
endfunc
DISABLE_SVE
#endif
+8 -1
View File
@@ -119,7 +119,9 @@ static const struct {
{ 0 }
};
#if ARCH_RISCV
#if ARCH_AARCH64 && HAVE_SVE
int checkasm_sve_length(void);
#elif ARCH_RISCV
int checkasm_get_vlenb(void);
#endif
@@ -761,6 +763,11 @@ int main(int argc, char *argv[]) {
snprintf(buf, sizeof(buf), "VLEN=%i bits, ", vlen);
}
fprintf(stderr, "checkasm: %susing random seed %u\n", buf, state.seed);
#elif ARCH_AARCH64 && HAVE_SVE
char buf[48] = "";
if (cpu_flags & DAV1D_ARM_CPU_FLAG_SVE)
snprintf(buf, sizeof(buf), "SVE %d bits, ", checkasm_sve_length());
fprintf(stderr, "checkasm: %susing random seed %u\n", buf, state.seed);
#else
fprintf(stderr, "checkasm: using random seed %u\n", state.seed);
#endif