mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-06-06 18:31:03 +00:00
Add a check for missing switch cases.
This commit is contained in:
parent
175c0de2ac
commit
989ed13d04
@ -1,5 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// Workaround for the intellisense for some reason not seeing C++23 features
|
||||||
|
#ifdef __INTELLISENSE__
|
||||||
|
#undef __cplusplus
|
||||||
|
#define __cplusplus 202302L
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <disasm.h>
|
#include <disasm.h>
|
||||||
#include <file.h>
|
#include <file.h>
|
||||||
|
@ -1780,6 +1780,9 @@ bool Recompiler::Recompile(const Function& fn)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (insn.opcode->id == PPC_INST_BCTR && (*(data - 1) == 0x07008038 || *(data - 1) == 0x00000060) && switchTable == switchTables.end())
|
||||||
|
std::println("Found a switch jump table at {:X} with no switch table entry present", base);
|
||||||
|
|
||||||
if (!Recompile(fn, base, insn, switchTable))
|
if (!Recompile(fn, base, insn, switchTable))
|
||||||
{
|
{
|
||||||
std::println("Unrecognized instruction at 0x{:X}: {}", base, insn.opcode->name);
|
std::println("Unrecognized instruction at 0x{:X}: {}", base, insn.opcode->name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user