From 797e18cd9738eeb77eaf8b04479c79f9a6cea0be Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 16 Jul 2018 12:51:36 +0100 Subject: [PATCH] fp: Move FPToFixed to its own file --- src/CMakeLists.txt | 3 ++- src/common/fp/op.h | 14 +------------- src/common/fp/{op.cpp => op/FPToFixed.cpp} | 2 +- src/common/fp/op/FPToFixed.h | 21 +++++++++++++++++++++ 4 files changed, 25 insertions(+), 15 deletions(-) rename src/common/fp/{op.cpp => op/FPToFixed.cpp} (99%) create mode 100644 src/common/fp/op/FPToFixed.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 32a2095d..f1abb1cc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,8 +19,9 @@ add_library(dynarmic common/fp/fpsr.h common/fp/info.h common/fp/mantissa_util.h - common/fp/op.cpp common/fp/op.h + common/fp/op/FPToFixed.cpp + common/fp/op/FPToFixed.h common/fp/process_exception.cpp common/fp/process_exception.h common/fp/rounding_mode.h diff --git a/src/common/fp/op.h b/src/common/fp/op.h index 435070b0..cd28bf73 100644 --- a/src/common/fp/op.h +++ b/src/common/fp/op.h @@ -6,16 +6,4 @@ #pragma once -#include "common/common_types.h" -#include "common/fp/fpsr.h" -#include "common/fp/rounding_mode.h" -#include "frontend/A64/FPCR.h" - -namespace Dynarmic::FP { - -using FPCR = A64::FPCR; - -template -u64 FPToFixed(size_t ibits, FPT op, size_t fbits, bool unsigned_, FPCR fpcr, RoundingMode rounding, FPSR& fpsr); - -} // namespace Dynarmic::FP +#include "common/fp/op/FPToFixed.h" diff --git a/src/common/fp/op.cpp b/src/common/fp/op/FPToFixed.cpp similarity index 99% rename from src/common/fp/op.cpp rename to src/common/fp/op/FPToFixed.cpp index 38d9ec91..f64225c9 100644 --- a/src/common/fp/op.cpp +++ b/src/common/fp/op/FPToFixed.cpp @@ -10,7 +10,7 @@ #include "common/safe_ops.h" #include "common/fp/fpsr.h" #include "common/fp/mantissa_util.h" -#include "common/fp/op.h" +#include "common/fp/op/FPToFixed.h" #include "common/fp/process_exception.h" #include "common/fp/rounding_mode.h" #include "common/fp/unpacked.h" diff --git a/src/common/fp/op/FPToFixed.h b/src/common/fp/op/FPToFixed.h new file mode 100644 index 00000000..435070b0 --- /dev/null +++ b/src/common/fp/op/FPToFixed.h @@ -0,0 +1,21 @@ +/* This file is part of the dynarmic project. + * Copyright (c) 2018 MerryMage + * This software may be used and distributed according to the terms of the GNU + * General Public License version 2 or any later version. + */ + +#pragma once + +#include "common/common_types.h" +#include "common/fp/fpsr.h" +#include "common/fp/rounding_mode.h" +#include "frontend/A64/FPCR.h" + +namespace Dynarmic::FP { + +using FPCR = A64::FPCR; + +template +u64 FPToFixed(size_t ibits, FPT op, size_t fbits, bool unsigned_, FPCR fpcr, RoundingMode rounding, FPSR& fpsr); + +} // namespace Dynarmic::FP