diff options
author | Andreas Kling <kling@serenityos.org> | 2020-11-14 15:27:05 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-14 15:34:48 +0100 |
commit | a031c6c754e01d70cea76ba85f73d9198ffd9edb (patch) | |
tree | 3e0202d44139e48f4f679d6295efee9ec7c8f1d2 /DevTools | |
parent | 60ff27c63358ccf147c05c7cdfa6ca0d5d5a547c (diff) | |
download | serenity-a031c6c754e01d70cea76ba85f73d9198ffd9edb.zip |
UserspaceEmulator: Implement FABS
Diffstat (limited to 'DevTools')
-rw-r--r-- | DevTools/UserspaceEmulator/SoftCPU.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/DevTools/UserspaceEmulator/SoftCPU.cpp b/DevTools/UserspaceEmulator/SoftCPU.cpp index e86db38ea9..516cb0e763 100644 --- a/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -1573,7 +1573,11 @@ void SoftCPU::FCHS(const X86::Instruction&) fpu_set(0, -fpu_get(0)); } -void SoftCPU::FABS(const X86::Instruction&) { TODO_INSN(); } +void SoftCPU::FABS(const X86::Instruction&) +{ + fpu_set(0, __builtin_fabs(fpu_get(0))); +} + void SoftCPU::FTST(const X86::Instruction&) { TODO_INSN(); } void SoftCPU::FXAM(const X86::Instruction&) { TODO_INSN(); } |