mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-16 20:17:05 +03:00
Codebase update and improvements, instruction DB update
* Denested src folder to root, renamed testing to asmjit-testing
* Refactored how headers are included into <asmjit/...> form. This
is necessary as compilers would never simplify a path once a ..
appears in include directory - then paths such as ../core/../core
appeared in asserts, which was ugly
* Moved support utilities into asmjit/support/... (still included
by asmjit/core.h for convenience and compatibility)
* Added CMakePresets.json for making it easy to develop AsmJit
* Reworked CMakeLists to be shorter and use CMake option(),
etc... This simplifies it and makes it using more standard
features
* ASMJIT_EMBED now creates asmjit_embed INTERFACE library,
which is accessible via asmjit::asmjit target - this simplifies
embedding and makes it the same as library targets from a CMake
perspective
* Removed ASMJIT_DEPS - this is now provided by cmake target
aliases - 'asmjit::asmjit' so users should not need this variable
* Changed meaning of ASMJIT_LIBS - this now contains only AsmJit
dependencies without asmjit::asmjit target alias. Don't rely on
ASMJIT_LIBS anymore as it's only used internally
* Removed ASMJIT_NO_DEPRECATED option - AsmJit is not going
to provide controllable deprecations in the future
* Removed ASMJIT_NO_VALIDATION in favor of ASMJIT_NO_INTROSPECTION,
which now controls query, features, and validation API presence
* Removed ASMJIT_DIR option - it was never really needed
* Removed AMX_TRANSPOSE feature from instruction database (X86).
Intel has removed it as well, so it's a feature that won't
be siliconized
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -41,14 +41,12 @@ jobs:
|
|||||||
- { title: "linux/ubsan" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "ubsan", }
|
- { title: "linux/ubsan" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "ubsan", }
|
||||||
- { title: "linux/hardened" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "hardened", }
|
- { title: "linux/hardened" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "hardened", }
|
||||||
- { title: "linux/valgrind" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "valgrind", }
|
- { title: "linux/valgrind" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1", diagnostics: "valgrind", }
|
||||||
- { title: "linux/no-deprecated" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_DEPRECATED=1" }
|
|
||||||
- { title: "linux/no-logging" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1" }
|
- { title: "linux/no-logging" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1" }
|
||||||
- { title: "linux/no-logging-text" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1,ASMJIT_NO_TEXT=1" }
|
- { title: "linux/no-logging-text" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1,ASMJIT_NO_TEXT=1" }
|
||||||
- { title: "linux/no-builder" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_BUILDER=1" }
|
- { title: "linux/no-builder" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_BUILDER=1" }
|
||||||
- { title: "linux/no-compiler" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1" }
|
- { title: "linux/no-compiler" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1" }
|
||||||
- { title: "linux/no-introspection", host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1,ASMJIT_NO_INTROSPECTION=1" }
|
- { title: "linux/no-introspection", host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1,ASMJIT_NO_INTROSPECTION=1" }
|
||||||
- { title: "linux/no-jit" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_JIT=1" }
|
- { title: "linux/no-jit" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_JIT=1" }
|
||||||
- { title: "linux/no-validation" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_VALIDATION=1" }
|
|
||||||
- { title: "linux/no-x86" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_X86=1" }
|
- { title: "linux/no-x86" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_X86=1" }
|
||||||
- { title: "linux/no-aarch64" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_AARCH64=1" }
|
- { title: "linux/no-aarch64" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_AARCH64=1" }
|
||||||
- { title: "linux/use-c++20" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Debug" , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-std=c++20" }
|
- { title: "linux/use-c++20" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-19", conf: "Debug" , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-std=c++20" }
|
||||||
|
|||||||
891
CMakeLists.txt
891
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
51
CMakePresets.json
Normal file
51
CMakePresets.json
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"version": 10,
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "conf-base",
|
||||||
|
"hidden": true,
|
||||||
|
"description": "${presetName}",
|
||||||
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||||
|
"cacheVariables": { "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" }
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "conf-debug",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "conf-base",
|
||||||
|
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "conf-release",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "conf-base",
|
||||||
|
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release", "CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON" }
|
||||||
|
},
|
||||||
|
|
||||||
|
{ "name": "conf-test" , "hidden": true, "cacheVariables": { "ASMJIT_TEST": "ON" } },
|
||||||
|
{ "name": "conf-static" , "hidden": true, "cacheVariables": { "ASMJIT_STATIC": "ON" } },
|
||||||
|
{ "name": "conf-shared" , "hidden": true, "cacheVariables": { "ASMJIT_STATIC": "OFF" } },
|
||||||
|
{ "name": "conf-asan" , "hidden": true, "cacheVariables": { "ASMJIT_SANITIZE": "address" } },
|
||||||
|
{ "name": "conf-msan" , "hidden": true, "cacheVariables": { "ASMJIT_SANITIZE": "memory" } },
|
||||||
|
{ "name": "conf-tsan" , "hidden": true, "cacheVariables": { "ASMJIT_SANITIZE": "thread" } },
|
||||||
|
{ "name": "conf-ubsan" , "hidden": true, "cacheVariables": { "ASMJIT_SANITIZE": "undefined" } },
|
||||||
|
{ "name": "conf-32" , "hidden": true, "environment": { "CFLAGS": "-m32", "CXXFLAGS": "-m32" } },
|
||||||
|
|
||||||
|
{ "name": "debug" , "inherits": ["conf-debug", "conf-test", "conf-static"] },
|
||||||
|
{ "name": "debug-asan" , "inherits": ["conf-debug", "conf-test", "conf-static", "conf-asan"] },
|
||||||
|
{ "name": "debug-msan" , "inherits": ["conf-debug", "conf-test", "conf-static", "conf-msan"] },
|
||||||
|
{ "name": "debug-ubsan" , "inherits": ["conf-debug", "conf-test", "conf-static", "conf-ubsan"] },
|
||||||
|
{ "name": "debug-32" , "inherits": ["conf-debug", "conf-test", "conf-static", "conf-32"] },
|
||||||
|
{ "name": "debug-shared" , "inherits": ["conf-debug", "conf-test", "conf-shared"] },
|
||||||
|
{ "name": "debug-shared-32" , "inherits": ["conf-debug", "conf-test", "conf-shared", "conf-32"] },
|
||||||
|
|
||||||
|
{ "name": "release" , "inherits": ["conf-release", "conf-test", "conf-static"] },
|
||||||
|
{ "name": "release-asan" , "inherits": ["conf-release", "conf-test", "conf-static", "conf-asan"] },
|
||||||
|
{ "name": "release-msan" , "inherits": ["conf-release", "conf-test", "conf-static", "conf-msan"] },
|
||||||
|
{ "name": "release-ubsan" , "inherits": ["conf-release", "conf-test", "conf-static", "conf-ubsan"] },
|
||||||
|
{ "name": "release-32" , "inherits": ["conf-release", "conf-test", "conf-static", "conf-32"] },
|
||||||
|
{ "name": "release-shared" , "inherits": ["conf-release", "conf-test", "conf-shared"] },
|
||||||
|
{ "name": "release-shared-32", "inherits": ["conf-release", "conf-test", "conf-shared", "conf-32"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
39
README.md
39
README.md
@@ -5,7 +5,7 @@ AsmJit is a library for low-latency machine code generation written in C++.
|
|||||||
|
|
||||||
* [Official Home Page (asmjit.com)](https://asmjit.com)
|
* [Official Home Page (asmjit.com)](https://asmjit.com)
|
||||||
* [Official Repository (asmjit/asmjit)](https://github.com/asmjit/asmjit)
|
* [Official Repository (asmjit/asmjit)](https://github.com/asmjit/asmjit)
|
||||||
* [Public Chat Channel](https://app.gitter.im/#/room/#asmjit:gitter.im)
|
* [Public Chat Channel](https://app.element.io/#/room/#asmjit:gitter.im)
|
||||||
* [Zlib License](./LICENSE.md)
|
* [Zlib License](./LICENSE.md)
|
||||||
|
|
||||||
See [asmjit.com](https://asmjit.com) page for more details, examples, and documentation.
|
See [asmjit.com](https://asmjit.com) page for more details, examples, and documentation.
|
||||||
@@ -13,19 +13,20 @@ See [asmjit.com](https://asmjit.com) page for more details, examples, and docume
|
|||||||
Project Organization
|
Project Organization
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
* **`/`** - Project root
|
* **`/`** - Project root - project files and scripts, `include` path points here
|
||||||
* **src** - Source code
|
* **asmjit** - AsmJit source code and headers
|
||||||
* **asmjit** - Source code and headers (always point include path in here)
|
* **core** - Core API, backend independent except relocations
|
||||||
* **core** - Core API, backend independent except relocations
|
* **support** - Support classes and functions
|
||||||
* **arm** - ARM specific API, designed to be common for both AArch32 and AArch64
|
* **arm** - ARM specific API, designed to be common for both AArch32 and AArch64
|
||||||
* **a64** - AArch64 specific API, used only by AArch64 backends
|
* **a64** - AArch64 specific API, used only by AArch64 backends
|
||||||
* **x86** - X86 specific API, used only by X86 and X64 backends
|
* **x86** - X86 specific API, used only by X86 and X64 backends
|
||||||
* **ujit** - Universal JIT API
|
* **ujit** - Universal JIT API
|
||||||
* **testing** - Unit tests, integration tests, and benchmarks (don't embed in your project)
|
* **asmjit-testing** - Unit tests, integration tests, and benchmarks (don't embed in your project)
|
||||||
* **commons** - Common utilities shared between tests and benchmarks
|
* **commons** - Common utilities shared between tests and benchmarks
|
||||||
* **bench** - Benchmarks
|
* **bench** - Benchmarks
|
||||||
* **tests** - Unit tests and integration tests
|
* **tests** - Unit tests and integration tests
|
||||||
* **tools** - Tools used to re-regenerate generated files (instruction DB, enum strings)
|
* **db** - Instruction database
|
||||||
|
* **tools** - Tools used to re-regenerate generated files (instruction DB, enum strings)
|
||||||
|
|
||||||
Roadmap
|
Roadmap
|
||||||
-------
|
-------
|
||||||
@@ -55,11 +56,11 @@ 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 [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:
|
* See asmjit tests, they always compile and provide implementation of many use-cases:
|
||||||
* [asmjit_test_emitters.cpp](./testing/tests/asmjit_test_emitters.cpp) - Tests that demonstrate the purpose of emitters
|
* [asmjit_test_emitters.cpp](./asmjit-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_assembler_x86.cpp](./asmjit-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_compiler_x86.cpp](./asmjit-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_instinfo.cpp](./asmjit-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
|
* [asmjit_test_x86_sections.cpp](./asmjit-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
|
* Visit our [Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im) if you need a quick help
|
||||||
|
|
||||||
Support
|
Support
|
||||||
|
|||||||
@@ -4,13 +4,14 @@
|
|||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
|
#include <asmjit-testing/commons/cmdline.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
|
||||||
#include "../commons/cmdline.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
static void print_app_info() noexcept {
|
static void print_app_info() noexcept {
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
#include "../commons/performancetimer.h"
|
#include <asmjit-testing/commons/performancetimer.h>
|
||||||
|
|
||||||
namespace asmjit_perf_utils {
|
namespace asmjit_perf_utils {
|
||||||
|
|
||||||
@@ -8,12 +8,12 @@
|
|||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
#include <asmjit/a64.h>
|
#include <asmjit/a64.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/bench/asmjit_bench_codegen.h>
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "asmjit_bench_codegen.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
// Generates a long sequence of GP instructions.
|
// Generates a long sequence of GP instructions.
|
||||||
@@ -8,13 +8,13 @@
|
|||||||
#if !defined(ASMJIT_NO_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/bench/asmjit_bench_codegen.h>
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_misc.h>
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "asmjit_bench_codegen.h"
|
|
||||||
#include "../tests/asmjit_test_misc.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
enum class InstForm {
|
enum class InstForm {
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
#include <stdint.h>
|
|
||||||
#include <asmjit/host.h>
|
#include <asmjit/host.h>
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
#include "../commons/cmdline.h"
|
#include <asmjit-testing/commons/cmdline.h>
|
||||||
#include "../commons/performancetimer.h"
|
#include <asmjit-testing/commons/performancetimer.h>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
@@ -13,6 +13,14 @@
|
|||||||
#include <asmjit/a64.h>
|
#include <asmjit/a64.h>
|
||||||
#endif // !ASMJIT_NO_AARCH64
|
#endif // !ASMJIT_NO_AARCH64
|
||||||
|
|
||||||
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
|
|
||||||
|
#if !defined(ASMJIT_NO_COMPILER)
|
||||||
|
#include <asmjit-testing/commons/cmdline.h>
|
||||||
|
#include <asmjit-testing/commons/performancetimer.h>
|
||||||
|
#include <asmjit-testing/commons/random.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -20,14 +28,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
|
||||||
|
|
||||||
#if !defined(ASMJIT_NO_COMPILER)
|
|
||||||
#include "../commons/cmdline.h"
|
|
||||||
#include "../commons/performancetimer.h"
|
|
||||||
#include "../commons/random.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
static void print_app_info() {
|
static void print_app_info() {
|
||||||
@@ -146,12 +146,6 @@ static void print_build_options() {
|
|||||||
constexpr bool no_foreign = false;
|
constexpr bool no_foreign = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ASMJIT_NO_DEPRECATED)
|
|
||||||
constexpr bool no_deprecated = true;
|
|
||||||
#else
|
|
||||||
constexpr bool no_deprecated = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ASMJIT_NO_ABI_NAMESPACE)
|
#if defined(ASMJIT_NO_ABI_NAMESPACE)
|
||||||
constexpr bool no_abi_namespace = true;
|
constexpr bool no_abi_namespace = true;
|
||||||
#else
|
#else
|
||||||
@@ -182,12 +176,6 @@ static void print_build_options() {
|
|||||||
constexpr bool no_logging = false;
|
constexpr bool no_logging = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ASMJIT_NO_VALIDATION)
|
|
||||||
constexpr bool no_validation = true;
|
|
||||||
#else
|
|
||||||
constexpr bool no_validation = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ASMJIT_NO_INTROSPECTION)
|
#if defined(ASMJIT_NO_INTROSPECTION)
|
||||||
constexpr bool no_introspection = true;
|
constexpr bool no_introspection = true;
|
||||||
#else
|
#else
|
||||||
@@ -214,8 +202,8 @@ static void print_build_options() {
|
|||||||
|
|
||||||
printf("Build Options:\n");
|
printf("Build Options:\n");
|
||||||
printf(" BUILD_TYPE : %s\n", asmjit_build_type());
|
printf(" BUILD_TYPE : %s\n", asmjit_build_type());
|
||||||
printf(" ASMJIT_NO_DEPRECATED : %s\n", stringify_build_definition(no_deprecated));
|
|
||||||
printf(" ASMJIT_NO_ABI_NAMESPACE: %s\n", stringify_build_definition(no_abi_namespace));
|
printf(" ASMJIT_NO_ABI_NAMESPACE: %s\n", stringify_build_definition(no_abi_namespace));
|
||||||
|
printf(" ASMJIT_NO_SHM_OPEN : %s\n", stringify_build_definition(no_shm_open));
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("Build Backends:\n");
|
printf("Build Backends:\n");
|
||||||
@@ -225,11 +213,9 @@ static void print_build_options() {
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("Build Features:\n");
|
printf("Build Features:\n");
|
||||||
printf(" ASMJIT_NO_SHM_OPEN : %s\n", stringify_build_definition(no_shm_open));
|
|
||||||
printf(" ASMJIT_NO_JIT : %s\n", stringify_build_definition(no_jit));
|
printf(" ASMJIT_NO_JIT : %s\n", stringify_build_definition(no_jit));
|
||||||
printf(" ASMJIT_NO_TEXT : %s\n", stringify_build_definition(no_text));
|
printf(" ASMJIT_NO_TEXT : %s\n", stringify_build_definition(no_text));
|
||||||
printf(" ASMJIT_NO_LOGGING : %s\n", stringify_build_definition(no_logging));
|
printf(" ASMJIT_NO_LOGGING : %s\n", stringify_build_definition(no_logging));
|
||||||
printf(" ASMJIT_NO_VALIDATION : %s\n", stringify_build_definition(no_validation));
|
|
||||||
printf(" ASMJIT_NO_INTROSPECTION: %s\n", stringify_build_definition(no_introspection));
|
printf(" ASMJIT_NO_INTROSPECTION: %s\n", stringify_build_definition(no_introspection));
|
||||||
printf(" ASMJIT_NO_BUILDER : %s\n", stringify_build_definition(no_builder));
|
printf(" ASMJIT_NO_BUILDER : %s\n", stringify_build_definition(no_builder));
|
||||||
printf(" ASMJIT_NO_COMPILER : %s\n", stringify_build_definition(no_compiler));
|
printf(" ASMJIT_NO_COMPILER : %s\n", stringify_build_definition(no_compiler));
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
#ifndef PERFORMANCETIMER_H_INCLUDED
|
#ifndef PERFORMANCETIMER_H_INCLUDED
|
||||||
#define PERFORMANCETIMER_H_INCLUDED
|
#define PERFORMANCETIMER_H_INCLUDED
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
class PerformanceTimer {
|
class PerformanceTimer {
|
||||||
@@ -4,15 +4,15 @@
|
|||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
|
#include <asmjit-testing/commons/cmdline.h>
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_assembler.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "asmjit_test_assembler.h"
|
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
|
||||||
#include "../commons/cmdline.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
#if !defined(ASMJIT_NO_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
#define ASMJIT_TEST_ASSEMBLER_H_INCLUDED
|
#define ASMJIT_TEST_ASSEMBLER_H_INCLUDED
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
struct TestSettings {
|
struct TestSettings {
|
||||||
@@ -7,12 +7,13 @@
|
|||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include <asmjit/a64.h>
|
#include <asmjit/a64.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_assembler.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "asmjit_test_assembler.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
#define TEST_INSTRUCTION(OPCODE, ...) \
|
#define TEST_INSTRUCTION(OPCODE, ...) \
|
||||||
@@ -7,12 +7,13 @@
|
|||||||
#if !defined(ASMJIT_NO_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_assembler.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "asmjit_test_assembler.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
#define TEST_INSTRUCTION(OPCODE, ...) \
|
#define TEST_INSTRUCTION(OPCODE, ...) \
|
||||||
@@ -7,12 +7,13 @@
|
|||||||
#if !defined(ASMJIT_NO_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_assembler.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "asmjit_test_assembler.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
#define TEST_INSTRUCTION(OPCODE, ...) \
|
#define TEST_INSTRUCTION(OPCODE, ...) \
|
||||||
@@ -15,11 +15,10 @@
|
|||||||
|
|
||||||
#if !defined(ASMJIT_NO_COMPILER)
|
#if !defined(ASMJIT_NO_COMPILER)
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
#include "../commons/cmdline.h"
|
#include <asmjit-testing/commons/cmdline.h>
|
||||||
#include "../commons/performancetimer.h"
|
#include <asmjit-testing/commons/performancetimer.h>
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_compiler.h>
|
||||||
#include "asmjit_test_compiler.h"
|
|
||||||
|
|
||||||
#if !defined(ASMJIT_NO_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
@@ -7,12 +7,13 @@
|
|||||||
#if !defined(ASMJIT_NO_COMPILER) && !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_COMPILER) && !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include <asmjit/a64.h>
|
#include <asmjit/a64.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_compiler.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "asmjit_test_compiler.h"
|
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
// a64::Compiler - A64TestCase
|
// a64::Compiler - A64TestCase
|
||||||
@@ -7,6 +7,10 @@
|
|||||||
#if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_COMPILER)
|
#if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_COMPILER)
|
||||||
|
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_misc.h>
|
||||||
|
#include <asmjit-testing/tests/asmjit_test_compiler.h>
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -17,9 +21,6 @@
|
|||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "asmjit_test_misc.h"
|
|
||||||
#include "asmjit_test_compiler.h"
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Interaction between '_setjmp' and C++ object destruction is non-portable.
|
// Interaction between '_setjmp' and C++ object destruction is non-portable.
|
||||||
#pragma warning(disable: 4611)
|
#pragma warning(disable: 4611)
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
#include "../commons/asmjitutils.h"
|
|
||||||
|
|
||||||
#if ASMJIT_ARCH_X86 != 0
|
#if ASMJIT_ARCH_X86 != 0
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
@@ -18,6 +17,8 @@
|
|||||||
#include <asmjit/a64.h>
|
#include <asmjit/a64.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
static void print_app_info() noexcept {
|
static void print_app_info() noexcept {
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
#include <asmjit/a64.h>
|
#include <asmjit/a64.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
#include <asmjit/a64.h>
|
#include <asmjit/a64.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "broken.h"
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
#include "../commons/asmjitutils.h"
|
#include <asmjit-testing/tests/broken.h>
|
||||||
|
|
||||||
#if !defined(ASMJIT_NO_COMPILER)
|
#if !defined(ASMJIT_NO_COMPILER)
|
||||||
#include <asmjit/core/racfgblock_p.h>
|
#include <asmjit/core/racfgblock_p.h>
|
||||||
@@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
#include <asmjit/ujit.h>
|
#include <asmjit/ujit.h>
|
||||||
|
|
||||||
|
#include <asmjit-testing/commons/asmjitutils.h>
|
||||||
|
#include <asmjit-testing/commons/random.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include "../commons/asmjitutils.h"
|
|
||||||
#include "../commons/random.h"
|
|
||||||
|
|
||||||
static void print_app_info() noexcept {
|
static void print_app_info() noexcept {
|
||||||
printf("AsmJit UniCompiler Test Suite v%u.%u.%u [Arch=%s] [Mode=%s]\n\n",
|
printf("AsmJit UniCompiler Test Suite v%u.%u.%u [Arch=%s] [Mode=%s]\n\n",
|
||||||
unsigned((ASMJIT_LIBRARY_VERSION >> 16) ),
|
unsigned((ASMJIT_LIBRARY_VERSION >> 16) ),
|
||||||
@@ -24,7 +24,7 @@ static void print_app_info() noexcept {
|
|||||||
|
|
||||||
#if !defined(ASMJIT_NO_UJIT) && !defined(ASMJIT_NO_JIT)
|
#if !defined(ASMJIT_NO_UJIT) && !defined(ASMJIT_NO_JIT)
|
||||||
|
|
||||||
#include "broken.h"
|
#include <asmjit-testing/tests/broken.h>
|
||||||
|
|
||||||
namespace UniCompilerTests {
|
namespace UniCompilerTests {
|
||||||
|
|
||||||
@@ -39,17 +39,17 @@
|
|||||||
//! - \ref arm::Shift - Shift operation and value.
|
//! - \ref arm::Shift - Shift operation and value.
|
||||||
//! - \ref arm::Utils - Utilities that can help during code generation for AArch32 and AArch64.
|
//! - \ref arm::Utils - Utilities that can help during code generation for AArch32 and AArch64.
|
||||||
|
|
||||||
#include "./arm.h"
|
#include <asmjit/arm.h>
|
||||||
|
|
||||||
#include "asmjit-scope-begin.h"
|
#include <asmjit/asmjit-scope-begin.h>
|
||||||
#include "arm/a64assembler.h"
|
#include <asmjit/arm/a64assembler.h>
|
||||||
#include "arm/a64builder.h"
|
#include <asmjit/arm/a64builder.h>
|
||||||
#include "arm/a64compiler.h"
|
#include <asmjit/arm/a64compiler.h>
|
||||||
#include "arm/a64emitter.h"
|
#include <asmjit/arm/a64emitter.h>
|
||||||
#include "arm/a64globals.h"
|
#include <asmjit/arm/a64globals.h>
|
||||||
#include "arm/a64instdb.h"
|
#include <asmjit/arm/a64instdb.h>
|
||||||
#include "arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
#include "asmjit-scope-end.h"
|
#include <asmjit/asmjit-scope-end.h>
|
||||||
|
|
||||||
#endif // ASMJIT_A64_H_INCLUDED
|
#endif // ASMJIT_A64_H_INCLUDED
|
||||||
|
|
||||||
@@ -47,11 +47,11 @@
|
|||||||
//! - \ref arm::Shift - Shift operation and value (both AArch32 and AArch64).
|
//! - \ref arm::Shift - Shift operation and value (both AArch32 and AArch64).
|
||||||
//! - \ref arm::Utils - Utilities that can help during code generation for AArch32 and AArch64.
|
//! - \ref arm::Utils - Utilities that can help during code generation for AArch32 and AArch64.
|
||||||
|
|
||||||
#include "core.h"
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
#include "asmjit-scope-begin.h"
|
#include <asmjit/asmjit-scope-begin.h>
|
||||||
#include "arm/armglobals.h"
|
#include <asmjit/arm/armglobals.h>
|
||||||
#include "arm/armutils.h"
|
#include <asmjit/arm/armutils.h>
|
||||||
#include "asmjit-scope-end.h"
|
#include <asmjit/asmjit-scope-end.h>
|
||||||
|
|
||||||
#endif // ASMJIT_ARM_H_INCLUDED
|
#endif // ASMJIT_ARM_H_INCLUDED
|
||||||
@@ -6,11 +6,11 @@
|
|||||||
#ifndef ASMJIT_ARM_A64ARCHTRAITS_P_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64ARCHTRAITS_P_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64ARCHTRAITS_P_H_INCLUDED
|
#define ASMJIT_ARM_A64ARCHTRAITS_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/archtraits.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
#include "../core/misc_p.h"
|
#include <asmjit/core/misc_p.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../arm/a64globals.h"
|
#include <asmjit/arm/a64globals.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -3,22 +3,21 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include "../core/codewriter_p.h"
|
#include <asmjit/core/codewriter_p.h>
|
||||||
#include "../core/cpuinfo.h"
|
#include <asmjit/core/cpuinfo.h>
|
||||||
#include "../core/emitterutils_p.h"
|
#include <asmjit/core/emitterutils_p.h>
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/logger.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "../core/misc_p.h"
|
#include <asmjit/core/misc_p.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
#include <asmjit/arm/armformatter_p.h>
|
||||||
#include "../arm/armformatter_p.h"
|
#include <asmjit/arm/armutils.h>
|
||||||
#include "../arm/armutils.h"
|
#include <asmjit/arm/a64assembler.h>
|
||||||
#include "../arm/a64assembler.h"
|
#include <asmjit/arm/a64emithelper_p.h>
|
||||||
#include "../arm/a64emithelper_p.h"
|
#include <asmjit/arm/a64instdb_p.h>
|
||||||
#include "../arm/a64instdb_p.h"
|
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -835,7 +834,7 @@ Error Assembler::_emit(InstId inst_id, const Operand_& o0, const Operand_& o1, c
|
|||||||
goto Failed;
|
goto Failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_VALIDATION
|
#ifndef ASMJIT_NO_INTROSPECTION
|
||||||
// Strict validation.
|
// Strict validation.
|
||||||
if (has_diagnostic_option(DiagnosticOptions::kValidateAssembler)) {
|
if (has_diagnostic_option(DiagnosticOptions::kValidateAssembler)) {
|
||||||
Operand_ op_array[Globals::kMaxOpCount];
|
Operand_ op_array[Globals::kMaxOpCount];
|
||||||
@@ -5168,7 +5167,7 @@ EmitOp_DispImm:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int64_t disp_imm64 = int64_t(offset_value) >> offset_format.imm_discard_lsb();
|
int64_t disp_imm64 = int64_t(offset_value) >> offset_format.imm_discard_lsb();
|
||||||
if (!Support::is_encodable_offset_64(disp_imm64, offset_format.imm_bit_count())) {
|
if (!EmitterUtils::is_encodable_offset_64(disp_imm64, offset_format.imm_bit_count())) {
|
||||||
goto InvalidDisplacement;
|
goto InvalidDisplacement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
#ifndef ASMJIT_ARM_A64ASSEMBLER_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64ASSEMBLER_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64ASSEMBLER_H_INCLUDED
|
#define ASMJIT_ARM_A64ASSEMBLER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../arm/a64emitter.h"
|
#include <asmjit/arm/a64emitter.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -3,12 +3,12 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_BUILDER)
|
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_BUILDER)
|
||||||
|
|
||||||
#include "../arm/a64assembler.h"
|
#include <asmjit/arm/a64assembler.h>
|
||||||
#include "../arm/a64builder.h"
|
#include <asmjit/arm/a64builder.h>
|
||||||
#include "../arm/a64emithelper_p.h"
|
#include <asmjit/arm/a64emithelper_p.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,11 +6,11 @@
|
|||||||
#ifndef ASMJIT_ARM_A64BUILDER_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64BUILDER_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64BUILDER_H_INCLUDED
|
#define ASMJIT_ARM_A64BUILDER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_BUILDER
|
#ifndef ASMJIT_NO_BUILDER
|
||||||
|
|
||||||
#include "../core/builder.h"
|
#include <asmjit/core/builder.h>
|
||||||
#include "../arm/a64emitter.h"
|
#include <asmjit/arm/a64emitter.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_COMPILER)
|
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_COMPILER)
|
||||||
|
|
||||||
#include "../arm/a64assembler.h"
|
#include <asmjit/arm/a64assembler.h>
|
||||||
#include "../arm/a64compiler.h"
|
#include <asmjit/arm/a64compiler.h>
|
||||||
#include "../arm/a64emithelper_p.h"
|
#include <asmjit/arm/a64emithelper_p.h>
|
||||||
#include "../arm/a64rapass_p.h"
|
#include <asmjit/arm/a64rapass_p.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,12 +6,12 @@
|
|||||||
#ifndef ASMJIT_ARM_A64COMPILER_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64COMPILER_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64COMPILER_H_INCLUDED
|
#define ASMJIT_ARM_A64COMPILER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#ifndef ASMJIT_NO_COMPILER
|
||||||
|
|
||||||
#include "../core/compiler.h"
|
#include <asmjit/core/compiler.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../arm/a64emitter.h"
|
#include <asmjit/arm/a64emitter.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -3,18 +3,18 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/funcargscontext_p.h"
|
#include <asmjit/core/funcargscontext_p.h>
|
||||||
#include "../core/string.h"
|
#include <asmjit/core/string.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/support/support.h>
|
||||||
#include "../arm/a64emithelper_p.h"
|
#include <asmjit/arm/a64emithelper_p.h>
|
||||||
#include "../arm/a64formatter_p.h"
|
#include <asmjit/arm/a64formatter_p.h>
|
||||||
#include "../arm/a64instapi_p.h"
|
#include <asmjit/arm/a64instapi_p.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -471,7 +471,7 @@ void init_emitter_funcs(BaseEmitter* emitter) {
|
|||||||
emitter->_funcs.format_instruction = FormatterInternal::format_instruction;
|
emitter->_funcs.format_instruction = FormatterInternal::format_instruction;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_VALIDATION
|
#ifndef ASMJIT_NO_INTROSPECTION
|
||||||
emitter->_funcs.validate = InstInternal::validate;
|
emitter->_funcs.validate = InstInternal::validate;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -6,12 +6,12 @@
|
|||||||
#ifndef ASMJIT_ARM_A64EMITHELPER_P_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64EMITHELPER_P_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64EMITHELPER_P_H_INCLUDED
|
#define ASMJIT_ARM_A64EMITHELPER_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
|
|
||||||
#include "../core/emithelper_p.h"
|
#include <asmjit/core/emithelper_p.h>
|
||||||
#include "../core/func.h"
|
#include <asmjit/core/func.h>
|
||||||
#include "../arm/a64emitter.h"
|
#include <asmjit/arm/a64emitter.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
#ifndef ASMJIT_ARM_A64EMITTER_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64EMITTER_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64EMITTER_H_INCLUDED
|
#define ASMJIT_ARM_A64EMITTER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/emitter.h"
|
#include <asmjit/core/emitter.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
#include "../arm/a64instdb.h"
|
#include <asmjit/arm/a64instdb.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
// MSVC targeting AArch64 defines a lot of macros without underscores clashing
|
// MSVC targeting AArch64 defines a lot of macros without underscores clashing
|
||||||
// with AArch64 instruction names. We have to workaround until it's fixed in SDK.
|
// with AArch64 instruction names. We have to workaround until it's fixed in SDK.
|
||||||
@@ -3,18 +3,18 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_LOGGING)
|
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_LOGGING)
|
||||||
|
|
||||||
#include "../core/misc_p.h"
|
#include <asmjit/core/misc_p.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
#include "../arm/a64formatter_p.h"
|
#include <asmjit/arm/a64formatter_p.h>
|
||||||
#include "../arm/a64instapi_p.h"
|
#include <asmjit/arm/a64instapi_p.h>
|
||||||
#include "../arm/a64instdb_p.h"
|
#include <asmjit/arm/a64instdb_p.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#ifndef ASMJIT_NO_COMPILER
|
||||||
#include "../core/compiler.h"
|
#include <asmjit/core/compiler.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
@@ -6,14 +6,14 @@
|
|||||||
#ifndef ASMJIT_ARM_A64FORMATTER_P_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64FORMATTER_P_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64FORMATTER_P_H_INCLUDED
|
#define ASMJIT_ARM_A64FORMATTER_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_LOGGING
|
#ifndef ASMJIT_NO_LOGGING
|
||||||
|
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/span.h"
|
#include <asmjit/core/string.h>
|
||||||
#include "../core/string.h"
|
#include <asmjit/support/span.h>
|
||||||
#include "../arm/armformatter_p.h"
|
#include <asmjit/arm/armformatter_p.h>
|
||||||
#include "../arm/a64globals.h"
|
#include <asmjit/arm/a64globals.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include "../arm/a64func_p.h"
|
#include <asmjit/arm/a64func_p.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#ifndef ASMJIT_ARM_A64FUNC_P_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64FUNC_P_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64FUNC_P_H_INCLUDED
|
#define ASMJIT_ARM_A64FUNC_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/func.h"
|
#include <asmjit/core/func.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#ifndef ASMJIT_ARM_A64GLOBALS_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64GLOBALS_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64GLOBALS_H_INCLUDED
|
#define ASMJIT_ARM_A64GLOBALS_H_INCLUDED
|
||||||
|
|
||||||
#include "../arm/armglobals.h"
|
#include <asmjit/arm/armglobals.h>
|
||||||
|
|
||||||
//! \namespace asmjit::a64
|
//! \namespace asmjit::a64
|
||||||
//! \ingroup asmjit_a64
|
//! \ingroup asmjit_a64
|
||||||
@@ -3,15 +3,15 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include "../core/cpuinfo.h"
|
#include <asmjit/core/cpuinfo.h>
|
||||||
#include "../core/misc_p.h"
|
#include <asmjit/core/misc_p.h>
|
||||||
#include "../core/support_p.h"
|
#include <asmjit/support/support_p.h>
|
||||||
#include "../arm/a64instapi_p.h"
|
#include <asmjit/arm/a64instapi_p.h>
|
||||||
#include "../arm/a64instdb_p.h"
|
#include <asmjit/arm/a64instdb_p.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -50,13 +50,13 @@ InstId string_to_inst_id(const char* s, size_t len) noexcept {
|
|||||||
// a64::InstInternal - Validate
|
// a64::InstInternal - Validate
|
||||||
// ============================
|
// ============================
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_VALIDATION
|
#ifndef ASMJIT_NO_INTROSPECTION
|
||||||
ASMJIT_FAVOR_SIZE Error validate(const BaseInst& inst, const Operand_* operands, size_t op_count, ValidationFlags validation_flags) noexcept {
|
ASMJIT_FAVOR_SIZE Error validate(const BaseInst& inst, const Operand_* operands, size_t op_count, ValidationFlags validation_flags) noexcept {
|
||||||
// TODO:
|
// TODO:
|
||||||
Support::maybe_unused(inst, operands, op_count, validation_flags);
|
Support::maybe_unused(inst, operands, op_count, validation_flags);
|
||||||
return Error::kOk;
|
return Error::kOk;
|
||||||
}
|
}
|
||||||
#endif // !ASMJIT_NO_VALIDATION
|
#endif // !ASMJIT_NO_INTROSPECTION
|
||||||
|
|
||||||
// a64::InstInternal - QueryRWInfo
|
// a64::InstInternal - QueryRWInfo
|
||||||
// ===============================
|
// ===============================
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
#ifndef ASMJIT_ARM_A64INSTAPI_P_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64INSTAPI_P_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64INSTAPI_P_H_INCLUDED
|
#define ASMJIT_ARM_A64INSTAPI_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/inst.h"
|
#include <asmjit/core/inst.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -22,11 +22,8 @@ Error ASMJIT_CDECL inst_id_to_string(InstId inst_id, InstStringifyOptions option
|
|||||||
InstId ASMJIT_CDECL string_to_inst_id(const char* s, size_t len) noexcept;
|
InstId ASMJIT_CDECL string_to_inst_id(const char* s, size_t len) noexcept;
|
||||||
#endif // !ASMJIT_NO_TEXT
|
#endif // !ASMJIT_NO_TEXT
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_VALIDATION
|
|
||||||
Error ASMJIT_CDECL validate(const BaseInst& inst, const Operand_* operands, size_t op_count, ValidationFlags validation_flags) noexcept;
|
|
||||||
#endif // !ASMJIT_NO_VALIDATION
|
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_INTROSPECTION
|
#ifndef ASMJIT_NO_INTROSPECTION
|
||||||
|
Error ASMJIT_CDECL validate(const BaseInst& inst, const Operand_* operands, size_t op_count, ValidationFlags validation_flags) noexcept;
|
||||||
Error ASMJIT_CDECL query_rw_info(const BaseInst& inst, const Operand_* operands, size_t op_count, InstRWInfo* out) noexcept;
|
Error ASMJIT_CDECL query_rw_info(const BaseInst& inst, const Operand_* operands, size_t op_count, InstRWInfo* out) noexcept;
|
||||||
Error ASMJIT_CDECL query_features(const BaseInst& inst, const Operand_* operands, size_t op_count, CpuFeatures* out) noexcept;
|
Error ASMJIT_CDECL query_features(const BaseInst& inst, const Operand_* operands, size_t op_count, CpuFeatures* out) noexcept;
|
||||||
#endif // !ASMJIT_NO_INTROSPECTION
|
#endif // !ASMJIT_NO_INTROSPECTION
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include "../core/codeholder.h"
|
#include <asmjit/core/codeholder.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
#include "../arm/a64instdb_p.h"
|
#include <asmjit/arm/a64instdb_p.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#ifndef ASMJIT_ARM_A64INSTDB_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64INSTDB_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64INSTDB_H_INCLUDED
|
#define ASMJIT_ARM_A64INSTDB_H_INCLUDED
|
||||||
|
|
||||||
#include "../arm/a64globals.h"
|
#include <asmjit/arm/a64globals.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
#ifndef ASMJIT_ARM_A64INSTDB_H_P_INCLUDED
|
#ifndef ASMJIT_ARM_A64INSTDB_H_P_INCLUDED
|
||||||
#define ASMJIT_ARM_A64INSTDB_H_P_INCLUDED
|
#define ASMJIT_ARM_A64INSTDB_H_P_INCLUDED
|
||||||
|
|
||||||
#include "../core/codeholder.h"
|
#include <asmjit/core/codeholder.h>
|
||||||
#include "../core/instdb_p.h"
|
#include <asmjit/core/instdb_p.h>
|
||||||
#include "../arm/a64instdb.h"
|
#include <asmjit/arm/a64instdb.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
|
|
||||||
#include "../core/misc_p.h"
|
#include <asmjit/core/misc_p.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
#ifndef ASMJIT_ARM_A64OPERAND_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64OPERAND_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64OPERAND_H_INCLUDED
|
#define ASMJIT_ARM_A64OPERAND_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../arm/armglobals.h"
|
#include <asmjit/arm/armglobals.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -651,24 +651,6 @@ public:
|
|||||||
//! \}
|
//! \}
|
||||||
};
|
};
|
||||||
|
|
||||||
//! \name Shift Operation Construction
|
|
||||||
//! \{
|
|
||||||
|
|
||||||
//! Constructs a `LSL #value` shift (logical shift left).
|
|
||||||
static ASMJIT_INLINE_CONSTEXPR Shift lsl(uint32_t value) noexcept { return Shift(ShiftOp::kLSL, value); }
|
|
||||||
//! Constructs a `LSR #value` shift (logical shift right).
|
|
||||||
static ASMJIT_INLINE_CONSTEXPR Shift lsr(uint32_t value) noexcept { return Shift(ShiftOp::kLSR, value); }
|
|
||||||
//! Constructs a `ASR #value` shift (arithmetic shift right).
|
|
||||||
static ASMJIT_INLINE_CONSTEXPR Shift asr(uint32_t value) noexcept { return Shift(ShiftOp::kASR, value); }
|
|
||||||
//! Constructs a `ROR #value` shift (rotate right).
|
|
||||||
static ASMJIT_INLINE_CONSTEXPR Shift ror(uint32_t value) noexcept { return Shift(ShiftOp::kROR, value); }
|
|
||||||
//! Constructs a `RRX` shift (rotate with carry by 1).
|
|
||||||
static ASMJIT_INLINE_CONSTEXPR Shift rrx() noexcept { return Shift(ShiftOp::kRRX, 0); }
|
|
||||||
//! Constructs a `MSL #value` shift (logical shift left filling ones).
|
|
||||||
static ASMJIT_INLINE_CONSTEXPR Shift msl(uint32_t value) noexcept { return Shift(ShiftOp::kMSL, value); }
|
|
||||||
|
|
||||||
//! \}
|
|
||||||
|
|
||||||
#ifndef _DOXYGEN
|
#ifndef _DOXYGEN
|
||||||
namespace regs {
|
namespace regs {
|
||||||
#endif
|
#endif
|
||||||
@@ -705,11 +687,11 @@ static ASMJIT_INLINE_CONSTEXPR Vec s(uint32_t id) noexcept { return Vec::make_v3
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static ASMJIT_INLINE_CONSTEXPR Vec d(uint32_t id) noexcept { return Vec::make_v64(id); }
|
static ASMJIT_INLINE_CONSTEXPR Vec d(uint32_t id) noexcept { return Vec::make_v64(id); }
|
||||||
|
|
||||||
//! Creates a 1282-bit V register operand.
|
//! Creates a 128-bit Q register operand.
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static ASMJIT_INLINE_CONSTEXPR Vec q(uint32_t id) noexcept { return Vec::make_v128(id); }
|
static ASMJIT_INLINE_CONSTEXPR Vec q(uint32_t id) noexcept { return Vec::make_v128(id); }
|
||||||
|
|
||||||
//! Creates a 1282-bit V register operand.
|
//! Creates a 128-bit V register operand.
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static ASMJIT_INLINE_CONSTEXPR Vec v(uint32_t id) noexcept { return Vec::make_v128(id); }
|
static ASMJIT_INLINE_CONSTEXPR Vec v(uint32_t id) noexcept { return Vec::make_v128(id); }
|
||||||
|
|
||||||
@@ -989,6 +971,30 @@ using namespace regs;
|
|||||||
//! \name Shift Operation Construction
|
//! \name Shift Operation Construction
|
||||||
//! \{
|
//! \{
|
||||||
|
|
||||||
|
//! Constructs a `LSL #value` shift (logical shift left).
|
||||||
|
[[nodiscard]]
|
||||||
|
static ASMJIT_INLINE_CONSTEXPR Shift lsl(uint32_t value) noexcept { return Shift(ShiftOp::kLSL, value); }
|
||||||
|
|
||||||
|
//! Constructs a `LSR #value` shift (logical shift right).
|
||||||
|
[[nodiscard]]
|
||||||
|
static ASMJIT_INLINE_CONSTEXPR Shift lsr(uint32_t value) noexcept { return Shift(ShiftOp::kLSR, value); }
|
||||||
|
|
||||||
|
//! Constructs a `ASR #value` shift (arithmetic shift right).
|
||||||
|
[[nodiscard]]
|
||||||
|
static ASMJIT_INLINE_CONSTEXPR Shift asr(uint32_t value) noexcept { return Shift(ShiftOp::kASR, value); }
|
||||||
|
|
||||||
|
//! Constructs a `ROR #value` shift (rotate right).
|
||||||
|
[[nodiscard]]
|
||||||
|
static ASMJIT_INLINE_CONSTEXPR Shift ror(uint32_t value) noexcept { return Shift(ShiftOp::kROR, value); }
|
||||||
|
|
||||||
|
//! Constructs a `RRX` shift (rotate with carry by 1).
|
||||||
|
[[nodiscard]]
|
||||||
|
static ASMJIT_INLINE_CONSTEXPR Shift rrx() noexcept { return Shift(ShiftOp::kRRX, 0); }
|
||||||
|
|
||||||
|
//! Constructs a `MSL #value` shift (logical shift left filling ones).
|
||||||
|
[[nodiscard]]
|
||||||
|
static ASMJIT_INLINE_CONSTEXPR Shift msl(uint32_t value) noexcept { return Shift(ShiftOp::kMSL, value); }
|
||||||
|
|
||||||
//! Constructs a `UXTB #value` extend and shift (unsigned byte extend) (AArch64).
|
//! Constructs a `UXTB #value` extend and shift (unsigned byte extend) (AArch64).
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static ASMJIT_INLINE_CONSTEXPR Shift uxtb(uint32_t value) noexcept { return Shift(ShiftOp::kUXTB, value); }
|
static ASMJIT_INLINE_CONSTEXPR Shift uxtb(uint32_t value) noexcept { return Shift(ShiftOp::kUXTB, value); }
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_COMPILER)
|
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_COMPILER)
|
||||||
|
|
||||||
#include "../core/cpuinfo.h"
|
#include <asmjit/core/cpuinfo.h>
|
||||||
#include "../core/formatter_p.h"
|
#include <asmjit/core/formatter_p.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/support/support.h>
|
||||||
#include "../arm/a64assembler.h"
|
#include <asmjit/arm/a64assembler.h>
|
||||||
#include "../arm/a64compiler.h"
|
#include <asmjit/arm/a64compiler.h>
|
||||||
#include "../arm/a64emithelper_p.h"
|
#include <asmjit/arm/a64emithelper_p.h>
|
||||||
#include "../arm/a64instapi_p.h"
|
#include <asmjit/arm/a64instapi_p.h>
|
||||||
#include "../arm/a64instdb_p.h"
|
#include <asmjit/arm/a64instdb_p.h>
|
||||||
#include "../arm/a64rapass_p.h"
|
#include <asmjit/arm/a64rapass_p.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -512,10 +512,10 @@ Error RACFGBuilder::on_invoke(InvokeNode* invoke_node, RAInstBuilder& ib) noexce
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Setup clobbered registers.
|
// Setup clobbered registers.
|
||||||
ib._clobbered[0] = Support::lsb_mask<RegMask>(_pass._phys_reg_count[RegGroup(0)]) & ~fd.preserved_regs(RegGroup(0));
|
ib._clobbered[0] = Support::lsb_mask<RegMask>(_pass._phys_reg_count.get(RegGroup(0))) & ~fd.preserved_regs(RegGroup(0));
|
||||||
ib._clobbered[1] = Support::lsb_mask<RegMask>(_pass._phys_reg_count[RegGroup(1)]) & ~fd.preserved_regs(RegGroup(1));
|
ib._clobbered[1] = Support::lsb_mask<RegMask>(_pass._phys_reg_count.get(RegGroup(1))) & ~fd.preserved_regs(RegGroup(1));
|
||||||
ib._clobbered[2] = Support::lsb_mask<RegMask>(_pass._phys_reg_count[RegGroup(2)]) & ~fd.preserved_regs(RegGroup(2));
|
ib._clobbered[2] = Support::lsb_mask<RegMask>(_pass._phys_reg_count.get(RegGroup(2))) & ~fd.preserved_regs(RegGroup(2));
|
||||||
ib._clobbered[3] = Support::lsb_mask<RegMask>(_pass._phys_reg_count[RegGroup(3)]) & ~fd.preserved_regs(RegGroup(3));
|
ib._clobbered[3] = Support::lsb_mask<RegMask>(_pass._phys_reg_count.get(RegGroup(3))) & ~fd.preserved_regs(RegGroup(3));
|
||||||
|
|
||||||
return Error::kOk;
|
return Error::kOk;
|
||||||
}
|
}
|
||||||
@@ -6,16 +6,16 @@
|
|||||||
#ifndef ASMJIT_ARM_A64RAPASS_P_H_INCLUDED
|
#ifndef ASMJIT_ARM_A64RAPASS_P_H_INCLUDED
|
||||||
#define ASMJIT_ARM_A64RAPASS_P_H_INCLUDED
|
#define ASMJIT_ARM_A64RAPASS_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#ifndef ASMJIT_NO_COMPILER
|
||||||
|
|
||||||
#include "../core/compiler.h"
|
#include <asmjit/core/compiler.h>
|
||||||
#include "../core/racfgblock_p.h"
|
#include <asmjit/core/racfgblock_p.h>
|
||||||
#include "../core/racfgbuilder_p.h"
|
#include <asmjit/core/racfgbuilder_p.h>
|
||||||
#include "../core/rapass_p.h"
|
#include <asmjit/core/rapass_p.h>
|
||||||
#include "../arm/a64assembler.h"
|
#include <asmjit/arm/a64assembler.h>
|
||||||
#include "../arm/a64compiler.h"
|
#include <asmjit/arm/a64compiler.h>
|
||||||
#include "../arm/a64emithelper_p.h"
|
#include <asmjit/arm/a64emithelper_p.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
ASMJIT_BEGIN_SUB_NAMESPACE(a64)
|
||||||
|
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#ifndef ASMJIT_NO_LOGGING
|
#ifndef ASMJIT_NO_LOGGING
|
||||||
|
|
||||||
#include "../core/formatter_p.h"
|
#include <asmjit/core/formatter_p.h>
|
||||||
#include "../core/misc_p.h"
|
#include <asmjit/core/misc_p.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
#include "../arm/armformatter_p.h"
|
#include <asmjit/arm/armformatter_p.h>
|
||||||
#include "../arm/a64operand.h"
|
#include <asmjit/arm/a64operand.h>
|
||||||
#include "../arm/a64instapi_p.h"
|
#include <asmjit/arm/a64instapi_p.h>
|
||||||
#include "../arm/a64instdb_p.h"
|
#include <asmjit/arm/a64instdb_p.h>
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#ifndef ASMJIT_NO_COMPILER
|
||||||
#include "../core/compiler.h"
|
#include <asmjit/core/compiler.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
||||||
@@ -6,12 +6,12 @@
|
|||||||
#ifndef ASMJIT_ARM_ARMFORMATTER_P_H_INCLUDED
|
#ifndef ASMJIT_ARM_ARMFORMATTER_P_H_INCLUDED
|
||||||
#define ASMJIT_ARM_ARMFORMATTER_P_H_INCLUDED
|
#define ASMJIT_ARM_ARMFORMATTER_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_LOGGING
|
#ifndef ASMJIT_NO_LOGGING
|
||||||
|
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/string.h"
|
#include <asmjit/core/string.h>
|
||||||
#include "../arm/armglobals.h"
|
#include <asmjit/arm/armglobals.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
#ifndef ASMJIT_ARM_ARMGLOBALS_H_INCLUDED
|
#ifndef ASMJIT_ARM_ARMGLOBALS_H_INCLUDED
|
||||||
#define ASMJIT_ARM_ARMGLOBALS_H_INCLUDED
|
#define ASMJIT_ARM_ARMGLOBALS_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/archcommons.h"
|
#include <asmjit/core/archcommons.h>
|
||||||
#include "../core/inst.h"
|
#include <asmjit/core/inst.h>
|
||||||
|
|
||||||
//! \namespace asmjit::arm
|
//! \namespace asmjit::arm
|
||||||
//! \ingroup asmjit_arm
|
//! \ingroup asmjit_arm
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
#ifndef ASMJIT_ARM_ARMUTILS_H_INCLUDED
|
#ifndef ASMJIT_ARM_ARMUTILS_H_INCLUDED
|
||||||
#define ASMJIT_ARM_ARMUTILS_H_INCLUDED
|
#define ASMJIT_ARM_ARMUTILS_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
#include "../arm/armglobals.h"
|
#include <asmjit/arm/armglobals.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
||||||
|
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
#pragma message("asmjit/asmjit.h is deprecated! Please use asmjit/[core|x86|a64|host].h instead.")
|
#pragma message("asmjit/asmjit.h is deprecated! Please use asmjit/[core|x86|a64|host].h instead.")
|
||||||
|
|
||||||
#include "./core.h"
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_X86
|
#ifndef ASMJIT_NO_X86
|
||||||
#include "./x86.h"
|
#include <asmjit/x86.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // ASMJIT_ASMJIT_H_INCLUDED
|
#endif // ASMJIT_ASMJIT_H_INCLUDED
|
||||||
@@ -225,10 +225,6 @@ namespace asmjit {
|
|||||||
//!
|
//!
|
||||||
//! \section build_options Build Options
|
//! \section build_options Build Options
|
||||||
//!
|
//!
|
||||||
//! - \ref ASMJIT_NO_DEPRECATED - Disables deprecated API at compile time so it won't be available and the
|
|
||||||
//! compilation will fail if there is attempt to use such API. This includes deprecated classes, namespaces,
|
|
||||||
//! enumerations, and functions.
|
|
||||||
//!
|
|
||||||
//! - \ref ASMJIT_NO_SHM_OPEN - Disables functionality that uses `shm_open()`.
|
//! - \ref ASMJIT_NO_SHM_OPEN - Disables functionality that uses `shm_open()`.
|
||||||
//!
|
//!
|
||||||
//! - \ref ASMJIT_NO_ABI_NAMESPACE - Disables inline ABI namespace within `asmjit` namespace. This is only provided
|
//! - \ref ASMJIT_NO_ABI_NAMESPACE - Disables inline ABI namespace within `asmjit` namespace. This is only provided
|
||||||
@@ -238,8 +234,8 @@ namespace asmjit {
|
|||||||
//!
|
//!
|
||||||
//! \section build_features Build Features
|
//! \section build_features Build Features
|
||||||
//!
|
//!
|
||||||
//! AsmJit builds by default all supported features, which includes all emitters, logging, instruction validation and
|
//! AsmJit builds by default all supported features, which includes all emitters, logging, instruction validation
|
||||||
//! introspection, and JIT memory allocation. Features can be disabled at compile time by using `ASMJIT_NO_...`
|
//! and introspection, and JIT memory allocation. Features can be disabled at compile time by using `ASMJIT_NO_...`
|
||||||
//! definitions.
|
//! definitions.
|
||||||
//! - \ref ASMJIT_NO_JIT - Disables JIT memory management and \ref JitRuntime.
|
//! - \ref ASMJIT_NO_JIT - Disables JIT memory management and \ref JitRuntime.
|
||||||
//!
|
//!
|
||||||
@@ -249,11 +245,9 @@ namespace asmjit {
|
|||||||
//!
|
//!
|
||||||
//! - \ref ASMJIT_NO_LOGGING - Disables \ref Logger and \ref Formatter.
|
//! - \ref ASMJIT_NO_LOGGING - Disables \ref Logger and \ref Formatter.
|
||||||
//!
|
//!
|
||||||
//! - \ref ASMJIT_NO_VALIDATION - Disables validation API.
|
//! - \ref ASMJIT_NO_INTROSPECTION - Disables instruction introspection and validation API, must be used together
|
||||||
//!
|
//! with \ref ASMJIT_NO_COMPILER as \ref asmjit_compiler requires introspection for its liveness analysis and
|
||||||
//! - \ref ASMJIT_NO_INTROSPECTION - Disables instruction introspection API, must be used together with \ref
|
//! register allocation.
|
||||||
//! ASMJIT_NO_COMPILER as \ref asmjit_compiler requires introspection for its liveness analysis and register
|
|
||||||
//! allocation.
|
|
||||||
//!
|
//!
|
||||||
//! - \ref ASMJIT_NO_BUILDER - Disables \ref asmjit_builder functionality completely. This implies \ref
|
//! - \ref ASMJIT_NO_BUILDER - Disables \ref asmjit_builder functionality completely. This implies \ref
|
||||||
//! ASMJIT_NO_COMPILER as \ref asmjit_compiler cannot be used without \ref asmjit_builder.
|
//! ASMJIT_NO_COMPILER as \ref asmjit_compiler cannot be used without \ref asmjit_builder.
|
||||||
@@ -2281,43 +2275,46 @@ namespace asmjit {
|
|||||||
|
|
||||||
} // {asmjit}
|
} // {asmjit}
|
||||||
|
|
||||||
#include "asmjit-scope-begin.h"
|
#include <asmjit/asmjit-scope-begin.h>
|
||||||
#include "core/api-config.h"
|
|
||||||
#include "core/archcommons.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#include "core/archtraits.h"
|
#include <asmjit/core/archcommons.h>
|
||||||
#include "core/arena.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
#include "core/arenahash.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "core/arenalist.h"
|
#include <asmjit/core/builder.h>
|
||||||
#include "core/arenapool.h"
|
#include <asmjit/core/codebuffer.h>
|
||||||
#include "core/arenastring.h"
|
#include <asmjit/core/codeholder.h>
|
||||||
#include "core/arenatree.h"
|
#include <asmjit/core/compiler.h>
|
||||||
#include "core/arenavector.h"
|
#include <asmjit/core/constpool.h>
|
||||||
#include "core/assembler.h"
|
#include <asmjit/core/cpuinfo.h>
|
||||||
#include "core/builder.h"
|
#include <asmjit/core/emitter.h>
|
||||||
#include "core/codebuffer.h"
|
#include <asmjit/core/environment.h>
|
||||||
#include "core/codeholder.h"
|
#include <asmjit/core/errorhandler.h>
|
||||||
#include "core/compiler.h"
|
#include <asmjit/core/fixup.h>
|
||||||
#include "core/constpool.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "core/cpuinfo.h"
|
#include <asmjit/core/func.h>
|
||||||
#include "core/emitter.h"
|
#include <asmjit/core/globals.h>
|
||||||
#include "core/environment.h"
|
#include <asmjit/core/inst.h>
|
||||||
#include "core/errorhandler.h"
|
#include <asmjit/core/jitallocator.h>
|
||||||
#include "core/fixup.h"
|
#include <asmjit/core/jitruntime.h>
|
||||||
#include "core/formatter.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "core/func.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "core/globals.h"
|
#include <asmjit/core/osutils.h>
|
||||||
#include "core/inst.h"
|
#include <asmjit/core/string.h>
|
||||||
#include "core/jitallocator.h"
|
#include <asmjit/core/target.h>
|
||||||
#include "core/jitruntime.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "core/logger.h"
|
#include <asmjit/core/virtmem.h>
|
||||||
#include "core/operand.h"
|
|
||||||
#include "core/osutils.h"
|
#include <asmjit/support/arena.h>
|
||||||
#include "core/span.h"
|
#include <asmjit/support/arenahash.h>
|
||||||
#include "core/string.h"
|
#include <asmjit/support/arenalist.h>
|
||||||
#include "core/support.h"
|
#include <asmjit/support/arenapool.h>
|
||||||
#include "core/target.h"
|
#include <asmjit/support/arenastring.h>
|
||||||
#include "core/type.h"
|
#include <asmjit/support/arenatree.h>
|
||||||
#include "core/virtmem.h"
|
#include <asmjit/support/arenavector.h>
|
||||||
#include "asmjit-scope-end.h"
|
#include <asmjit/support/span.h>
|
||||||
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
|
#include <asmjit/asmjit-scope-end.h>
|
||||||
|
|
||||||
#endif // ASMJIT_CORE_H_INCLUDED
|
#endif // ASMJIT_CORE_H_INCLUDED
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
|
|
||||||
#if !defined(ASMJIT_BUILD_DEBUG) && defined(__GNUC__) && !defined(__clang__)
|
#if !defined(ASMJIT_BUILD_DEBUG) && defined(__GNUC__) && !defined(__clang__)
|
||||||
#define ASMJIT_FAVOR_SIZE __attribute__((__optimize__("Os")))
|
#define ASMJIT_FAVOR_SIZE __attribute__((__optimize__("Os")))
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
// Include a unit testing package if this is a `asmjit_test_unit` build.
|
// Include a unit testing package if this is a `asmjit_test_unit` build.
|
||||||
#if defined(ASMJIT_TEST)
|
#if defined(ASMJIT_TEST)
|
||||||
#include "../../../testing/tests/broken.h"
|
#include <asmjit-testing/tests/broken.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // ASMJIT_CORE_API_BUILD_P_H_INCLUDED
|
#endif // ASMJIT_CORE_API_BUILD_P_H_INCLUDED
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
#define ASMJIT_LIBRARY_MAKE_VERSION(major, minor, patch) ((major << 16) | (minor << 8) | (patch))
|
#define ASMJIT_LIBRARY_MAKE_VERSION(major, minor, patch) ((major << 16) | (minor << 8) | (patch))
|
||||||
|
|
||||||
//! AsmJit library version, see \ref ASMJIT_LIBRARY_MAKE_VERSION for a version format reference.
|
//! AsmJit library version, see \ref ASMJIT_LIBRARY_MAKE_VERSION for a version format reference.
|
||||||
#define ASMJIT_LIBRARY_VERSION ASMJIT_LIBRARY_MAKE_VERSION(1, 20, 0)
|
#define ASMJIT_LIBRARY_VERSION ASMJIT_LIBRARY_MAKE_VERSION(1, 21, 0)
|
||||||
|
|
||||||
//! \def ASMJIT_ABI_NAMESPACE
|
//! \def ASMJIT_ABI_NAMESPACE
|
||||||
//!
|
//!
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
//! AsmJit default, which makes it possible to use multiple AsmJit libraries within a single project, totally
|
//! AsmJit default, which makes it possible to use multiple AsmJit libraries within a single project, totally
|
||||||
//! controlled by users. This is useful especially in cases in which some of such library comes from third party.
|
//! controlled by users. This is useful especially in cases in which some of such library comes from third party.
|
||||||
#if !defined(ASMJIT_ABI_NAMESPACE)
|
#if !defined(ASMJIT_ABI_NAMESPACE)
|
||||||
#define ASMJIT_ABI_NAMESPACE v1_20
|
#define ASMJIT_ABI_NAMESPACE v1_21
|
||||||
#endif // !ASMJIT_ABI_NAMESPACE
|
#endif // !ASMJIT_ABI_NAMESPACE
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -90,12 +90,6 @@
|
|||||||
#define ASMJIT_BUILD_RELEASE
|
#define ASMJIT_BUILD_RELEASE
|
||||||
#undef ASMJIT_BUILD_RELEASE
|
#undef ASMJIT_BUILD_RELEASE
|
||||||
|
|
||||||
//! \def ASMJIT_NO_DEPRECATED
|
|
||||||
//!
|
|
||||||
//! Disables deprecated API at compile time (deprecated API won't be available).
|
|
||||||
#define ASMJIT_NO_DEPRECATED
|
|
||||||
#undef ASMJIT_NO_DEPRECATED
|
|
||||||
|
|
||||||
//! \def ASMJIT_NO_ABI_NAMESPACE
|
//! \def ASMJIT_NO_ABI_NAMESPACE
|
||||||
//!
|
//!
|
||||||
//! Disables the use of an inline ABI namespace within asmjit namespace (the inline namespace is used as an ABI tag).
|
//! Disables the use of an inline ABI namespace within asmjit namespace (the inline namespace is used as an ABI tag).
|
||||||
@@ -138,12 +132,6 @@
|
|||||||
#define ASMJIT_NO_TEXT
|
#define ASMJIT_NO_TEXT
|
||||||
#undef ASMJIT_NO_TEXT
|
#undef ASMJIT_NO_TEXT
|
||||||
|
|
||||||
//! \def ASMJIT_NO_VALIDATION
|
|
||||||
//!
|
|
||||||
//! Disables instruction validation API.
|
|
||||||
#define ASMJIT_NO_VALIDATION
|
|
||||||
#undef ASMJIT_NO_VALIDATION
|
|
||||||
|
|
||||||
//! \def ASMJIT_NO_INTROSPECTION
|
//! \def ASMJIT_NO_INTROSPECTION
|
||||||
//!
|
//!
|
||||||
//! Disables instruction introspection API.
|
//! Disables instruction introspection API.
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
// allows to be created from arm::Shift in a const-expr way, so the arm::Shift must be provided. So this header file
|
// allows to be created from arm::Shift in a const-expr way, so the arm::Shift must be provided. So this header file
|
||||||
// provides everything architecture-specific that is used by the Core API.
|
// provides everything architecture-specific that is used by the Core API.
|
||||||
|
|
||||||
#include "../core/globals.h"
|
#include <asmjit/core/globals.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
ASMJIT_BEGIN_SUB_NAMESPACE(arm)
|
||||||
|
|
||||||
@@ -3,17 +3,17 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/archtraits.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
#include "../core/environment.h"
|
#include <asmjit/core/environment.h>
|
||||||
#include "../core/misc_p.h"
|
#include <asmjit/core/misc_p.h>
|
||||||
|
|
||||||
#if !defined(ASMJIT_NO_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include "../x86/x86archtraits_p.h"
|
#include <asmjit/x86/x86archtraits_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(ASMJIT_NO_AARCH64)
|
#if !defined(ASMJIT_NO_AARCH64)
|
||||||
#include "../arm/a64archtraits_p.h"
|
#include <asmjit/arm/a64archtraits_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
#ifndef ASMJIT_CORE_ARCHTRAITS_H_INCLUDED
|
#ifndef ASMJIT_CORE_ARCHTRAITS_H_INCLUDED
|
||||||
#define ASMJIT_CORE_ARCHTRAITS_H_INCLUDED
|
#define ASMJIT_CORE_ARCHTRAITS_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,14 +3,14 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../core/codewriter_p.h"
|
#include <asmjit/core/codewriter_p.h>
|
||||||
#include "../core/constpool.h"
|
#include <asmjit/core/constpool.h>
|
||||||
#include "../core/emitterutils_p.h"
|
#include <asmjit/core/emitterutils_p.h>
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/logger.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
#ifndef ASMJIT_CORE_ASSEMBLER_H_INCLUDED
|
#ifndef ASMJIT_CORE_ASSEMBLER_H_INCLUDED
|
||||||
#define ASMJIT_CORE_ASSEMBLER_H_INCLUDED
|
#define ASMJIT_CORE_ASSEMBLER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/codeholder.h"
|
#include <asmjit/core/codeholder.h>
|
||||||
#include "../core/emitter.h"
|
#include <asmjit/core/emitter.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/operand.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,15 +3,15 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#ifndef ASMJIT_NO_BUILDER
|
#ifndef ASMJIT_NO_BUILDER
|
||||||
|
|
||||||
#include "../core/builder.h"
|
#include <asmjit/core/builder.h>
|
||||||
#include "../core/emitterutils_p.h"
|
#include <asmjit/core/emitterutils_p.h>
|
||||||
#include "../core/errorhandler.h"
|
#include <asmjit/core/errorhandler.h>
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/logger.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
// BaseBuilder - Utilities
|
// BaseBuilder - Utilities
|
||||||
// =======================
|
// =======================
|
||||||
|
|
||||||
static void BaseBuilder_deletePasses(BaseBuilder* self) noexcept {
|
static void BaseBuilder_delete_passes(BaseBuilder* self) noexcept {
|
||||||
for (Pass* pass : self->_passes) {
|
for (Pass* pass : self->_passes) {
|
||||||
pass->~Pass();
|
pass->~Pass();
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ BaseBuilder::BaseBuilder() noexcept
|
|||||||
_pass_arena(64u * 1024u) {}
|
_pass_arena(64u * 1024u) {}
|
||||||
|
|
||||||
BaseBuilder::~BaseBuilder() noexcept {
|
BaseBuilder::~BaseBuilder() noexcept {
|
||||||
BaseBuilder_deletePasses(this);
|
BaseBuilder_delete_passes(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// BaseBuilder - Node Management
|
// BaseBuilder - Node Management
|
||||||
@@ -612,7 +612,7 @@ Error BaseBuilder::_emit(InstId inst_id, const Operand_& o0, const Operand_& o1,
|
|||||||
return make_error(Error::kNotInitialized);
|
return make_error(Error::kNotInitialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_VALIDATION
|
#ifndef ASMJIT_NO_INTROSPECTION
|
||||||
// Strict validation.
|
// Strict validation.
|
||||||
if (has_diagnostic_option(DiagnosticOptions::kValidateIntermediate)) {
|
if (has_diagnostic_option(DiagnosticOptions::kValidateIntermediate)) {
|
||||||
Operand_ op_array[Globals::kMaxOpCount];
|
Operand_ op_array[Globals::kMaxOpCount];
|
||||||
@@ -865,7 +865,7 @@ Error BaseBuilder::serialize_to(BaseEmitter* dst) {
|
|||||||
// BaseBuilder - Events
|
// BaseBuilder - Events
|
||||||
// ====================
|
// ====================
|
||||||
|
|
||||||
static ASMJIT_INLINE void BaseBuilder_clearAll(BaseBuilder* self) noexcept {
|
static ASMJIT_INLINE void BaseBuilder_clear_all(BaseBuilder* self) noexcept {
|
||||||
self->_section_nodes.reset();
|
self->_section_nodes.reset();
|
||||||
self->_label_nodes.reset();
|
self->_label_nodes.reset();
|
||||||
|
|
||||||
@@ -876,7 +876,7 @@ static ASMJIT_INLINE void BaseBuilder_clearAll(BaseBuilder* self) noexcept {
|
|||||||
self->_node_list.reset();
|
self->_node_list.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
static ASMJIT_INLINE Error BaseBuilder_initSection(BaseBuilder* self) noexcept {
|
static ASMJIT_INLINE Error BaseBuilder_init_section(BaseBuilder* self) noexcept {
|
||||||
SectionNode* initial_section;
|
SectionNode* initial_section;
|
||||||
|
|
||||||
ASMJIT_PROPAGATE(self->section_node_of(Out(initial_section), 0));
|
ASMJIT_PROPAGATE(self->section_node_of(Out(initial_section), 0));
|
||||||
@@ -893,7 +893,7 @@ static ASMJIT_INLINE Error BaseBuilder_initSection(BaseBuilder* self) noexcept {
|
|||||||
Error BaseBuilder::on_attach(CodeHolder& code) noexcept {
|
Error BaseBuilder::on_attach(CodeHolder& code) noexcept {
|
||||||
ASMJIT_PROPAGATE(Base::on_attach(code));
|
ASMJIT_PROPAGATE(Base::on_attach(code));
|
||||||
|
|
||||||
Error err = BaseBuilder_initSection(this);
|
Error err = BaseBuilder_init_section(this);
|
||||||
if (ASMJIT_UNLIKELY(err != Error::kOk)) {
|
if (ASMJIT_UNLIKELY(err != Error::kOk)) {
|
||||||
on_detach(code);
|
on_detach(code);
|
||||||
}
|
}
|
||||||
@@ -901,8 +901,8 @@ Error BaseBuilder::on_attach(CodeHolder& code) noexcept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Error BaseBuilder::on_detach(CodeHolder& code) noexcept {
|
Error BaseBuilder::on_detach(CodeHolder& code) noexcept {
|
||||||
BaseBuilder_deletePasses(this);
|
BaseBuilder_delete_passes(this);
|
||||||
BaseBuilder_clearAll(this);
|
BaseBuilder_clear_all(this);
|
||||||
|
|
||||||
return Base::on_detach(code);
|
return Base::on_detach(code);
|
||||||
}
|
}
|
||||||
@@ -911,9 +911,9 @@ Error BaseBuilder::on_reinit(CodeHolder& code) noexcept {
|
|||||||
// BaseEmitter::on_reinit() never fails.
|
// BaseEmitter::on_reinit() never fails.
|
||||||
(void)Base::on_reinit(code);
|
(void)Base::on_reinit(code);
|
||||||
|
|
||||||
BaseBuilder_deletePasses(this);
|
BaseBuilder_delete_passes(this);
|
||||||
BaseBuilder_clearAll(this);
|
BaseBuilder_clear_all(this);
|
||||||
return BaseBuilder_initSection(this);
|
return BaseBuilder_init_section(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass - Construction & Destruction
|
// Pass - Construction & Destruction
|
||||||
@@ -6,20 +6,20 @@
|
|||||||
#ifndef ASMJIT_CORE_BUILDER_H_INCLUDED
|
#ifndef ASMJIT_CORE_BUILDER_H_INCLUDED
|
||||||
#define ASMJIT_CORE_BUILDER_H_INCLUDED
|
#define ASMJIT_CORE_BUILDER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_BUILDER
|
#ifndef ASMJIT_NO_BUILDER
|
||||||
|
|
||||||
#include "../core/arena.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../core/arenavector.h"
|
#include <asmjit/core/codeholder.h>
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/constpool.h>
|
||||||
#include "../core/codeholder.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/constpool.h"
|
#include <asmjit/core/inst.h>
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../core/inst.h"
|
#include <asmjit/core/string.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../core/string.h"
|
#include <asmjit/support/arena.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/arenavector.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -1088,7 +1088,7 @@ public:
|
|||||||
//! Returns the index of the given operand type `op_type`.
|
//! Returns the index of the given operand type `op_type`.
|
||||||
//!
|
//!
|
||||||
//! \note If the operand type wa found, the value returned represents its index in \ref operands()
|
//! \note If the operand type wa found, the value returned represents its index in \ref operands()
|
||||||
//! array, otherwise \ref Globals::kNPos is returned to signalize that the operand was not found.
|
//! array, otherwise `SIZE_MAX` is returned to signalize that the operand was not found.
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
inline size_t index_of_op_type(OperandType op_type) const noexcept {
|
inline size_t index_of_op_type(OperandType op_type) const noexcept {
|
||||||
Span<const Operand> ops = operands();
|
Span<const Operand> ops = operands();
|
||||||
@@ -1097,7 +1097,7 @@ public:
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Globals::kNPos;
|
return SIZE_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! A shortcut that calls `index_of_op_type(OperandType::kMem)`.
|
//! A shortcut that calls `index_of_op_type(OperandType::kMem)`.
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
#ifndef ASMJIT_CORE_BUILDER_P_H_INCLUDED
|
#ifndef ASMJIT_CORE_BUILDER_P_H_INCLUDED
|
||||||
#define ASMJIT_CORE_BUILDER_P_H_INCLUDED
|
#define ASMJIT_CORE_BUILDER_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_BUILDER
|
#ifndef ASMJIT_NO_BUILDER
|
||||||
|
|
||||||
#include "../core/builder.h"
|
#include <asmjit/core/builder.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
#ifndef ASMJIT_CORE_CODEBUFFER_H_INCLUDED
|
#ifndef ASMJIT_CORE_CODEBUFFER_H_INCLUDED
|
||||||
#define ASMJIT_CORE_CODEBUFFER_H_INCLUDED
|
#define ASMJIT_CORE_CODEBUFFER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/globals.h"
|
#include <asmjit/core/globals.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../core/codewriter_p.h"
|
#include <asmjit/core/codewriter_p.h>
|
||||||
#include "../core/logger.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
@@ -32,7 +32,7 @@ static constexpr LabelEntry::ExtraData CodeHolder_make_shared_label_extra_data()
|
|||||||
return extra_data;
|
return extra_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr LabelEntry::ExtraData CodeHolder_sharedLabelExtraData = CodeHolder_make_shared_label_extra_data();
|
static constexpr LabelEntry::ExtraData CodeHolder_shared_label_extra_data = CodeHolder_make_shared_label_extra_data();
|
||||||
|
|
||||||
class ResolveFixupIterator {
|
class ResolveFixupIterator {
|
||||||
public:
|
public:
|
||||||
@@ -692,7 +692,7 @@ Error CodeHolder::new_label_id(Out<uint32_t> label_id_out) noexcept {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
label_id_out = label_id;
|
label_id_out = label_id;
|
||||||
_label_entries.append_unchecked(LabelEntry{const_cast<LabelEntry::ExtraData*>(&CodeHolder_sharedLabelExtraData), uint64_t(0)});
|
_label_entries.append_unchecked(LabelEntry{const_cast<LabelEntry::ExtraData*>(&CodeHolder_shared_label_extra_data), uint64_t(0)});
|
||||||
return Error::kOk;
|
return Error::kOk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -710,7 +710,7 @@ Error CodeHolder::new_named_label_id(Out<uint32_t> label_id_out, const char* nam
|
|||||||
}
|
}
|
||||||
|
|
||||||
label_id_out = label_id;
|
label_id_out = label_id;
|
||||||
_label_entries.append_unchecked(LabelEntry{const_cast<LabelEntry::ExtraData*>(&CodeHolder_sharedLabelExtraData), uint64_t(0)});
|
_label_entries.append_unchecked(LabelEntry{const_cast<LabelEntry::ExtraData*>(&CodeHolder_shared_label_extra_data), uint64_t(0)});
|
||||||
return Error::kOk;
|
return Error::kOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6,21 +6,21 @@
|
|||||||
#ifndef ASMJIT_CORE_CODEHOLDER_H_INCLUDED
|
#ifndef ASMJIT_CORE_CODEHOLDER_H_INCLUDED
|
||||||
#define ASMJIT_CORE_CODEHOLDER_H_INCLUDED
|
#define ASMJIT_CORE_CODEHOLDER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/archtraits.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
#include "../core/arena.h"
|
#include <asmjit/core/codebuffer.h>
|
||||||
#include "../core/arenahash.h"
|
#include <asmjit/core/errorhandler.h>
|
||||||
#include "../core/arenapool.h"
|
#include <asmjit/core/fixup.h>
|
||||||
#include "../core/arenastring.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../core/arenatree.h"
|
#include <asmjit/core/string.h>
|
||||||
#include "../core/arenavector.h"
|
#include <asmjit/core/target.h>
|
||||||
#include "../core/codebuffer.h"
|
#include <asmjit/support/arena.h>
|
||||||
#include "../core/errorhandler.h"
|
#include <asmjit/support/arenahash.h>
|
||||||
#include "../core/fixup.h"
|
#include <asmjit/support/arenapool.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/support/arenastring.h>
|
||||||
#include "../core/span.h"
|
#include <asmjit/support/arenatree.h>
|
||||||
#include "../core/string.h"
|
#include <asmjit/support/arenavector.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/span.h>
|
||||||
#include "../core/target.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,11 +3,12 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/codeholder.h"
|
#include <asmjit/core/codeholder.h>
|
||||||
#include "../core/codewriter_p.h"
|
#include <asmjit/core/codewriter_p.h>
|
||||||
|
#include <asmjit/core/emitterutils_p.h>
|
||||||
|
|
||||||
#include "../arm/armutils.h"
|
#include <asmjit/arm/armutils.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@ bool CodeWriterUtils::encode_offset32(uint32_t* dst, int64_t offset64, const Off
|
|||||||
}
|
}
|
||||||
|
|
||||||
value = uint32_t(int32_t(offset64));
|
value = uint32_t(int32_t(offset64));
|
||||||
if (!Support::is_encodable_offset_32(int32_t(value), bit_count)) {
|
if (!EmitterUtils::is_encodable_offset_32(int32_t(value), bit_count)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,7 +229,7 @@ bool CodeWriterUtils::encode_offset64(uint64_t* dst, int64_t offset64, const Off
|
|||||||
offset64 >>= discard_lsb;
|
offset64 >>= discard_lsb;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Support::is_encodable_offset_64(offset64, bit_count)) {
|
if (!EmitterUtils::is_encodable_offset_64(offset64, bit_count)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
#ifndef ASMJIT_CORE_CODEBUFFERWRITER_P_H_INCLUDED
|
#ifndef ASMJIT_CORE_CODEBUFFERWRITER_P_H_INCLUDED
|
||||||
#define ASMJIT_CORE_CODEBUFFERWRITER_P_H_INCLUDED
|
#define ASMJIT_CORE_CODEBUFFERWRITER_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../core/codebuffer.h"
|
#include <asmjit/core/codebuffer.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,18 +3,18 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#ifndef ASMJIT_NO_COMPILER
|
||||||
|
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../core/builder_p.h"
|
#include <asmjit/core/builder_p.h>
|
||||||
#include "../core/compiler.h"
|
#include <asmjit/core/compiler.h>
|
||||||
#include "../core/cpuinfo.h"
|
#include <asmjit/core/cpuinfo.h>
|
||||||
#include "../core/logger.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "../core/rapass_p.h"
|
#include <asmjit/core/rapass_p.h>
|
||||||
#include "../core/rastack_p.h"
|
#include <asmjit/core/rastack_p.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,19 +6,19 @@
|
|||||||
#ifndef ASMJIT_CORE_COMPILER_H_INCLUDED
|
#ifndef ASMJIT_CORE_COMPILER_H_INCLUDED
|
||||||
#define ASMJIT_CORE_COMPILER_H_INCLUDED
|
#define ASMJIT_CORE_COMPILER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#ifndef ASMJIT_NO_COMPILER
|
||||||
|
|
||||||
#include "../core/arena.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../core/arenavector.h"
|
#include <asmjit/core/builder.h>
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/constpool.h>
|
||||||
#include "../core/builder.h"
|
#include <asmjit/core/compilerdefs.h>
|
||||||
#include "../core/constpool.h"
|
#include <asmjit/core/func.h>
|
||||||
#include "../core/compilerdefs.h"
|
#include <asmjit/core/inst.h>
|
||||||
#include "../core/func.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../core/inst.h"
|
#include <asmjit/support/arena.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/support/arenavector.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,11 +6,11 @@
|
|||||||
#ifndef ASMJIT_CORE_COMPILERDEFS_H_INCLUDED
|
#ifndef ASMJIT_CORE_COMPILERDEFS_H_INCLUDED
|
||||||
#define ASMJIT_CORE_COMPILERDEFS_H_INCLUDED
|
#define ASMJIT_CORE_COMPILERDEFS_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/api-config.h"
|
#include <asmjit/core/api-config.h>
|
||||||
#include "../core/arenastring.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/type.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/arenastring.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/constpool.h"
|
#include <asmjit/core/constpool.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
#ifndef ASMJIT_CORE_CONSTPOOL_H_INCLUDED
|
#ifndef ASMJIT_CORE_CONSTPOOL_H_INCLUDED
|
||||||
#define ASMJIT_CORE_CONSTPOOL_H_INCLUDED
|
#define ASMJIT_CORE_CONSTPOOL_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/arena.h"
|
#include <asmjit/support/arena.h>
|
||||||
#include "../core/arenatree.h"
|
#include <asmjit/support/arenatree.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/cpuinfo.h"
|
#include <asmjit/core/cpuinfo.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
@@ -6,11 +6,11 @@
|
|||||||
#ifndef ASMJIT_CORE_CPUINFO_H_INCLUDED
|
#ifndef ASMJIT_CORE_CPUINFO_H_INCLUDED
|
||||||
#define ASMJIT_CORE_CPUINFO_H_INCLUDED
|
#define ASMJIT_CORE_CPUINFO_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/archtraits.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
#include "../core/environment.h"
|
#include <asmjit/core/environment.h>
|
||||||
#include "../core/globals.h"
|
#include <asmjit/core/globals.h>
|
||||||
#include "../core/string.h"
|
#include <asmjit/core/string.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,12 +3,12 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/archtraits.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
#include "../core/emithelper_p.h"
|
#include <asmjit/core/emithelper_p.h>
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/funcargscontext_p.h"
|
#include <asmjit/core/funcargscontext_p.h>
|
||||||
#include "../core/radefs_p.h"
|
#include <asmjit/core/radefs_p.h>
|
||||||
|
|
||||||
// Can be used for debugging...
|
// Can be used for debugging...
|
||||||
// #define ASMJIT_DUMP_ARGS_ASSIGNMENT
|
// #define ASMJIT_DUMP_ARGS_ASSIGNMENT
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
#ifndef ASMJIT_CORE_EMITHELPER_P_H_INCLUDED
|
#ifndef ASMJIT_CORE_EMITHELPER_P_H_INCLUDED
|
||||||
#define ASMJIT_CORE_EMITHELPER_P_H_INCLUDED
|
#define ASMJIT_CORE_EMITHELPER_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/emitter.h"
|
#include <asmjit/core/emitter.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/core/type.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/emitterutils_p.h"
|
#include <asmjit/core/emitterutils_p.h>
|
||||||
#include "../core/errorhandler.h"
|
#include <asmjit/core/errorhandler.h>
|
||||||
#include "../core/logger.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,12 +6,12 @@
|
|||||||
#ifndef ASMJIT_CORE_EMITTER_H_INCLUDED
|
#ifndef ASMJIT_CORE_EMITTER_H_INCLUDED
|
||||||
#define ASMJIT_CORE_EMITTER_H_INCLUDED
|
#define ASMJIT_CORE_EMITTER_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/archtraits.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
#include "../core/codeholder.h"
|
#include <asmjit/core/codeholder.h>
|
||||||
#include "../core/formatter.h"
|
#include <asmjit/core/formatter.h>
|
||||||
#include "../core/inst.h"
|
#include <asmjit/core/inst.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/operand.h>
|
||||||
#include "../core/type.h"
|
#include <asmjit/core/type.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -3,12 +3,12 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/assembler.h"
|
#include <asmjit/core/assembler.h>
|
||||||
#include "../core/emitterutils_p.h"
|
#include <asmjit/core/emitterutils_p.h>
|
||||||
#include "../core/formatter_p.h"
|
#include <asmjit/core/formatter_p.h>
|
||||||
#include "../core/logger.h"
|
#include <asmjit/core/logger.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,8 +6,9 @@
|
|||||||
#ifndef ASMJIT_CORE_EMITTERUTILS_P_H_INCLUDED
|
#ifndef ASMJIT_CORE_EMITTERUTILS_P_H_INCLUDED
|
||||||
#define ASMJIT_CORE_EMITTERUTILS_P_H_INCLUDED
|
#define ASMJIT_CORE_EMITTERUTILS_P_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/emitter.h"
|
#include <asmjit/core/emitter.h>
|
||||||
#include "../core/operand.h"
|
#include <asmjit/core/operand.h>
|
||||||
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -59,6 +60,18 @@ static ASMJIT_INLINE void op_array_from_emit_args(Operand_ dst[Globals::kMaxOpCo
|
|||||||
dst[5].copy_from(op_ext[kOp5]);
|
dst[5].copy_from(op_ext[kOp5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
static bool ASMJIT_INLINE_NODEBUG is_encodable_offset_32(int32_t offset, uint32_t num_bits) noexcept {
|
||||||
|
uint32_t n_rev = 32 - num_bits;
|
||||||
|
return Support::sar(Support::shl(offset, n_rev), n_rev) == offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
static bool ASMJIT_INLINE_NODEBUG is_encodable_offset_64(int64_t offset, uint32_t num_bits) noexcept {
|
||||||
|
uint32_t n_rev = 64 - num_bits;
|
||||||
|
return Support::sar(Support::shl(offset, n_rev), n_rev) == offset;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_LOGGING
|
#ifndef ASMJIT_NO_LOGGING
|
||||||
Error finish_formatted_line(String& sb, const FormatOptions& format_options, const uint8_t* bin_data, size_t bin_size, size_t offset_size, size_t imm_size, const char* comment) noexcept;
|
Error finish_formatted_line(String& sb, const FormatOptions& format_options, const uint8_t* bin_data, size_t bin_size, size_t offset_size, size_t imm_size, const char* comment) noexcept;
|
||||||
|
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/environment.h"
|
#include <asmjit/core/environment.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#ifndef ASMJIT_CORE_ENVIRONMENT_H_INCLUDED
|
#ifndef ASMJIT_CORE_ENVIRONMENT_H_INCLUDED
|
||||||
#define ASMJIT_CORE_ENVIRONMENT_H_INCLUDED
|
#define ASMJIT_CORE_ENVIRONMENT_H_INCLUDED
|
||||||
|
|
||||||
#include "../core/archtraits.h"
|
#include <asmjit/core/archtraits.h>
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
// See <asmjit/core.h> or LICENSE.md for license and copyright information
|
||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include <asmjit/core/api-build_p.h>
|
||||||
#include "../core/errorhandler.h"
|
#include <asmjit/core/errorhandler.h>
|
||||||
#include "../core/support.h"
|
#include <asmjit/support/support.h>
|
||||||
|
|
||||||
ASMJIT_BEGIN_NAMESPACE
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user