vm: add map_self() method to utils::shm

Add complementary unmap_self() method.
Move VirtualMemory to util/vm.hpp
Minor associated include cleanup.
Move asm.h to util/asm.hpp
This commit is contained in:
Nekotekina 2020-11-08 01:56:35 +03:00
parent b68bdafadc
commit 1c99a2e7fb
24 changed files with 105 additions and 35 deletions

View file

@ -4,7 +4,6 @@
#include "Emu/Memory/vm_reservation.h"
#include "Emu/system_config.h"
#include "PPUThread.h"
#include "Utilities/asm.h"
#include "Utilities/sysinfo.h"
#include "Emu/Cell/Common.h"
@ -12,6 +11,8 @@
#include <bit>
#include <cmath>
#include "util/asm.hpp"
#if !defined(_MSC_VER) && defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
@ -119,7 +120,7 @@ FORCE_INLINE auto ppu_feed_data(ppu_thread& ppu, u64 addr)
const std::byte* src;
u32 size;
u32 offs = 0;
if (raddr / 128 == addr / 128)
src = &ppu.rdata[addr & 127], size = std::min<u32>(128 - (addr % 128), sizeof(T));
else