riscv: Move get_vlenb() from checkasm_ to dav1d_

This commit is contained in:
Nathan E. Egge
2024-05-06 17:21:16 -04:00
committed by Luca Barbato
parent 01da36ebdf
commit 7f2bb2fbc9
4 changed files with 11 additions and 11 deletions
+2 -6
View File
@@ -129,8 +129,6 @@ static const struct {
#if ARCH_AARCH64 && HAVE_SVE
int checkasm_sve_length(void);
#elif ARCH_RISCV
int checkasm_get_vlenb(void);
#endif
typedef struct CheckasmFuncVersion {
@@ -853,10 +851,8 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "checkasm: %s (%08X) using random seed %u\n", name, cpuid, state.seed);
#elif ARCH_RISCV
char buf[32] = "";
if (cpu_flags & DAV1D_RISCV_CPU_FLAG_V) {
const int vlen = 8*checkasm_get_vlenb();
snprintf(buf, sizeof(buf), "VLEN=%i bits, ", vlen);
}
if (cpu_flags & DAV1D_RISCV_CPU_FLAG_V)
snprintf(buf, sizeof(buf), "VLEN=%i bits, ", dav1d_get_vlen());
fprintf(stderr, "checkasm: %susing random seed %u\n", buf, state.seed);
#elif ARCH_AARCH64 && HAVE_SVE
char buf[48] = "";
-5
View File
@@ -83,11 +83,6 @@ endconst
thread_local saved_regs, quads=29 # 5 + 12 + 12
function get_vlenb, export=1
csrr a0, vlenb
ret
endfunc
function checked_call, export=1, ext=v
/* Save the function ptr, RA, SP, unallocatable and callee-saved registers */
la.tls.ie t0, saved_regs