[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:
water111
2021-01-06 20:04:15 -05:00
committed by GitHub
parent 3331e9cd00
commit 5093b97cda
71 changed files with 2676 additions and 210 deletions
+11 -1
View File
@@ -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