dolphin/Source/Core/Common/Assembler/GekkoAssembler.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
911 B
C
Raw Normal View History

2022-12-18 08:43:28 +00:00
// Copyright 2023 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <string_view>
#include <vector>
#include "Common/Assembler/AssemblerShared.h"
#include "Common/CommonTypes.h"
namespace Common::GekkoAssembler
{
struct CodeBlock
{
CodeBlock(u32 address) : block_address(address) {}
void PushBigEndian(u32 val);
u32 block_address;
std::vector<u8> instructions;
};
// Common::GekkoAssember::Assemble - Core routine for assembling Gekko/Broadway instructions
// Supports the full Gekko ISA, as well as the extended mnemonics defined by the book "PowerPC
// Microprocessor Family: The Programming Environments" The input assembly is fully parsed and
// assembled with a base address specified by the base_virtual_address
FailureOr<std::vector<CodeBlock>> Assemble(std::string_view assembly, u32 base_virtual_address);
} // namespace Common::GekkoAssembler