mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-16 20:17:05 +03:00
7596c6d035c27c9e5faad445f3214f2c971b2f2b
* Refactored the whole codebase to use snake_case convention to
name functions and variables, including member variables.
Class naming is unchanged and each starts with upper-case
character. The intention of this change is to make the source
code more readable and consistent across multiple projects
where AsmJit is currently used.
* Refactored support.h to make it more shareable across projects.
* x86::Vec now inherits from UniVec
* minor changes in JitAllocator and WriteScope in order to make
the size of WriteScope smaller
* added ZoneStatistics and Zone::statistics() getter
* improved x86::EmitHelper to use tables instead of choose() and
other mechanisms to pick between SSE and AVX instructions
* Refactored the whole codebase to use snake_case convention for
for functions names, function parameter names, struct members,
and variables
* Added a non-owning asmjit::Span<T> type and use into public API
to hide the usage of ZoneVector in CodeHolder, Builder, and
Compiler. Users now only get Span (with data and size), which
doesn't require users to know about ZoneVector
* Removed RAWorkId from RATiedReg in favor of RAWorkReg*
* Removed GEN from LiveInfo as it's not needed by CFG construction
to save memory (GEN was merged with LIVE-IN bits). The remaining
LIVE-IN, LIVE-OUT, and KILL bits are enough, however KILL bits may
be removed in the future as KILL bits are not needed after LIVE-IN
and LIVE-OUT converged
* Optimized the representation of LIVE-IN, LIVE-OUT, and KILL bits
per block. Now only registers that live across multiple basic
blocks are included here, which means that virtual registers that
only live in a single block are not included and won't be overhead
during liveness analysis. This optimization alone can make liveness
analysis 90% faster depending on the code generated (more virtual
registers that only live in a single basic block -> more gains)
* Optimized building liveness information bits per block. The new
code uses an optimized algorithm to prevent too many traversals
and uses a more optimized code for a case in which not too many
registers are used (it avoids array operations if the number of
all virtual registers within the function fits a single BitWord)
* Optimized code that computes which virtual register is only used
in a single basic block - this aims to optimize register allocator
in the future by using a designed code path for allocating regs
only used in a single basic block
* Reduced the information required for each live-span, which is used
by bin-packing. Now the struct is 8 bytes, which is good for a lot
of optimizations C++ compiler can do
* Added UniCompiler (ujit) which can be used to share code paths
between X86, X86_64, and AArch64 code generation (experimental).
AsmJit
AsmJit is a lightweight library for machine code generation written in C++ language.
- Official Home Page (asmjit.com)
- Official Repository (asmjit/asmjit)
- Public Chat Channel
- Zlib License
See asmjit.com page for more details, examples, and documentation.
Project Organization
/- Project root- src - Source code
- asmjit - Source code and headers (always point include path in here)
- core - Core API, backend independent except relocations
- arm - ARM specific API, used only by ARM and AArch64 backends
- x86 - X86 specific API, used only by X86 and X64 backends
- asmjit - Source code and headers (always point include path in here)
- test - Unit and integration tests (don't embed in your project)
- tools - Tools used for configuring, documenting, and generating files
- src - Source code
Roadmap
- See Roadmap page for more details
Contributing
- See CONTRIBUTING page for more details
Documentation
Breaking Changes
Breaking the API is sometimes inevitable, what to do?
- See Breaking Changes Guide, which is now part of AsmJit documentation
- See asmjit tests, they always compile and provide implementation of many use-cases:
- asmjit_test_emitters.cpp - Tests that demonstrate the purpose of emitters
- asmjit_test_assembler_x86.cpp - Tests targeting AsmJit's Assembler (x86/x64)
- asmjit_test_compiler_x86.cpp - Tests targeting AsmJit's Compiler (x86/x64)
- asmjit_test_instinfo.cpp - Tests that query instruction information
- asmjit_test_x86_sections.cpp - Multiple sections test
- Visit our Gitter Chat if you need a quick help
Support
- AsmJit project has both community and commercial support, see AsmJit's Support Page
- Organizations that rely on AsmJit should support the development!
Notable Donors List:
Authors & Maintainers
- Petr Kobalicek kobalicek.petr@gmail.com (website)
Languages
C++
93.2%
JavaScript
3.3%
C
3.2%
CMake
0.3%