diff --git a/Utilities/BEType.h b/Utilities/BEType.h index fbd18f5089..768e25770c 100644 --- a/Utilities/BEType.h +++ b/Utilities/BEType.h @@ -820,5 +820,5 @@ __forceinline Tto convert_le_be(Tfrom&& value) template __forceinline void convert_le_be(Tto& dst, Tfrom&& src) { - dst = convert_le_be_t::func(src) + dst = convert_le_be_t::func(src); } \ No newline at end of file diff --git a/rpcs3/Emu/CPU/CPUThread.h b/rpcs3/Emu/CPU/CPUThread.h index e43b78fe89..6bfbc0e8d4 100644 --- a/rpcs3/Emu/CPU/CPUThread.h +++ b/rpcs3/Emu/CPU/CPUThread.h @@ -292,6 +292,6 @@ public: u32 get_id() const { - thread->GetId(); + return thread->GetId(); } }; \ No newline at end of file diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index 90dc8ccbf5..c24509ea0f 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -187,7 +187,7 @@ private: case 0x104: case 0x105: case 0x106: - case 0x107: CPU.USPRG[n - 0x100] = value; break; + case 0x107: CPU.USPRG[n - 0x100] = value; return; case 0x10C: UNK("WriteSPR: Write to time-based SPR. Report this to a developer!"); return; @@ -198,7 +198,7 @@ private: case 0x114: case 0x115: case 0x116: - case 0x117: CPU.SPRG[n - 0x110] = value; break; + case 0x117: CPU.SPRG[n - 0x110] = value; return; } UNK(fmt::Format("WriteSPR error: Unknown SPR 0x%x!", n)); diff --git a/rpcs3/Emu/Memory/vm_ptr.h b/rpcs3/Emu/Memory/vm_ptr.h index f4bb39ac8c..223bda5243 100644 --- a/rpcs3/Emu/Memory/vm_ptr.h +++ b/rpcs3/Emu/Memory/vm_ptr.h @@ -201,8 +201,8 @@ namespace vm return m_addr; } - template - void set(T&& value) + template + void set(U&& value) { m_addr = convert_le_be(value); } diff --git a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp index 116169406e..5d4acc0f30 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp @@ -900,7 +900,7 @@ int cellDmuxEnableEs(u32 demuxerHandle, vm::ptr esFil *esHandle = id; cellDmux->Warning("*** New ES(dmux=%d, addr=0x%x, size=0x%x, filter(0x%x, 0x%x, 0x%x, 0x%x), cb=0x%x(arg=0x%x), spec=0x%x): id = %d", - demuxerHandle, es->memAddr, es->memSize, es->fidMajor, es->fidMinor, es->sup1, es->sup2, (u32)esCb->cbEsMsgFunc, es->cbArg, es->spec, id); + demuxerHandle, es->memAddr, es->memSize, es->fidMajor, es->fidMinor, es->sup1, es->sup2, esCb->cbEsMsgFunc.addr(), es->cbArg, es->spec, id); DemuxerTask task(dmuxEnableEs); task.es.es = id; diff --git a/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp b/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp index 1f6a00bbdf..4a4a1a5523 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_spu.cpp @@ -7,7 +7,7 @@ #include "Emu/Cell/RawSPUThread.h" #include "Emu/FS/vfsStreamMemory.h" #include "Emu/FS/vfsFile.h" -#include "Loader/elf32.h" +#include "Loader/ELF32.h" #include "Crypto/unself.h" #include "sys_spu.h" diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index efabecda1f..63469f3467 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -48,7 +48,7 @@ public: proc_param.malloc_pagesize = be_t::make(0x100000); proc_param.sdk_version = be_t::make(0x360001); proc_param.primary_stacksize = be_t::make(0x100000); - proc_param.primary_prio = be_t::make(0x50); + proc_param.primary_prio = be_t::make(0x50); } void SetTLSData(const u64 addr, const u64 filesz, const u64 memsz) diff --git a/rpcs3/Loader/ELF32.cpp b/rpcs3/Loader/ELF32.cpp index aa8d7d2dd3..377ab7f5ae 100644 --- a/rpcs3/Loader/ELF32.cpp +++ b/rpcs3/Loader/ELF32.cpp @@ -36,7 +36,7 @@ namespace loader return broken_file; } - LOG_ERROR(LOADER, "m_ehdr.e_type = 0x%x", (u16)(m_ehdr.is_le() ? m_ehdr.data_le.e_type : m_ehdr.data_be.e_type)); + LOG_WARNING(LOADER, "m_ehdr.e_type = 0x%x", (u16)(m_ehdr.is_le() ? m_ehdr.data_le.e_type : m_ehdr.data_be.e_type)); if (m_ehdr.data_le.e_phnum) { diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index 3c497e20f0..3eb33b8bc2 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -43,7 +43,7 @@ namespace loader return broken_file; } - LOG_ERROR(LOADER, "m_ehdr.e_type = 0x%x", m_ehdr.e_type.ToLE()); + LOG_WARNING(LOADER, "m_ehdr.e_type = 0x%x", m_ehdr.e_type.ToLE()); if (m_ehdr.e_machine != MACHINE_PPC64 && m_ehdr.e_machine != MACHINE_SPU) { @@ -94,7 +94,7 @@ namespace loader { for (auto &phdr : m_phdrs) { - switch (phdr.p_type) + switch (phdr.p_type.ToLE()) { case 0x1: //load if (phdr.p_memsz) @@ -366,7 +366,7 @@ namespace loader { for (auto &phdr : m_phdrs) { - switch (phdr.p_type) + switch (phdr.p_type.ToLE()) { case 0x00000001: //LOAD if (phdr.p_memsz) @@ -448,8 +448,8 @@ namespace loader static const u32 tbl_section_size = 2 * 4; static const u32 dst_section_size = 3 * 4; - auto& tbl = ptr::make(alloc(stub->s_imports * tbl_section_size)); - auto& dst = ptr::make(alloc(stub->s_imports * dst_section_size)); + auto tbl = ptr::make(alloc(stub->s_imports * tbl_section_size)); + auto dst = ptr::make(alloc(stub->s_imports * dst_section_size)); for (u32 i = 0; i < stub->s_imports; ++i) {