mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 09:32:42 +00:00
fixes
This commit is contained in:
parent
7a02787bee
commit
f45cbdd0f7
@ -730,7 +730,7 @@ void PPUTranslator::WriteMemory(Value* addr, Value* value, bool is_be, u32 align
|
|||||||
{
|
{
|
||||||
if (ppu_test_address_may_be_mmio(std::span(ptr->insts)))
|
if (ppu_test_address_may_be_mmio(std::span(ptr->insts)))
|
||||||
{
|
{
|
||||||
ppu_log.notice("LLVM: Detected potential MMIO32 write at [0x%08x]", m_addr + m_reloc ? m_reloc->addr : 0);
|
ppu_log.notice("LLVM: Detected potential MMIO32 write at [0x%08x]", m_addr + (m_reloc ? m_reloc->addr : 0));
|
||||||
Call(GetType<void>(), "__write_maybe_mmio32", m_base, addr, value);
|
Call(GetType<void>(), "__write_maybe_mmio32", m_base, addr, value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -6193,7 +6193,7 @@ spu_exec_object spu_thread::capture_memory_as_elf(std::span<spu_memory_segment_d
|
|||||||
|
|
||||||
if (auto [vm_addr, ok] = vm::try_get_addr(seg.src_addr); ok)
|
if (auto [vm_addr, ok] = vm::try_get_addr(seg.src_addr); ok)
|
||||||
{
|
{
|
||||||
if (!vm::try_access(vm_addr, data.data(), ::size32(data), false))
|
if (!vm::try_access(vm_addr, data.data(), seg.segment_size, false))
|
||||||
{
|
{
|
||||||
spu_log.error("capture_memory_as_elf(): Failed to read {0x%x..0x%x}, aborting capture.", +vm_addr, vm_addr + seg.segment_size - 1);
|
spu_log.error("capture_memory_as_elf(): Failed to read {0x%x..0x%x}, aborting capture.", +vm_addr, vm_addr + seg.segment_size - 1);
|
||||||
spu_exec.set_error(elf_error::stream_data);
|
spu_exec.set_error(elf_error::stream_data);
|
||||||
|
@ -492,7 +492,7 @@ namespace vm
|
|||||||
|
|
||||||
const auto diff = range_lock - g_range_lock_set;
|
const auto diff = range_lock - g_range_lock_set;
|
||||||
|
|
||||||
if (bits != umax && !bits.bit_test_set(::narrow<u32>(diff)))
|
if (bits != umax && !bits.bit_test_set(static_cast<u32>(diff)))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -295,8 +295,8 @@ namespace
|
|||||||
r = upload_untouched_naive(src.data(), dst.data(), count);
|
r = upload_untouched_naive(src.data(), dst.data(), count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
min_index = ::narrow<T>(r);
|
min_index = static_cast<T>(r);
|
||||||
max_index = ::narrow<T>(r >> 32);
|
max_index = static_cast<T>(r >> 32);
|
||||||
|
|
||||||
return std::make_tuple(min_index, max_index, count);
|
return std::make_tuple(min_index, max_index, count);
|
||||||
}
|
}
|
||||||
@ -401,8 +401,8 @@ namespace
|
|||||||
r = upload_untouched_naive(src.data(), dst.data(), count, restart_index);
|
r = upload_untouched_naive(src.data(), dst.data(), count, restart_index);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
min_index = ::narrow<T>(r);
|
min_index = static_cast<T>(r);
|
||||||
max_index = ::narrow<T>(r >> 32);
|
max_index = static_cast<T>(r >> 32);
|
||||||
|
|
||||||
return std::make_tuple(min_index, max_index, count);
|
return std::make_tuple(min_index, max_index, count);
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,8 @@ namespace utils
|
|||||||
, m_size(utils::align(size, 0x10000))
|
, m_size(utils::align(size, 0x10000))
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
m_handle = ensure(::CreateFileMappingW(INVALID_HANDLE_VALUE, nullptr, PAGE_EXECUTE_READWRITE, 0, ::narrow<DWORD>(m_size), nullptr));
|
const ULARGE_INTEGER max_size{ .QuadPart = m_size };
|
||||||
|
m_handle = ensure(::CreateFileMappingW(INVALID_HANDLE_VALUE, nullptr, PAGE_EXECUTE_READWRITE, max_size.HighPart, max_size.LowPart, nullptr));
|
||||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||||
m_file = -1;
|
m_file = -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user