mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
WriteExit: Assert on bad exit numbers
This commit is contained in:
parent
c0ee711cb9
commit
51d5026792
3 changed files with 6 additions and 1 deletions
|
@ -746,6 +746,8 @@ void ArmJit::UpdateRoundingMode(u32 fcr31) {
|
|||
void ArmJit::WriteExit(u32 destination, int exit_num)
|
||||
{
|
||||
// TODO: Check destination is valid and trigger exception.
|
||||
_assert_msg_(exit_num < MAX_JIT_BLOCK_EXITS, "Expected a valid exit_num. dest=%08x", destination);
|
||||
|
||||
WriteDownCount();
|
||||
//If nobody has taken care of this yet (this can be removed when all branches are done)
|
||||
JitBlock *b = js.curBlock;
|
||||
|
|
|
@ -725,6 +725,9 @@ void Arm64Jit::UpdateRoundingMode(u32 fcr31) {
|
|||
// though, as we need to have the SUBS flag set in the end. So with block linking in the mix,
|
||||
// I don't think this gives us that much benefit.
|
||||
void Arm64Jit::WriteExit(u32 destination, int exit_num) {
|
||||
// TODO: Check destination is valid and trigger exception.
|
||||
_assert_msg_(exit_num < MAX_JIT_BLOCK_EXITS, "Expected a valid exit_num. dest=%08x", destination);
|
||||
|
||||
// TODO: Check destination is valid and trigger exception.
|
||||
WriteDownCount();
|
||||
//If nobody has taken care of this yet (this can be removed when all branches are done)
|
||||
|
|
|
@ -708,7 +708,7 @@ static void HitInvalidBranch(uint32_t dest) {
|
|||
}
|
||||
|
||||
void Jit::WriteExit(u32 destination, int exit_num) {
|
||||
_dbg_assert_msg_(exit_num < MAX_JIT_BLOCK_EXITS, "Expected a valid exit_num");
|
||||
_assert_msg_(exit_num < MAX_JIT_BLOCK_EXITS, "Expected a valid exit_num. dest=%08x", destination);
|
||||
|
||||
if (!Memory::IsValidAddress(destination) || (destination & 3) != 0) {
|
||||
ERROR_LOG_REPORT(JIT, "Trying to write block exit to illegal destination %08x: pc = %08x", destination, currentMIPS->pc);
|
||||
|
|
Loading…
Add table
Reference in a new issue