mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 17:37:35 +00: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
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&)
|
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(); }
|
void SoftCPU::FTST(const X86::Instruction&) { TODO_INSN(); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue