Lay down basic disassembler
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user