1
0
Fork 0
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:
Daniel Bertalan 2021-07-05 19:35:52 +02:00 committed by Gunnar Beutner
parent a36c37db47
commit 3bdefb4623
Notes: sideshowbarker 2024-07-18 10:05:36 +09:00

View file

@ -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(); }