mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
fix some warnings
This commit is contained in:
parent
b1c48e66c9
commit
59c58aa3cf
72 changed files with 263 additions and 203 deletions
|
|
@ -1148,7 +1148,7 @@ static void ppu_check_patch_spu_images(const ppu_module& mod, const ppu_segment&
|
|||
|
||||
for (usz addr_last = 0, valid_count = 0, invalid_count = 0;;)
|
||||
{
|
||||
usz instruction = ls_segment.find("\x24\0\x40\x80"sv, addr_last);
|
||||
const usz instruction = ls_segment.find("\x24\0\x40\x80"sv, addr_last);
|
||||
|
||||
if (instruction != umax)
|
||||
{
|
||||
|
|
@ -1161,7 +1161,7 @@ static void ppu_check_patch_spu_images(const ppu_module& mod, const ppu_segment&
|
|||
|
||||
// FIXME: This seems to terminate SPU code prematurely in some cases
|
||||
// Likely due to absolute branches
|
||||
if (spu_thread::is_exec_code(instruction, {reinterpret_cast<const u8*>(ls_segment.data()), ls_segment.size()}, 0))
|
||||
if (spu_thread::is_exec_code(::narrow<u32>(instruction), {reinterpret_cast<const u8*>(ls_segment.data()), ls_segment.size()}, 0))
|
||||
{
|
||||
addr_last = instruction + 4;
|
||||
valid_count++;
|
||||
|
|
@ -1183,7 +1183,7 @@ static void ppu_check_patch_spu_images(const ppu_module& mod, const ppu_segment&
|
|||
if (addr_last >= 0x80 && valid_count >= 2)
|
||||
{
|
||||
const u32 begin = i & -128;
|
||||
u32 end = std::min<u32>(seg.size, utils::align<u32>(i + addr_last + 256, 128));
|
||||
u32 end = std::min<u32>(seg.size, utils::align<u32>(::narrow<u32>(i + addr_last + 256), 128));
|
||||
|
||||
u32 guessed_ls_addr = 0;
|
||||
|
||||
|
|
@ -1738,7 +1738,7 @@ std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, bool virtual_lo
|
|||
};
|
||||
|
||||
// Access library information (TODO)
|
||||
const auto lib_info = ensure(prx->get_ptr<const ppu_prx_library_info>(prx->segs[0].addr + elf.progs[0].p_paddr - elf.progs[0].p_offset));
|
||||
const auto lib_info = ensure(prx->get_ptr<const ppu_prx_library_info>(::narrow<u32>(prx->segs[0].addr + elf.progs[0].p_paddr - elf.progs[0].p_offset)));
|
||||
const std::string lib_name = lib_info->name;
|
||||
|
||||
strcpy_trunc(prx->module_info_name, lib_name);
|
||||
|
|
@ -1749,7 +1749,7 @@ std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, bool virtual_lo
|
|||
prx->exports_start = lib_info->exports_start;
|
||||
prx->exports_end = lib_info->exports_end;
|
||||
|
||||
for (usz start = prx->exports_start, size = 0;; size++)
|
||||
for (u32 start = prx->exports_start, size = 0;; size++)
|
||||
{
|
||||
if (start >= prx->exports_end)
|
||||
{
|
||||
|
|
@ -2612,7 +2612,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str
|
|||
|
||||
ensure(ppu->stack_size > stack_alloc_size);
|
||||
|
||||
vm::ptr<u64> args = vm::cast(static_cast<u32>(ppu->stack_addr + ppu->stack_size - stack_alloc_size - utils::align<u32>(Emu.data.size(), 0x10)));
|
||||
vm::ptr<u64> args = vm::cast(static_cast<u32>(ppu->stack_addr + ppu->stack_size - stack_alloc_size - utils::align<u32>(::size32(Emu.data), 0x10)));
|
||||
vm::ptr<u8> args_data = vm::cast(args.addr() + pointers_storage_size);
|
||||
|
||||
const vm::ptr<u64> argv = args;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue