mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
include clearing
This commit is contained in:
parent
102f8cf993
commit
861ce9e733
35 changed files with 1803 additions and 1754 deletions
|
@ -1,17 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#include "MemoryBlock.h"
|
||||
#include "Emu/SysCalls/Callback.h"
|
||||
|
||||
/* OS X uses MAP_ANON instead of MAP_ANONYMOUS */
|
||||
#ifndef MAP_ANONYMOUS
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#endif
|
||||
|
||||
using std::nullptr_t;
|
||||
|
||||
#define safe_delete(x) do {delete (x);(x)=nullptr;} while(0)
|
||||
|
@ -112,36 +103,6 @@ public:
|
|||
|
||||
void UnregisterPages(u64 addr, u32 size);
|
||||
|
||||
static __forceinline u16 Reverse16(const u16 val)
|
||||
{
|
||||
return _byteswap_ushort(val);
|
||||
}
|
||||
|
||||
static __forceinline u32 Reverse32(const u32 val)
|
||||
{
|
||||
return _byteswap_ulong(val);
|
||||
}
|
||||
|
||||
static __forceinline u64 Reverse64(const u64 val)
|
||||
{
|
||||
return _byteswap_uint64(val);
|
||||
}
|
||||
|
||||
static __forceinline u128 Reverse128(const u128 val)
|
||||
{
|
||||
u128 ret;
|
||||
ret.lo = _byteswap_uint64(val.hi);
|
||||
ret.hi = _byteswap_uint64(val.lo);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<int size> static __forceinline u64 ReverseData(u64 val);
|
||||
|
||||
template<typename T> static __forceinline T Reverse(T val)
|
||||
{
|
||||
return (T)ReverseData<sizeof(T)>(val);
|
||||
};
|
||||
|
||||
template<typename T> u8* GetMemFromAddr(const T addr)
|
||||
{
|
||||
if ((u32)addr == addr)
|
||||
|
@ -435,11 +396,6 @@ public:
|
|||
strcpy((char*)GetMemFromAddr<T>(addr), str.c_str());
|
||||
}
|
||||
|
||||
static u64 AlignAddr(const u64 addr, const u64 align)
|
||||
{
|
||||
return (addr + (align-1)) & ~(align-1);
|
||||
}
|
||||
|
||||
u32 GetUserMemTotalSize()
|
||||
{
|
||||
return UserMemory->GetSize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue