Files
PS2Recomp/ps2xAnalyzer/include/ps2recomp/analysis_passes.h
T
Ranieri 7562ec14c9 better analyzer and integrating sce-symbol-scanner (#130)
* feat: modularize elf analyzer
feat: added experimental sce symbol scanner
feat: change analyzer order
feat: small optimizations on analyzer

* feat: remove example_config.toml because its causing confusion on some people

* feat: embed sce symbol but leave optional import path
feat: killed skip function on analyzer but leave it so you can skip manual if you want

* feat: pin elfio tag

* feat: manually create string view with size

* feat: update ghidra script
2026-06-06 23:37:12 -03:00

34 lines
1.2 KiB
C++

#ifndef PS2RECOMP_ANALYSIS_PASSES_H
#define PS2RECOMP_ANALYSIS_PASSES_H
#include "ps2recomp/types.h"
#include <cstddef>
#include <cstdint>
#include <functional>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace ps2recomp
{
class AnalysisPasses
{
public:
static bool hasHardwareIOSignal(const std::vector<Instruction> &instructions);
static bool hasLargeComplexMMISignal(const std::vector<Instruction> &instructions,
size_t largeInstructionThreshold = 500);
static bool hasSelfModifyingSignal(const std::vector<Instruction> &instructions,
const std::vector<Section> &sections);
static std::vector<JumpTable> detectJumpTables(
const std::vector<Instruction> &instructions,
const std::vector<Section> &sections,
const std::function<bool(uint32_t, uint32_t &)> &readWord);
static std::unordered_set<std::string> findRecursiveFunctions(
const std::unordered_map<std::string, std::vector<std::string>> &callGraph);
};
}
#endif // PS2RECOMP_ANALYSIS_PASSES_H