Skip to content

Commit

Permalink
rv64,init: fix initial values of vlenb and vtype (#188)
Browse files Browse the repository at this point in the history
* fix : vlenb ,vtype have initial value
  • Loading branch information
weidingliu authored Sep 22, 2023
1 parent 17bca45 commit cff8344
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/isa/riscv64/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ void init_isa() {
// vector
misa->extensions |= ext('v');
vl->val = 0;
vtype->val = 0; // actually should be 1 << 63 (set vill bit to forbidd)
vtype->val = (uint64_t) 1 << 63; // actually should be 1 << 63 (set vill bit to forbidd)
vlenb->val = VLEN/8;
#endif // CONFIG_RVV

#ifdef CONFIG_RV_ARCH_CSRS
Expand Down Expand Up @@ -128,5 +129,7 @@ void init_isa() {
Log("NEMU will start from pc 0x%lx", cpu.pc);
#endif

csr_prepare();

is_second_call = true;
}

0 comments on commit cff8344

Please sign in to comment.