Skip to content

Commit 3329022

Browse files
riscv: Fix feholdexcept() (#324)
Co-authored-by: Viral B. Shah <viral@mayin.org>
1 parent a336ec3 commit 3329022

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

include/openlibm_fenv_riscv.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,11 @@ __fenv_static inline int
190190
feholdexcept(fenv_t *__envp)
191191
{
192192

193-
/* No exception traps. */
193+
__rfs(*__envp);
194194

195-
return (-1);
195+
feclearexcept(FE_ALL_EXCEPT);
196+
197+
return (0);
196198
}
197199

198200
__fenv_static inline int

0 commit comments

Comments
 (0)