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