LibC: Read correct FP register in fegetround on x86-64 :^)

This commit is contained in:
Dan Klishch 2024-04-23 16:50:23 -04:00 committed by Andrew Kaster
commit a4a8dd29ba
Notes: sideshowbarker 2024-07-17 10:31:19 +09:00

View file

@ -109,7 +109,7 @@ int fesetexceptflag(fexcept_t const* except, int exceptions)
int fegetround()
{
// There's no way to signal whether the SSE rounding mode and x87 ones are different, so we assume they're the same
return (read_status_register() >> 10) & 3;
return (read_control_word() >> 10) & 3;
}
int fesetround(int rounding_mode)