ReXGlue SDK
Loading...
Searching...
No Matches
call.h File Reference
#include <algorithm>
#include <array>
#include <atomic>
#include <bit>
#include <concepts>
#include <cstdint>
#include <cstring>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
#include <rex/assert.h>
#include <rex/logging/log_category.h>
#include <rex/memory/mapped_ptr.h>
#include <rex/ppc/seh.h>
#include <rex/ppc/context.h>
#include <rex/types.h>
#include <rex/ppc/recompiled_code.h>

Go to the source code of this file.

Classes

struct  rex::ppc::ByValue< T >
struct  rex::ppc::IsByValue< T >
struct  rex::ppc::IsByValue< ByValue< T > >
struct  rex::ppc::ArgCountT< Func >
struct  rex::ppc::ArgPlace
struct  rex::ppc::ArgTranslator
struct  rex::ppc::ArgPlaceT< Func, I >
struct  rex::ppc::ImportFunction< R(Args...)>

Namespaces

namespace  rex
namespace  rex::ppc

Concepts

concept  rex::ppc::BigEndianType
concept  rex::ppc::MappedPtrType
concept  rex::ppc::FloatType
concept  rex::ppc::VectorType
concept  rex::ppc::ByValueType
concept  rex::ppc::HiddenReturnType
concept  rex::ppc::PlainType

Functions

template<typename R, typename... T>
constexpr std::tuple< T... > rex::ppc::FunctionArgs (R(*)(T...)) noexcept
constexpr u32 rex::ppc::ByValueSlots (size_t size)
constexpr bool rex::ppc::IsRightJustified (size_t size)
template<typename T>
constexpr bool rex::ppc::IsFloatType ()
template<typename... Args>
constexpr std::array< ArgPlace, sizeof...(Args)> rex::ppc::PlaceArgs ()
template<typename R, typename... Args>
constexpr auto rex::ppc::PlaceSignatureArgs (R(*)(Args...))
template<auto Func>
constexpr auto rex::ppc::PlaceFunctionArgs ()
template<auto Func, int I = 0, typename... TArgs>
requires (I >= sizeof...(TArgs))
void rex::ppc::TranslateArgsToHost (PPCContext &ctx, u8 *base, std::tuple< TArgs... > &) noexcept
template<auto Func, int I = 0, typename... TArgs>
requires (I < sizeof...(TArgs))
void rex::ppc::TranslateArgsToHost (PPCContext &ctx, u8 *base, std::tuple< TArgs... > &tpl) noexcept
template<int I = 0, typename... TArgs>
requires (I >= sizeof...(TArgs))
void rex::ppc::TranslateArgsToGuest (PPCContext &ctx, u8 *base, std::tuple< TArgs... > &) noexcept
template<int I = 0, typename... TArgs>
requires (I < sizeof...(TArgs))
void rex::ppc::TranslateArgsToGuest (PPCContext &ctx, u8 *base, std::tuple< TArgs... > &tpl) noexcept
template<ByValueType T>
void rex::ppc::StoreByValue (u8 *base, u32 address, const T &value)
template<ByValueType T>
u64 rex::ppc::ByValueToWord (const T &value)
template<ByValueType T>
T rex::ppc::ByValueFromWord (u64 word)
template<ByValueType T>
T rex::ppc::LoadByValue (u8 *base, u32 address)
template<typename RetT>
void rex::ppc::StoreHostResult (PPCContext &ctx, u8 *base, u32 hidden_pointer, const RetT &value)
template<auto Func, bool StopAtEntry = true>
void rex::ppc::GuestToHostThunk (PPCContext &ctx, u8 *base)
u32 rex::ppc::GetStackLimit (PPCContext &ctx, u8 *base)
void rex::ppc::stack_bounds_check (PPCContext &ctx, u8 *base, u32 new_r1)
u32 rex::ppc::FrameBelow (PPCContext &ctx, u8 *base, u32 size)
u32 rex::ppc::OpenCallFrame (PPCContext &ctx, u8 *base, u32 stack_bytes)
template<typename... Args>
constexpr u32 rex::ppc::GetStackArgumentBytes ()
template<typename R>
constexpr u32 rex::ppc::HiddenReturnBytes ()
template<typename R>
R rex::ppc::LoadGuestResult (u8 *base, const PPCRegister &r3, const PPCRegister &f1, const PPCVRegister &v1, u32 result_storage)
template<typename R, typename... Args>
R rex::ppc::Call (PPCContext &ctx, u8 *base, PPCFunc &fn, Args... args)
template<typename T, typename... TArgs>
T rex::ppc::HostToGuestCall (PPCFunc *func, TArgs &&... argv)

Variables

template<ByValueType T>
constexpr size_t rex::ppc::kByValueSize = sizeof(std::declval<std::remove_cvref_t<T>>().value)
constexpr u32 rex::ppc::kRedZone = 1344
constexpr u32 rex::ppc::kLinkageSize = 0x50
constexpr u32 rex::ppc::kHostReturnAddress = 0xBCBCBCBC
constexpr size_t kExLoadedImageNameSize = 255 + 1

Detailed Description

License
BSD 3-Clause License See LICENSE file in the project root for full license text.

Variable Documentation

◆ kExLoadedImageNameSize

size_t kExLoadedImageNameSize = 255 + 1
constexpr

Size of the loaded image name buffer, 255 characters plus NUL.