diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 3b59fb30b0..4913436ace 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -481,7 +481,6 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz } } - LOG_WARNING(MEMORY, "decode_x64_reg_op(%016llxh): unsupported opcode found (%016llX%016llX)", (size_t)code - out_length, *(be_t*)(code - out_length), *(be_t*)(code - out_length + 8)); out_op = X64OP_NONE; out_reg = X64_NOT_SET; out_size = 0; @@ -800,9 +799,18 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) // decode single x64 instruction that causes memory access decode_x64_reg_op(code, op, reg, d_size, i_size); + auto report_opcode = [=]() + { + if (op == X64OP_NONE) + { + LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): unsupported opcode found (%016llX%016llX)", code, *(be_t*)(code), *(be_t*)(code + 8)); + } + }; + if ((d_size | d_size + addr) >= 0x100000000ull) { LOG_ERROR(MEMORY, "Invalid d_size (0x%llx)", d_size); + report_opcode(); return false; } @@ -812,6 +820,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) if ((a_size | a_size + addr) >= 0x100000000ull) { LOG_ERROR(MEMORY, "Invalid a_size (0x%llx)", a_size); + report_opcode(); return false; } @@ -828,6 +837,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) if (a_size != 4 || !d_size || !i_size) { LOG_ERROR(MEMORY, "Invalid or unsupported instruction (op=%d, reg=%d, d_size=%lld, a_size=0x%llx, i_size=%lld)", op, reg, d_size, a_size, i_size); + report_opcode(); return false; } @@ -858,6 +868,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) default: { LOG_ERROR(MEMORY, "Invalid or unsupported operation (op=%d, reg=%d, d_size=%lld, i_size=%lld)", op, reg, d_size, i_size); + report_opcode(); return false; } } @@ -874,6 +885,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) if (!d_size || !i_size) { LOG_ERROR(MEMORY, "Invalid or unsupported instruction (op=%d, reg=%d, d_size=%lld, a_size=0x%llx, i_size=%lld)", op, reg, d_size, a_size, i_size); + report_opcode(); return false; } @@ -1085,6 +1097,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) default: { LOG_ERROR(MEMORY, "Invalid or unsupported operation (op=%d, reg=%d, d_size=%lld, a_size=0x%llx, i_size=%lld)", op, reg, d_size, a_size, i_size); + report_opcode(); return false; } } diff --git a/rpcs3/Emu/SysCalls/ModuleManager.cpp b/rpcs3/Emu/SysCalls/ModuleManager.cpp index 180b9b807c..154ed10811 100644 --- a/rpcs3/Emu/SysCalls/ModuleManager.cpp +++ b/rpcs3/Emu/SysCalls/ModuleManager.cpp @@ -81,7 +81,7 @@ static const g_module_list[] = { 0x000a, "cellSpurs", &cellSpurs }, { 0x000b, "cellOvis", &cellOvis }, { 0x000c, "cellSheap", nullptr }, - { 0x000d, "sys_sync", &cellSync }, + { 0x000d, "cellSync", &cellSync }, { 0x000e, "sys_fs", &cellFs }, { 0x000f, "cellJpgDec", &cellJpgDec }, { 0x0010, "cellGcmSys", &cellGcmSys }, @@ -148,7 +148,7 @@ static const g_module_list[] = { 0x0056, "sceNpUtil", &sceNpUtil }, { 0x0057, "cellRudp", &cellRudp }, { 0x0059, "sceNpSns", &sceNpSns }, - { 0x005a, "cellGem", &cellGem }, + { 0x005a, "libgem", &cellGem }, { 0xf00a, "cellCelpEnc", nullptr }, { 0xf010, "cellGifDec", &cellGifDec }, { 0xf019, "cellAdecCelp", nullptr },