Add icicle mmio support

This commit is contained in:
Maurice Heumann
2025-04-01 15:40:53 +02:00
parent 54b5bdc531
commit 7222c0fc1d
7 changed files with 312 additions and 56 deletions

View File

@@ -3,10 +3,10 @@
#include <memory>
#include <functional>
#include "object.hpp"
#include <utils/object.hpp>
template <typename ReturnType, typename... Args>
class function_wrapper : public object
class function_wrapper : public utils::object
{
public:
using user_data_pointer = void*;

View File

@@ -1,12 +0,0 @@
#pragma once
struct object
{
object() = default;
virtual ~object() = default;
object(object&&) = default;
object(const object&) = default;
object& operator=(object&&) = default;
object& operator=(const object&) = default;
};

View File

@@ -75,7 +75,7 @@ namespace unicorn
}
}
struct hook_object : object
struct hook_object : utils::object
{
emulator_hook* as_opaque_hook()
{
@@ -87,7 +87,7 @@ namespace unicorn
{
public:
template <typename T>
requires(std::is_base_of_v<object, T> && std::is_move_constructible_v<T>)
requires(std::is_base_of_v<utils::object, T> && std::is_move_constructible_v<T>)
void add(T data, unicorn_hook hook)
{
hook_entry entry{};
@@ -101,7 +101,7 @@ namespace unicorn
private:
struct hook_entry
{
std::unique_ptr<object> data{};
std::unique_ptr<utils::object> data{};
unicorn_hook hook{};
};