From a031c6c754e01d70cea76ba85f73d9198ffd9edb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 14 Nov 2020 15:27:05 +0100 Subject: UserspaceEmulator: Implement FABS --- DevTools/UserspaceEmulator/SoftCPU.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'DevTools') 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(); } -- cgit v1.2.3