Skip to content

Commit

Permalink
FPCSR_RM_RN
Browse files Browse the repository at this point in the history
  • Loading branch information
hensldm committed Aug 19, 2024
1 parent 097626c commit 6acaff6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/os/createthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void osCreateThread(OSThread* t, OSId id, void (*entry)(void*), void* arg, void*
mask = OS_IM_ALL;
t->context.sr = (mask & (SR_IMASK | SR_IE)) | SR_EXL;
t->context.rcp = (mask & RCP_IMASK) >> RCP_IMASKSHIFT;
t->context.fpcsr = FPCSR_FS | FPCSR_EV;
t->context.fpcsr = FPCSR_FS | FPCSR_EV | FPCSR_RM_RN;
t->fp = 0;
t->state = OS_STATE_STOPPED;
t->flags = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/os/initialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void INITIALIZE_FUNC() {
#endif

__osSetSR(__osGetSR() | SR_CU1); // enable fpu
__osSetFpcCsr(FPCSR_FS | FPCSR_EV); // flush denorm to zero, enable invalid operation
__osSetFpcCsr(FPCSR_FS | FPCSR_EV | FPCSR_RM_RN); // flush denorm to zero, enable invalid operation
#if BUILD_VERSION >= VERSION_K
__osSetWatchLo(0x4900000);
#endif
Expand Down

0 comments on commit 6acaff6

Please sign in to comment.