diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-04-24 23:15:19 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-26 15:02:56 +0200 |
commit | 8eb886f069e8f7c54e9a6a9b2fbb7dc4b1dab2a9 (patch) | |
tree | 800adc0f5d4d6c5b56e2fb737abfe5734debc196 /Userland | |
parent | 5847d326c3d6b36d8d34ba49ebe53497bbaa8437 (diff) | |
download | serenity-8eb886f069e8f7c54e9a6a9b2fbb7dc4b1dab2a9.zip |
LibC: Don't handle pending exceptions when reading FPU status
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibC/fenv.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibC/fenv.cpp b/Userland/Libraries/LibC/fenv.cpp index d4dc20d98a..977fc191b4 100644 --- a/Userland/Libraries/LibC/fenv.cpp +++ b/Userland/Libraries/LibC/fenv.cpp @@ -13,7 +13,7 @@ static_assert(sizeof(__x87_floating_point_environment) == 28); static u16 read_status_register() { u16 status_register; - asm volatile("fstsw %0" + asm volatile("fnstsw %0" : "=m"(status_register)); return status_register; } @@ -21,7 +21,7 @@ static u16 read_status_register() static u16 read_control_word() { u16 control_word; - asm volatile("fstcw %0" + asm volatile("fnstcw %0" : "=m"(control_word)); return control_word; } @@ -53,7 +53,7 @@ int fegetenv(fenv_t* env) if (!env) return 1; - asm volatile("fstenv %0" + asm volatile("fnstenv %0" : "=m"(env->__x87_fpu_env)::"memory"); env->__mxcsr = read_mxcsr(); |