mp: rename mp.h to mp/function_info.h

This commit is contained in:
MerryMage 2018-07-25 11:28:36 +01:00
parent 0921678edb
commit 1edd0125b2
6 changed files with 13 additions and 11 deletions

View file

@ -49,13 +49,13 @@ add_library(dynarmic
common/math_util.h
common/memory_pool.cpp
common/memory_pool.h
common/mp.h
common/mp/append.h
common/mp/bind.h
common/mp/cartesian_product.h
common/mp/concat.h
common/mp/fapply.h
common/mp/fmap.h
common/mp/function_info.h
common/mp/list.h
common/mp/lut.h
common/mp/to_tuple.h

View file

@ -13,7 +13,7 @@
#include "common/assert.h"
#include "common/cast_util.h"
#include "common/common_types.h"
#include "common/mp.h"
#include "common/mp/function_info.h"
namespace Dynarmic {
namespace BackendX64 {
@ -33,18 +33,18 @@ struct ThunkBuilder<R(C::*)(Args...), mfp> {
} // namespace impl
template <typename FunctionType, FunctionType mfp>
ArgCallback DevirtualizeGeneric(mp::class_type_t<FunctionType>* this_) {
ArgCallback DevirtualizeGeneric(Common::mp::class_type_t<FunctionType>* this_) {
return ArgCallback{&impl::ThunkBuilder<FunctionType, mfp>::Thunk, reinterpret_cast<u64>(this_)};
}
template <typename FunctionType, FunctionType mfp>
ArgCallback DevirtualizeWindows(mp::class_type_t<FunctionType>* this_) {
ArgCallback DevirtualizeWindows(Common::mp::class_type_t<FunctionType>* this_) {
static_assert(sizeof(mfp) == 8);
return ArgCallback{Common::BitCast<u64>(mfp), reinterpret_cast<u64>(this_)};
}
template <typename FunctionType, FunctionType mfp>
ArgCallback DevirtualizeItanium(mp::class_type_t<FunctionType>* this_) {
ArgCallback DevirtualizeItanium(Common::mp::class_type_t<FunctionType>* this_) {
struct MemberFunctionPointer {
/// For a non-virtual function, this is a simple function pointer.
/// For a virtual function, it is (1 + virtual table offset in bytes).

View file

@ -14,7 +14,7 @@
#include "common/assert.h"
#include "common/bit_util.h"
#include "common/common_types.h"
#include "common/mp.h"
#include "common/mp/function_info.h"
#include "frontend/ir/basic_block.h"
#include "frontend/ir/microinstruction.h"
#include "frontend/ir/opcodes.h"
@ -22,6 +22,7 @@
namespace Dynarmic::BackendX64 {
using namespace Xbyak::util;
namespace mp = Common::mp;
template <typename Function>
static void EmitVectorOperation(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst, Function fn) {

View file

@ -13,13 +13,14 @@
#include "common/fp/fpcr.h"
#include "common/fp/op.h"
#include "common/fp/util.h"
#include "common/mp.h"
#include "common/mp/function_info.h"
#include "frontend/ir/basic_block.h"
#include "frontend/ir/microinstruction.h"
namespace Dynarmic::BackendX64 {
using namespace Xbyak::util;
namespace mp = Common::mp;
template <typename T>
struct NaNWrapper;

View file

@ -9,7 +9,7 @@
#include <cstddef>
#include <tuple>
namespace Dynarmic::mp {
namespace Dynarmic::Common::mp {
/// Used to provide information about an arbitrary function.
template <typename Function>
@ -91,4 +91,4 @@ using class_type_t = typename FunctionInfo<Function>::class_type;
template <typename Function>
using equivalent_function_type_t = typename FunctionInfo<Function>::equivalent_function_type;
} // namespace Dynarmic::mp
} // namespace Dynarmic::Common::mp

View file

@ -12,7 +12,7 @@
#include "common/assert.h"
#include "common/bit_util.h"
#include "common/mp.h"
#include "common/mp/function_info.h"
namespace Dynarmic::Decoder {
namespace detail {
@ -150,7 +150,7 @@ public:
*/
template<typename FnT>
static auto GetMatcher(FnT fn, const char* const name, const char* const bitstring) {
constexpr size_t args_count = mp::FunctionInfo<FnT>::args_count;
constexpr size_t args_count = Common::mp::FunctionInfo<FnT>::args_count;
using Iota = std::make_index_sequence<args_count>;
const auto [mask, expect] = GetMaskAndExpect(bitstring);