mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-01 12:46:01 +00:00
Reduce assert to a warning (#1115)
This commit is contained in:
parent
7476287649
commit
65bd62e98b
|
@ -1053,7 +1053,14 @@ static bool TryExecuteIllegalInstruction(void* ctx, void* code_address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 index = (lowQWordSrc >> 8) & 0x3F;
|
u64 index = (lowQWordSrc >> 8) & 0x3F;
|
||||||
ASSERT_MSG(length + index <= 64, "length + index must be less than or equal to 64.");
|
if (length + index > 64) {
|
||||||
|
// Undefined behavior if length + index is bigger than 64 according to the spec,
|
||||||
|
// we'll warn and continue execution.
|
||||||
|
LOG_WARNING(Core,
|
||||||
|
"extrq at {:x} with length {} and index {} is bigger than 64, "
|
||||||
|
"undefined behavior",
|
||||||
|
fmt::ptr(code_address), length, index);
|
||||||
|
}
|
||||||
|
|
||||||
lowQWordDst >>= index;
|
lowQWordDst >>= index;
|
||||||
lowQWordDst &= mask;
|
lowQWordDst &= mask;
|
||||||
|
@ -1106,7 +1113,14 @@ static bool TryExecuteIllegalInstruction(void* ctx, void* code_address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 index = (highQWordSrc >> 8) & 0x3F;
|
u64 index = (highQWordSrc >> 8) & 0x3F;
|
||||||
ASSERT_MSG(length + index <= 64, "length + index must be less than or equal to 64.");
|
if (length + index > 64) {
|
||||||
|
// Undefined behavior if length + index is bigger than 64 according to the spec,
|
||||||
|
// we'll warn and continue execution.
|
||||||
|
LOG_WARNING(Core,
|
||||||
|
"insertq at {:x} with length {} and index {} is bigger than 64, "
|
||||||
|
"undefined behavior",
|
||||||
|
fmt::ptr(code_address), length, index);
|
||||||
|
}
|
||||||
|
|
||||||
lowQWordSrc &= mask;
|
lowQWordSrc &= mask;
|
||||||
lowQWordDst &= ~(mask << index);
|
lowQWordDst &= ~(mask << index);
|
||||||
|
|
Loading…
Reference in a new issue