mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
7562ec14c9
* 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
34 lines
1.2 KiB
C++
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> §ions);
|
|
static std::vector<JumpTable> detectJumpTables(
|
|
const std::vector<Instruction> &instructions,
|
|
const std::vector<Section> §ions,
|
|
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
|