2015-05-31 21:21:47 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2015-05-31 21:21:47 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-04-16 04:52:40 +00:00
|
|
|
#include <cstddef>
|
|
|
|
#include <iosfwd>
|
2017-03-03 02:21:03 +00:00
|
|
|
#include <memory>
|
2024-04-16 04:52:40 +00:00
|
|
|
|
2015-05-31 21:21:47 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class HostDisassembler
|
|
|
|
{
|
|
|
|
public:
|
2024-04-16 04:52:40 +00:00
|
|
|
enum class Platform
|
2015-08-07 07:43:54 +00:00
|
|
|
{
|
2024-04-16 04:52:40 +00:00
|
|
|
x86_64,
|
|
|
|
aarch64,
|
|
|
|
};
|
2015-05-31 21:21:47 +00:00
|
|
|
|
2024-04-16 04:52:40 +00:00
|
|
|
virtual ~HostDisassembler() = default;
|
|
|
|
|
|
|
|
static std::unique_ptr<HostDisassembler> Factory(Platform arch);
|
2022-12-02 01:16:11 +00:00
|
|
|
|
2024-04-16 04:52:40 +00:00
|
|
|
virtual std::size_t Disassemble(const u8* begin, const u8* end, std::ostream& stream);
|
|
|
|
};
|