mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
52edf07657
* feat: added guestBranchKind enum to categorize branch types feat: added missingFunctionPolicy enum to define behaviors for missing function scenarios refactor: added handle guest branches and report missing functions feat lookupFunction to utilize new dispatch logic and improve error handling for unregistered functions * fix: fix test conflict * feat: added debug sound driver logs * feat: emmiter for return * feat: added recompiler reporter feat: added strict diagnostics flag for heavy debug calls * feat: staticc table insted of hashmap for runtime * feat: back file to ignore * feat: explode code across helpers and classes * feat: update codegen test feat: better guest nop check * feat: fix link problem on linux * feat: fix Segmentation fault * feat: added recompile replace for DMA and MMIO feat: added a clean memory helpers feat: use memory helpers across the project feat: fix ucrt on msvc * feat: undo messup merge
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
#ifndef PS2RECOMP_INSTRUCTION_TRANSLATOR_H
|
|
#define PS2RECOMP_INSTRUCTION_TRANSLATOR_H
|
|
|
|
#include <string>
|
|
|
|
#include "ps2recomp/types.h"
|
|
|
|
namespace ps2recomp
|
|
{
|
|
struct Instruction;
|
|
class CodeGenerator;
|
|
|
|
class InstructionTranslator
|
|
{
|
|
public:
|
|
explicit InstructionTranslator(CodeGenerator &codeGenerator);
|
|
std::string translate(const Instruction &inst, const MemoryAccessHint &memoryHint);
|
|
|
|
private:
|
|
MemoryAccessHint effectiveMemoryHintFor(const Instruction &inst, const MemoryAccessHint &memoryHint) const;
|
|
std::string translateMemoryRead(const Instruction &inst,
|
|
const MemoryAccessHint &memoryHint,
|
|
int width,
|
|
const std::string &addr) const;
|
|
std::string translateMemoryWrite(const Instruction &inst,
|
|
const MemoryAccessHint &memoryHint,
|
|
int width,
|
|
const std::string &addr,
|
|
const std::string &value) const;
|
|
|
|
CodeGenerator &m_codeGenerator;
|
|
};
|
|
}
|
|
|
|
#endif // PS2RECOMP_INSTRUCTION_TRANSLATOR_H
|