Page MenuHomeFreeBSD

RISC-V: Fix feenableexcept return value
ClosedPublic

Authored by arichardson on Mar 23 2021, 9:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 8, 7:59 PM
Unknown Object (File)
Thu, Sep 18, 11:36 PM
Unknown Object (File)
Mon, Sep 15, 11:51 PM
Unknown Object (File)
Sep 11 2025, 4:01 PM
Unknown Object (File)
Aug 14 2025, 7:15 PM
Unknown Object (File)
Aug 7 2025, 8:25 PM
Unknown Object (File)
Jul 28 2025, 1:20 PM
Unknown Object (File)
Jul 24 2025, 7:03 PM
Subscribers

Details

Summary

The man page says "The feenableexcept(), fedisableexcept(), and
fegetexcept() functions return a bitmap of the exceptions that were
unmasked prior to the call.", so we should return zero not -1.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne added a subscriber: mhorne.

I've wondered about this case before, but this solution seems correct.

How well do we do running the fenv tests with this change (and your other recent commits) ?

This revision is now accepted and ready to land.Mar 23 2021, 1:12 PM

I've wondered about this case before, but this solution seems correct.

How well do we do running the fenv tests with this change (and your other recent commits) ?

This fixes one of the fenv tests. There are more failures that I need to look into.

This revision was automatically updated to reflect the committed changes.