mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-18 04:54:36 +03:00
2ab380e0bd242e29f67330a66a3c18da73b3b40a
Fixed POP Sreg instruction, which was incorrectly implemented to emit nothing Fixed CVTSD2SI, CVTSS2SI, CVTTSD2SI, and CVTTSS2SI instructions to not consider the size of the memory operand when calculagint REX.W prefix Fixed VCMPPD, VCMPPS, VCMPSD, VCMPSS, VPCMPEQ*, VPCMPGT* instructions to always force EVEX prefix when the first operand is K register Fixed ENDBR32 and ENDBR64 instructions (wrong opcode) Fixed CLRSSBSY and RSTORSSP instructions (wrong logic in Assembler) Fixed SLDT, SMSW, and STR instructions to not consider memory size when determining prefixes Fixed UD0 and UD1 instructions to consider both operands Fixed VCVTNE2PS2BF16, VCVTNEPS2BF16, and VDPBF16PS instructions (incorrect calculation of LL field) (AVX512) Fixed VCVTPD2DQ, VCVTPD2PS, VCVTPD2UDQ, VCVTQQ2PS, VCVTTOD2DQ, VCVTTPD2UDQ, VCVTUQQ2PS in AVX512 case (incorrect calculation of LL field) Fixed VGATHERPF* and VSCATTERPF* instructions (some instructions were encoded incorrectly by not considering the memory index register type in LL field) Fixed VPBLENDVB (incorrect calculation of LL field) Fixed VPEXTRW to use use a shorter encoding when possible (vpextrw r32, xmm, imm) Fixed VPSLLD, VPSLLQ, VPSLLW, VPSRAD, VPSRAQ, VPSRAW, VPSRLD, VPSRLQ, VPSRLW instructions to always force EVEX prefix when the instruction is RMI (AVX512) Fixed the accepted memory operand size of MMX PUNPCKL??? instructions from m64 to m32 (only affects validation) Added explicit forms to XSAVE* and XRSTOR* instructions Added HRESET and UINTR instructions Changed MOV and all ARITH instructions to output the same binary as LLVM in 'reg, reg' case (it used an alternative encoding initially) Renamed LRET to RETF Renamed VBLENDM* instructions to VPBLENDM* (the name was incorrect) Renamed VPBROADCASTMB2D to VPBROADCASTMW2D (the name was incorrect) Renamed SYSEXIT64 to SYSEXITQ and SYSRET64 to SYSRETQ Removed non-standard IRETW (use IRET, IRETD, or IRETQ to select the form)
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.
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 Official Chat if you need a quick help.
Project Organization
/- Project root.- src - Source code.
- asmjit - Source code and headers (always point include path in here).
- core - Core API, backend independent except relocations.
- arm - ARM specific API, used only by ARM and AArch64 backends.
- x86 - X86 specific API, used only by X86 and X64 backends.
- 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.
TODO
- Core:
- Add support for user external buffers in CodeBuffer / CodeHolder.
- Register allocator doesn't understand register pairs, affected instructions:
- v4fmaddps, v4fmaddss, v4fnmaddps, v4fnmaddss
- vp4dpwssd, vp4dpwssds
- vp2intersectd, vp2intersectq
- Ports:
- ARM/Thumb/AArch64 support.
Support
- AsmJit project has both community and commercial support, see AsmJit's Support Page
- You can help the development and maintenance through Petr Kobalicek's GitHub sponsors Profile
Notable Donors List:
Authors & Maintainers
- Petr Kobalicek kobalicek.petr@gmail.com
Languages
C++
93.2%
JavaScript
3.3%
C
3.2%
CMake
0.3%