mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 21:28:51 +00:00
Parser and Assembler implementations
This commit is contained in:
parent
88cd618b4d
commit
38c15df464
36 changed files with 7522 additions and 11 deletions
29
Source/Core/Common/Assembler/GekkoAssembler.h
Normal file
29
Source/Core/Common/Assembler/GekkoAssembler.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
// 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
|
Loading…
Add table
Add a link
Reference in a new issue