dynarmic/externals/oaknut
Merry 501d7ce602 externals: Add oaknut
Merge commit '621367dce8abf82e3924679d72f4da0913cc1520' as 'externals/oaknut'
2022-07-10 09:38:20 +01:00
..
.github/workflows externals: Add oaknut 2022-07-10 09:38:20 +01:00
include/oaknut externals: Add oaknut 2022-07-10 09:38:20 +01:00
tests externals: Add oaknut 2022-07-10 09:38:20 +01:00
.clang-format externals: Add oaknut 2022-07-10 09:38:20 +01:00
.gitignore externals: Add oaknut 2022-07-10 09:38:20 +01:00
CMakeLists.txt externals: Add oaknut 2022-07-10 09:38:20 +01:00
LICENSE externals: Add oaknut 2022-07-10 09:38:20 +01:00
README.md externals: Add oaknut 2022-07-10 09:38:20 +01:00

Oaknut

A C++20 assembler for AArch64 (ARMv8.0)

Oaknut is a header-only library that allows one to dynamically assemble code in-memory at runtime.

Usage

Simple example:

using EmittedFunction = int (*)();

EmittedFunction EmitExample(oaknut::CodeGenerator& code, int value)
{
    using namespace oaknut::util;

    EmittedFunction result = code.ptr<EmittedFunction>();

    code.MOVZ(W0, value);
    code.RET();

    return result;
}

License

This project is MIT licensed.