[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
+7 -5
View File
@@ -27,6 +27,7 @@
#include "common/log/log.h"
#include "third-party/json.hpp"
namespace decompiler {
namespace {
std::string strip_dgo_extension(const std::string& x) {
auto ext = x.substr(x.length() - 4, 4);
@@ -715,7 +716,7 @@ void ObjectFileDB::process_tpages() {
100.f * float(success) / float(total), timer.getMs());
}
std::string ObjectFileDB::process_game_text() {
std::string ObjectFileDB::process_game_text_files() {
lg::info("- Finding game text...");
std::string text_string = "COMMON";
Timer timer;
@@ -727,7 +728,7 @@ std::string ObjectFileDB::process_game_text() {
for_each_obj([&](ObjectFileData& data) {
if (data.name_in_dgo.substr(1) == text_string) {
file_count++;
auto statistics = ::process_game_text(data);
auto statistics = process_game_text(data);
string_count += statistics.total_text;
char_count += statistics.total_chars;
if (text_by_language_by_id.find(statistics.language) != text_by_language_by_id.end()) {
@@ -743,7 +744,7 @@ std::string ObjectFileDB::process_game_text() {
return write_game_text(text_by_language_by_id);
}
std::string ObjectFileDB::process_game_count() {
std::string ObjectFileDB::process_game_count_file() {
lg::info("- Finding game count file...");
bool found = false;
std::string result;
@@ -752,7 +753,7 @@ std::string ObjectFileDB::process_game_count() {
if (data.name_in_dgo == "game-cnt") {
assert(!found);
found = true;
result = write_game_count(::process_game_count(data));
result = write_game_count(process_game_count(data));
}
});
@@ -1125,4 +1126,5 @@ void ObjectFileDB::dump_raw_objects(const std::string& output_dir) {
auto dest = output_dir + "/" + data.to_unique_name();
file_util::write_binary_file(dest, data.data.data(), data.data.size());
});
}
}
} // namespace decompiler