Implemented initial set of instructions and ignored functions

This commit is contained in:
Mr-Wiseguy 2022-11-15 19:55:48 -05:00
parent 4b1dc14019
commit 8a0f0da0cc
9 changed files with 1204 additions and 15 deletions

31
include/recomp_port.h Normal file
View file

@ -0,0 +1,31 @@
#ifndef __RECOMP_PORT__
#define __RECOMP_PORT__
#include <span>
#include <string_view>
#include <cstdint>
#ifdef _MSC_VER
inline uint32_t byteswap(uint32_t val) {
return _byteswap_ulong(val);
}
#else
constexpr uint32_t byteswap(uint32_t val) {
return __builtin_bswap32(val);
}
#endif
namespace RecompPort {
struct Function {
uint32_t vram;
uint32_t rom;
const std::span<const uint32_t> words;
std::string name;
};
bool recompile_function(const Function& func, std::string_view output_path);
}
#endif