Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
338 changes: 207 additions & 131 deletions 3rdparty/asmjit/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 3rdparty/asmjit/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2008-2024 The AsmJit Authors
Copyright (c) 2008-2025 Petr Kobalicek

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
70 changes: 39 additions & 31 deletions 3rdparty/asmjit/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AsmJit
------

AsmJit is a lightweight library for machine code generation written in C++ language.
AsmJit is a library for low-latency machine code generation written in C++.

* [Official Home Page (asmjit.com)](https://asmjit.com)
* [Official Repository (asmjit/asmjit)](https://github.com/asmjit/asmjit)
Expand All @@ -10,61 +10,69 @@ AsmJit is a lightweight library for machine code generation written in C++ langu

See [asmjit.com](https://asmjit.com) page for more details, examples, and documentation.

Documentation
-------------
Project Organization
--------------------

* [Documentation Index](https://asmjit.com/doc/index.html)
* [Build Instructions](https://asmjit.com/doc/group__asmjit__build.html)
* **`/`** - Project root
* **src** - Source code
* **asmjit** - Source code and headers (always point include path in here)
* **core** - Core API, backend independent except relocations
* **arm** - ARM specific API, designed to be common for both AArch32 and AArch64
* **a64** - AArch64 specific API, used only by AArch64 backends
* **x86** - X86 specific API, used only by X86 and X64 backends
* **ujit** - Universal JIT API
* **testing** - Unit tests, integration tests, and benchmarks (don't embed in your project)
* **commons** - Common utilities shared between tests and benchmarks
* **bench** - Benchmarks
* **tests** - Unit tests and integration tests
* **tools** - Tools used to re-regenerate generated files (instruction DB, enum strings)

Roadmap
-------

* See [Roadmap](https://asmjit.com/roadmap.html) page for more details

Contributing
------------

* See [CONTRIBUTING](./CONTRIBUTING.md) page for more details

Documentation
-------------

* [Documentation Index](https://asmjit.com/doc/index.html)
* [Build Instructions](https://asmjit.com/doc/group__asmjit__build.html) (includes [CMake Integration](https://asmjit.com/doc/group__asmjit__build.html#cmake_integration))

Development & Testing
---------------------

* Basic configure scripts that invoke cmake are provided in project root.

Breaking Changes
----------------

Breaking the API is sometimes inevitable, what to do?

* See [Breaking Changes Guide](https://asmjit.com/doc/group__asmjit__breaking__changes.html), which is now part of AsmJit documentation
* See asmjit tests, they always compile and provide implementation of many use-cases:
* [asmjit_test_emitters.cpp](./test/asmjit_test_emitters.cpp) - Tests that demonstrate the purpose of emitters
* [asmjit_test_assembler_x86.cpp](./test/asmjit_test_assembler_x86.cpp) - Tests targeting AsmJit's Assembler (x86/x64)
* [asmjit_test_compiler_x86.cpp](./test/asmjit_test_compiler_x86.cpp) - Tests targeting AsmJit's Compiler (x86/x64)
* [asmjit_test_instinfo.cpp](./test/asmjit_test_instinfo.cpp) - Tests that query instruction information
* [asmjit_test_x86_sections.cpp](./test/asmjit_test_x86_sections.cpp) - Multiple sections test.
* [asmjit_test_emitters.cpp](./testing/tests/asmjit_test_emitters.cpp) - Tests that demonstrate the purpose of emitters
* [asmjit_test_assembler_x86.cpp](./testing/tests/asmjit_test_assembler_x86.cpp) - Tests targeting AsmJit's Assembler (x86/x64)
* [asmjit_test_compiler_x86.cpp](./testing/tests/asmjit_test_compiler_x86.cpp) - Tests targeting AsmJit's Compiler (x86/x64)
* [asmjit_test_instinfo.cpp](./testing/tests/asmjit_test_instinfo.cpp) - Tests that query instruction information
* [asmjit_test_x86_sections.cpp](./testing/tests/asmjit_test_x86_sections.cpp) - Multiple sections test
* Visit our [Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im) if you need a quick help

Project Organization
--------------------

* **`/`** - Project root
* **src** - Source code
* **asmjit** - Source code and headers (always point include path in here)
* **core** - Core API, backend independent except relocations
* **arm** - ARM specific API, used only by ARM and AArch64 backends
* **x86** - X86 specific API, used only by X86 and X64 backends
* **test** - Unit and integration tests (don't embed in your project)
* **tools** - Tools used for configuring, documenting, and generating files

Ports
-----

* [ ] 32-bit ARM/Thumb port (work in progress)
* [ ] RISC-V port (not in progress, help welcome)

Support
-------

* AsmJit project has both community and commercial support, see [AsmJit's Support Page](https://asmjit.com/support.html)
* You can help the development and maintenance through Petr Kobalicek's [GitHub sponsors Profile](https://github.com/sponsors/kobalicek)
* Organizations that rely on AsmJit should support the development!

Notable Donors List:

* [ZehMatt](https://github.com/ZehMatt)


Authors & Maintainers
---------------------

* Petr Kobalicek <kobalicek.petr@gmail.com>
* Petr Kobalicek <kobalicek.petr@gmail.com> ([website](https://kobalicek.com))
11 changes: 11 additions & 0 deletions 3rdparty/asmjit/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

BUILD_OPTIONS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"

echo "== [Configuring Build - Debug] =="
eval cmake . -B build/Debug -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} "$@"
echo ""

echo "== [Configuring Build - Release] =="
eval cmake . -B build/Release -DCMAKE_BUILD_TYPE=Release ${BUILD_OPTIONS} "$@"
echo ""
15 changes: 15 additions & 0 deletions 3rdparty/asmjit/configure_sanitizers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

BUILD_OPTIONS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"

echo "== [Configuring Build - Release_ASAN] =="
eval cmake . -B build/Release_ASAN ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DASMJIT_SANITIZE=address "$@"
echo ""

echo "== [Configuring Build - Release_MSAN] =="
eval cmake . -B build/Release_MSAN ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DASMJIT_SANITIZE=memory "$@"
echo ""

echo "== [Configuring Build - Release_UBSAN] =="
eval cmake . -B build/Release_UBSAN ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DASMJIT_SANITIZE=undefined "$@"
echo ""
2 changes: 2 additions & 0 deletions 3rdparty/asmjit/configure_vs2022_x64.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
cmake . -B build_x64 -G"Visual Studio 17" -A x64 -DASMJIT_TEST=ON
2 changes: 2 additions & 0 deletions 3rdparty/asmjit/configure_vs2022_x86.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
cmake . -B build_x86 -G"Visual Studio 17" -A Win32 -DASMJIT_TEST=ON
Loading
Loading