X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=env%2Fv%2Friscv_test.h;h=995db597b1aca74283b7a4730be6bb0f7efaadf2;hb=5fe2ce69dcd1d0ddb42c4edffac7ab11d939ca45;hp=6aa232ede68bd04f93398ce203f4c08bf5cdfb83;hpb=5b13eb6cd5aa3e73fb477414f1866e7b9cbeaf3f;p=riscv-tests.git diff --git a/env/v/riscv_test.h b/env/v/riscv_test.h index 6aa232e..995db59 100644 --- a/env/v/riscv_test.h +++ b/env/v/riscv_test.h @@ -6,31 +6,22 @@ //----------------------------------------------------------------------- #define RVTEST_RV64U \ - .text; \ -init: \ - ret + .macro init; \ + .endm #define RVTEST_RV64UF \ - .text; \ -init: \ - mtfsr x0; \ - ret - -#define RVTEST_RV64S \ + .macro init; \ + fssr x0; \ + .endm #define RVTEST_VEC_ENABLE \ - mfpcr t0, cr0; \ - ori t0, t0, 4; \ - mtpcr t0, cr0; \ - li t0, 0xff; \ - mtpcr t0, cr11; \ #define RVTEST_CODE_BEGIN \ .text; \ .align 13; \ .global userstart; \ userstart: \ - jal init + init //----------------------------------------------------------------------- // End Macro @@ -59,7 +50,7 @@ userstart: \ // Supervisor mode definitions and macros //----------------------------------------------------------------------- -#include "pcr.h" +#include "../pcr.h" #define vvcfg(nxregs, nfregs) ({ \ asm volatile ("vvcfg %0,%1" : : "r"(nxregs), "r"(nfregs)); })