mirror of
https://github.com/N64Recomp/N64Recomp.git
synced 2025-05-19 09:54:53 +00:00
Implemented initial set of instructions and ignored functions
This commit is contained in:
parent
4b1dc14019
commit
8a0f0da0cc
9 changed files with 1204 additions and 15 deletions
31
include/recomp_port.h
Normal file
31
include/recomp_port.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue