mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
UserspaceEmulator: Use long double in FABS
`fpu_get` returns a long double and `fpu_set` expects a long double as its parameter, and the X87 FPU uses long doubles as its internal storage, meaning the `FABS` operates on them. This means the correct intrinsic function for implementing it is `__builtin_fabsl`.
This commit is contained in:
parent
a36c37db47
commit
3bdefb4623
Notes:
sideshowbarker
2024-07-18 10:05:36 +09:00
Author: https://github.com/BertalanD
Commit: 3bdefb4623
Pull-request: https://github.com/SerenityOS/serenity/pull/8470
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gunnarbeutner ✅
1 changed files with 1 additions and 1 deletions
|
@ -1565,7 +1565,7 @@ void SoftCPU::FCHS(const X86::Instruction&)
|
|||
|
||||
void SoftCPU::FABS(const X86::Instruction&)
|
||||
{
|
||||
fpu_set(0, __builtin_fabs(fpu_get(0)));
|
||||
fpu_set(0, __builtin_fabsl(fpu_get(0)));
|
||||
}
|
||||
|
||||
void SoftCPU::FTST(const X86::Instruction&) { TODO_INSN(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue