mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
Minor fixes
This commit is contained in:
parent
02c0b69adb
commit
badeb29901
2 changed files with 16 additions and 3 deletions
|
@ -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<u64>*)(code - out_length), *(be_t<u64>*)(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<u64>*)(code), *(be_t<u64>*)(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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue