mirror of
https://github.com/open-goal/jak-project
synced 2026-06-03 02:30:13 -04:00
[Decompiler - New IR] Add AtomicOp (#181)
* wip decompiler ir * add AtomicOp stuff * fix windows build and warnings * add instruction parser * include * make minilzo shared * odr fix * a * fix merge conflicts * move decompiler into namespace * update the code coverage to include the decompiler * add demo test * add register use test to example test
This commit is contained in:
@@ -6,8 +6,13 @@
|
||||
#include "OpcodeInfo.h"
|
||||
#include <cassert>
|
||||
|
||||
namespace decompiler {
|
||||
OpcodeInfo gOpcodeInfo[(uint32_t)InstructionKind::EE_OP_MAX];
|
||||
|
||||
namespace {
|
||||
bool opcodes_initialized = false;
|
||||
}
|
||||
|
||||
typedef InstructionKind IK;
|
||||
typedef FieldType FT;
|
||||
typedef DecodeType DT;
|
||||
@@ -130,6 +135,9 @@ static OpcodeInfo& cd_dacc_svfs_svft(OpcodeInfo& info) {
|
||||
}
|
||||
|
||||
void init_opcode_info() {
|
||||
if (opcodes_initialized) {
|
||||
return;
|
||||
}
|
||||
gOpcodeInfo[0].name = ";; ??????";
|
||||
|
||||
// RT, RS, SIMM
|
||||
@@ -444,6 +452,7 @@ void init_opcode_info() {
|
||||
// for the UNKNOWN op which shouldn't be valid.
|
||||
total_count--;
|
||||
assert(total_count == valid_count);
|
||||
opcodes_initialized = true;
|
||||
}
|
||||
|
||||
void OpcodeInfo::step(DecodeStep& s) {
|
||||
@@ -501,4 +510,5 @@ OpcodeInfo& OpcodeInfo::dst_vf(FieldType field) {
|
||||
|
||||
OpcodeInfo& OpcodeInfo::dst_vi(FieldType field) {
|
||||
return dst(field, DT::VI);
|
||||
}
|
||||
}
|
||||
} // namespace decompiler
|
||||
Reference in New Issue
Block a user