mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
UserspaceEmulator: Correct FSCALES rounding
We were rounding the wrong way, FSCALE is supposed to trunc internally, while we were flooring. Now LibM exponentials and related tests work :^)
This commit is contained in:
parent
fa02b46295
commit
8108aaca39
1 changed files with 1 additions and 1 deletions
|
@ -797,7 +797,7 @@ void SoftFPU::FRNDINT(const X86::Instruction&)
|
|||
void SoftFPU::FSCALE(const X86::Instruction&)
|
||||
{
|
||||
// FIXME: set C1 upon stack overflow or if result was rounded
|
||||
fpu_set(0, fpu_get(0) * powl(2, floorl(fpu_get(1))));
|
||||
fpu_set(0, fpu_get(0) * powl(2, truncl(fpu_get(1))));
|
||||
}
|
||||
|
||||
void SoftFPU::FSQRT(const X86::Instruction&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue