mp: rename mp.h to mp/function_info.h
This commit is contained in:
parent
0921678edb
commit
1edd0125b2
6 changed files with 13 additions and 11 deletions
|
@ -49,13 +49,13 @@ add_library(dynarmic
|
||||||
common/math_util.h
|
common/math_util.h
|
||||||
common/memory_pool.cpp
|
common/memory_pool.cpp
|
||||||
common/memory_pool.h
|
common/memory_pool.h
|
||||||
common/mp.h
|
|
||||||
common/mp/append.h
|
common/mp/append.h
|
||||||
common/mp/bind.h
|
common/mp/bind.h
|
||||||
common/mp/cartesian_product.h
|
common/mp/cartesian_product.h
|
||||||
common/mp/concat.h
|
common/mp/concat.h
|
||||||
common/mp/fapply.h
|
common/mp/fapply.h
|
||||||
common/mp/fmap.h
|
common/mp/fmap.h
|
||||||
|
common/mp/function_info.h
|
||||||
common/mp/list.h
|
common/mp/list.h
|
||||||
common/mp/lut.h
|
common/mp/lut.h
|
||||||
common/mp/to_tuple.h
|
common/mp/to_tuple.h
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/cast_util.h"
|
#include "common/cast_util.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/mp.h"
|
#include "common/mp/function_info.h"
|
||||||
|
|
||||||
namespace Dynarmic {
|
namespace Dynarmic {
|
||||||
namespace BackendX64 {
|
namespace BackendX64 {
|
||||||
|
@ -33,18 +33,18 @@ struct ThunkBuilder<R(C::*)(Args...), mfp> {
|
||||||
} // namespace impl
|
} // namespace impl
|
||||||
|
|
||||||
template <typename FunctionType, FunctionType mfp>
|
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_)};
|
return ArgCallback{&impl::ThunkBuilder<FunctionType, mfp>::Thunk, reinterpret_cast<u64>(this_)};
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FunctionType, FunctionType mfp>
|
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);
|
static_assert(sizeof(mfp) == 8);
|
||||||
return ArgCallback{Common::BitCast<u64>(mfp), reinterpret_cast<u64>(this_)};
|
return ArgCallback{Common::BitCast<u64>(mfp), reinterpret_cast<u64>(this_)};
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FunctionType, FunctionType mfp>
|
template <typename FunctionType, FunctionType mfp>
|
||||||
ArgCallback DevirtualizeItanium(mp::class_type_t<FunctionType>* this_) {
|
ArgCallback DevirtualizeItanium(Common::mp::class_type_t<FunctionType>* this_) {
|
||||||
struct MemberFunctionPointer {
|
struct MemberFunctionPointer {
|
||||||
/// For a non-virtual function, this is a simple function pointer.
|
/// For a non-virtual function, this is a simple function pointer.
|
||||||
/// For a virtual function, it is (1 + virtual table offset in bytes).
|
/// For a virtual function, it is (1 + virtual table offset in bytes).
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/bit_util.h"
|
#include "common/bit_util.h"
|
||||||
#include "common/common_types.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/basic_block.h"
|
||||||
#include "frontend/ir/microinstruction.h"
|
#include "frontend/ir/microinstruction.h"
|
||||||
#include "frontend/ir/opcodes.h"
|
#include "frontend/ir/opcodes.h"
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
namespace Dynarmic::BackendX64 {
|
namespace Dynarmic::BackendX64 {
|
||||||
|
|
||||||
using namespace Xbyak::util;
|
using namespace Xbyak::util;
|
||||||
|
namespace mp = Common::mp;
|
||||||
|
|
||||||
template <typename Function>
|
template <typename Function>
|
||||||
static void EmitVectorOperation(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst, Function fn) {
|
static void EmitVectorOperation(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst, Function fn) {
|
||||||
|
|
|
@ -13,13 +13,14 @@
|
||||||
#include "common/fp/fpcr.h"
|
#include "common/fp/fpcr.h"
|
||||||
#include "common/fp/op.h"
|
#include "common/fp/op.h"
|
||||||
#include "common/fp/util.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/basic_block.h"
|
||||||
#include "frontend/ir/microinstruction.h"
|
#include "frontend/ir/microinstruction.h"
|
||||||
|
|
||||||
namespace Dynarmic::BackendX64 {
|
namespace Dynarmic::BackendX64 {
|
||||||
|
|
||||||
using namespace Xbyak::util;
|
using namespace Xbyak::util;
|
||||||
|
namespace mp = Common::mp;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct NaNWrapper;
|
struct NaNWrapper;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
namespace Dynarmic::mp {
|
namespace Dynarmic::Common::mp {
|
||||||
|
|
||||||
/// Used to provide information about an arbitrary function.
|
/// Used to provide information about an arbitrary function.
|
||||||
template <typename Function>
|
template <typename Function>
|
||||||
|
@ -91,4 +91,4 @@ using class_type_t = typename FunctionInfo<Function>::class_type;
|
||||||
template <typename Function>
|
template <typename Function>
|
||||||
using equivalent_function_type_t = typename FunctionInfo<Function>::equivalent_function_type;
|
using equivalent_function_type_t = typename FunctionInfo<Function>::equivalent_function_type;
|
||||||
|
|
||||||
} // namespace Dynarmic::mp
|
} // namespace Dynarmic::Common::mp
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/bit_util.h"
|
#include "common/bit_util.h"
|
||||||
#include "common/mp.h"
|
#include "common/mp/function_info.h"
|
||||||
|
|
||||||
namespace Dynarmic::Decoder {
|
namespace Dynarmic::Decoder {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
@ -150,7 +150,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template<typename FnT>
|
template<typename FnT>
|
||||||
static auto GetMatcher(FnT fn, const char* const name, const char* const bitstring) {
|
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>;
|
using Iota = std::make_index_sequence<args_count>;
|
||||||
|
|
||||||
const auto [mask, expect] = GetMaskAndExpect(bitstring);
|
const auto [mask, expect] = GetMaskAndExpect(bitstring);
|
||||||
|
|
Loading…
Reference in a new issue