cpu/NaxRiscv crt0.S now enable the FPU

This commit is contained in:
Dolu1990 2023-02-10 15:57:22 +01:00
parent ed48fb4d5d
commit 34422d2d91
1 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,11 @@
.global isr .global isr
.global _start .global _start
#define MSTATUS_FS_INITIAL (1 << 13)
#define MSTATUS_FS_CLEAN (2 << 13)
#define MSTATUS_FS_DIRTY (3 << 13)
#define MSTATUS_FS_MASK (3 << 13)
_start: _start:
j crt_init j crt_init
nop nop
@ -58,6 +63,10 @@ crt_init:
la a0, trap_entry la a0, trap_entry
csrw mtvec, a0 csrw mtvec, a0
enable_fpu:
li x1, MSTATUS_FS_INITIAL
csrs mstatus, x1
data_init: data_init:
la a0, _fdata la a0, _fdata
la a1, _edata la a1, _edata