Lay down basic disassembler

This commit is contained in:
SimoneN64
2024-09-23 22:56:44 +02:00
parent d3096609fe
commit 60870165d5
10 changed files with 132 additions and 3 deletions

View File

@@ -6,6 +6,16 @@
#include <portable_endian_bswap.h>
namespace Util {
template <typename T>
static FORCE_INLINE const std::vector<u8> &IntegralToBuffer(const T &val) {
std::vector<u8> ret{};
ret.resize(sizeof(T));
memcpy(ret.data(), &val, sizeof(T));
return ret;
}
template <typename T>
static FORCE_INLINE T ReadAccess(const u8 *data, u32 index) {
if constexpr (sizeof(T) == 8) {